Java Code Examples for org.apache.flink.runtime.io.network.partition.consumer.RemoteInputChannel#onError()

The following examples show how to use org.apache.flink.runtime.io.network.partition.consumer.RemoteInputChannel#onError() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PartitionRequestClientHandler.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
private void notifyAllChannelsOfErrorAndClose(Throwable cause) {
	if (channelError.compareAndSet(null, cause)) {
		try {
			for (RemoteInputChannel inputChannel : inputChannels.values()) {
				inputChannel.onError(cause);
			}
		}
		catch (Throwable t) {
			// We can only swallow the Exception at this point. :(
			LOG.warn("An Exception was thrown during error notification of a "
					+ "remote input channel.", t);
		}
		finally {
			inputChannels.clear();

			if (ctx != null) {
				ctx.close();
			}
		}
	}
}
 
Example 2
Source File: CreditBasedPartitionRequestClientHandler.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
private void notifyAllChannelsOfErrorAndClose(Throwable cause) {
	if (channelError.compareAndSet(null, cause)) {
		try {
			for (RemoteInputChannel inputChannel : inputChannels.values()) {
				inputChannel.onError(cause);
			}
		} catch (Throwable t) {
			// We can only swallow the Exception at this point. :(
			LOG.warn("An Exception was thrown during error notification of a remote input channel.", t);
		} finally {
			inputChannels.clear();
			inputChannelsWithCredit.clear();

			if (ctx != null) {
				ctx.close();
			}
		}
	}
}
 
Example 3
Source File: PartitionRequestClientHandler.java    From flink with Apache License 2.0 6 votes vote down vote up
private void notifyAllChannelsOfErrorAndClose(Throwable cause) {
	if (channelError.compareAndSet(null, cause)) {
		try {
			for (RemoteInputChannel inputChannel : inputChannels.values()) {
				inputChannel.onError(cause);
			}
		}
		catch (Throwable t) {
			// We can only swallow the Exception at this point. :(
			LOG.warn("An Exception was thrown during error notification of a "
					+ "remote input channel.", t);
		}
		finally {
			inputChannels.clear();

			if (ctx != null) {
				ctx.close();
			}
		}
	}
}
 
Example 4
Source File: CreditBasedPartitionRequestClientHandler.java    From flink with Apache License 2.0 6 votes vote down vote up
private void notifyAllChannelsOfErrorAndClose(Throwable cause) {
	if (channelError.compareAndSet(null, cause)) {
		try {
			for (RemoteInputChannel inputChannel : inputChannels.values()) {
				inputChannel.onError(cause);
			}
		} catch (Throwable t) {
			// We can only swallow the Exception at this point. :(
			LOG.warn("An Exception was thrown during error notification of a remote input channel.", t);
		} finally {
			inputChannels.clear();
			inputChannelsWithCredit.clear();

			if (ctx != null) {
				ctx.close();
			}
		}
	}
}
 
Example 5
Source File: CreditBasedPartitionRequestClientHandler.java    From flink with Apache License 2.0 6 votes vote down vote up
private void notifyAllChannelsOfErrorAndClose(Throwable cause) {
	if (channelError.compareAndSet(null, cause)) {
		try {
			for (RemoteInputChannel inputChannel : inputChannels.values()) {
				inputChannel.onError(cause);
			}
		} catch (Throwable t) {
			// We can only swallow the Exception at this point. :(
			LOG.warn("An Exception was thrown during error notification of a remote input channel.", t);
		} finally {
			inputChannels.clear();
			clientOutboundMessages.clear();

			if (ctx != null) {
				ctx.close();
			}
		}
	}
}