Java Code Examples for org.apache.flink.shaded.netty4.io.netty.channel.ChannelFuture#cause()

The following examples show how to use org.apache.flink.shaded.netty4.io.netty.channel.ChannelFuture#cause() . 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: PartitionRequestClientFactory.java    From Flink-CEPplus with Apache License 2.0 6 votes vote down vote up
@Override
public void operationComplete(ChannelFuture future) throws Exception {
	if (future.isSuccess()) {
		handInChannel(future.channel());
	}
	else if (future.cause() != null) {
		notifyOfError(new RemoteTransportException(
				"Connecting to remote task manager + '" + connectionId.getAddress() +
						"' has failed. This might indicate that the remote task " +
						"manager has been lost.",
				connectionId.getAddress(), future.cause()));
	}
	else {
		notifyOfError(new LocalTransportException(
			String.format(
				"Connecting to remote task manager '%s' has been cancelled.",
				connectionId.getAddress()),
			null));
	}
}
 
Example 2
Source File: PartitionRequestClientFactory.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
public void operationComplete(ChannelFuture future) throws Exception {
	if (future.isSuccess()) {
		handInChannel(future.channel());
	}
	else if (future.cause() != null) {
		notifyOfError(new RemoteTransportException(
				"Connecting to remote task manager + '" + connectionId.getAddress() +
						"' has failed. This might indicate that the remote task " +
						"manager has been lost.",
				connectionId.getAddress(), future.cause()));
	}
	else {
		notifyOfError(new LocalTransportException(
			String.format(
				"Connecting to remote task manager '%s' has been cancelled.",
				connectionId.getAddress()),
			null));
	}
}
 
Example 3
Source File: PartitionRequestClientFactory.java    From flink with Apache License 2.0 6 votes vote down vote up
@Override
public void operationComplete(ChannelFuture future) throws Exception {
	if (future.isSuccess()) {
		handInChannel(future.channel());
	}
	else if (future.cause() != null) {
		notifyOfError(new RemoteTransportException(
				"Connecting to remote task manager + '" + connectionId.getAddress() +
						"' has failed. This might indicate that the remote task " +
						"manager has been lost.",
				connectionId.getAddress(), future.cause()));
	}
	else {
		notifyOfError(new LocalTransportException(
			String.format(
				"Connecting to remote task manager '%s' has been cancelled.",
				connectionId.getAddress()),
			null));
	}
}
 
Example 4
Source File: CreditBasedPartitionRequestClientHandler.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Override
public void operationComplete(ChannelFuture future) throws Exception {
	try {
		if (future.isSuccess()) {
			writeAndFlushNextMessageIfPossible(future.channel());
		} else if (future.cause() != null) {
			notifyAllChannelsOfErrorAndClose(future.cause());
		} else {
			notifyAllChannelsOfErrorAndClose(new IllegalStateException("Sending cancelled by user."));
		}
	} catch (Throwable t) {
		notifyAllChannelsOfErrorAndClose(t);
	}
}
 
Example 5
Source File: PartitionRequestQueue.java    From Flink-CEPplus with Apache License 2.0 5 votes vote down vote up
@Override
public void operationComplete(ChannelFuture future) throws Exception {
	try {
		if (future.isSuccess()) {
			writeAndFlushNextMessageIfPossible(future.channel());
		} else if (future.cause() != null) {
			handleException(future.channel(), future.cause());
		} else {
			handleException(future.channel(), new IllegalStateException("Sending cancelled by user."));
		}
	} catch (Throwable t) {
		handleException(future.channel(), t);
	}
}
 
Example 6
Source File: CreditBasedPartitionRequestClientHandler.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public void operationComplete(ChannelFuture future) throws Exception {
	try {
		if (future.isSuccess()) {
			writeAndFlushNextMessageIfPossible(future.channel());
		} else if (future.cause() != null) {
			notifyAllChannelsOfErrorAndClose(future.cause());
		} else {
			notifyAllChannelsOfErrorAndClose(new IllegalStateException("Sending cancelled by user."));
		}
	} catch (Throwable t) {
		notifyAllChannelsOfErrorAndClose(t);
	}
}
 
Example 7
Source File: PartitionRequestQueue.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public void operationComplete(ChannelFuture future) throws Exception {
	try {
		if (future.isSuccess()) {
			writeAndFlushNextMessageIfPossible(future.channel());
		} else if (future.cause() != null) {
			handleException(future.channel(), future.cause());
		} else {
			handleException(future.channel(), new IllegalStateException("Sending cancelled by user."));
		}
	} catch (Throwable t) {
		handleException(future.channel(), t);
	}
}
 
Example 8
Source File: CreditBasedPartitionRequestClientHandler.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public void operationComplete(ChannelFuture future) throws Exception {
	try {
		if (future.isSuccess()) {
			writeAndFlushNextMessageIfPossible(future.channel());
		} else if (future.cause() != null) {
			notifyAllChannelsOfErrorAndClose(future.cause());
		} else {
			notifyAllChannelsOfErrorAndClose(new IllegalStateException("Sending cancelled by user."));
		}
	} catch (Throwable t) {
		notifyAllChannelsOfErrorAndClose(t);
	}
}
 
Example 9
Source File: PartitionRequestQueue.java    From flink with Apache License 2.0 5 votes vote down vote up
@Override
public void operationComplete(ChannelFuture future) throws Exception {
	try {
		if (future.isSuccess()) {
			writeAndFlushNextMessageIfPossible(future.channel());
		} else if (future.cause() != null) {
			handleException(future.channel(), future.cause());
		} else {
			handleException(future.channel(), new IllegalStateException("Sending cancelled by user."));
		}
	} catch (Throwable t) {
		handleException(future.channel(), t);
	}
}