@Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { // Unexpected close. In normal operation, the client closes the connection after all input // channels have been removed. This indicates a problem with the remote task manager. if (!inputChannels.isEmpty()) { final SocketAddress remoteAddr = ctx.channel().remoteAddress(); notifyAllChannelsOfErrorAndClose(new RemoteTransportException( "Connection unexpectedly closed by remote task manager '" + remoteAddr + "'. " + "This might indicate that the remote task manager was lost.", remoteAddr)); } super.channelInactive(ctx); }
/** * Called on exceptions in the client handler pipeline. * * <p> Remote exceptions are received as regular payload. */ @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { if (cause instanceof TransportException) { notifyAllChannelsOfErrorAndClose(cause); } else { final SocketAddress remoteAddr = ctx.channel().remoteAddress(); final TransportException tex; // Improve on the connection reset by peer error message if (cause instanceof IOException && cause.getMessage().equals("Connection reset by peer")) { tex = new RemoteTransportException( "Lost connection to task manager '" + remoteAddr + "'. This indicates " + "that the remote task manager was lost.", remoteAddr, cause); } else { tex = new LocalTransportException(cause.getMessage(), ctx.channel().localAddress(), cause); } notifyAllChannelsOfErrorAndClose(tex); } }
@Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { // Unexpected close. In normal operation, the client closes the connection after all input // channels have been removed. This indicates a problem with the remote task manager. if (!inputChannels.isEmpty()) { final SocketAddress remoteAddr = ctx.channel().remoteAddress(); notifyAllChannelsOfErrorAndClose(new RemoteTransportException( "Connection unexpectedly closed by remote task manager '" + remoteAddr + "'. " + "This might indicate that the remote task manager was lost.", remoteAddr)); } super.channelInactive(ctx); }
@Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { // Unexpected close. In normal operation, the client closes the connection after all input // channels have been removed. This indicates a problem with the remote task manager. if (!inputChannels.isEmpty()) { final SocketAddress remoteAddr = ctx.channel().remoteAddress(); notifyAllChannelsOfErrorAndClose(new RemoteTransportException( "Connection unexpectedly closed by remote task manager '" + remoteAddr + "'. " + "This might indicate that the remote task manager was lost.", remoteAddr)); } super.channelInactive(ctx); }
@Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { // Unexpected close. In normal operation, the client closes the connection after all input // channels have been removed. This indicates a problem with the remote task manager. if (!inputChannels.isEmpty()) { final SocketAddress remoteAddr = ctx.channel().remoteAddress(); notifyAllChannelsOfErrorAndClose(new RemoteTransportException( "Connection unexpectedly closed by remote task manager '" + remoteAddr + "'. " + "This might indicate that the remote task manager was lost.", remoteAddr)); } super.channelInactive(ctx); }
@Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { // Unexpected close. In normal operation, the client closes the connection after all input // channels have been removed. This indicates a problem with the remote task manager. if (!inputChannels.isEmpty()) { final SocketAddress remoteAddr = ctx.channel().remoteAddress(); notifyAllChannelsOfErrorAndClose(new RemoteTransportException( "Connection unexpectedly closed by remote task manager '" + remoteAddr + "'. " + "This might indicate that the remote task manager was lost.", remoteAddr)); } super.channelInactive(ctx); }
@Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { // Unexpected close. In normal operation, the client closes the connection after all input // channels have been removed. This indicates a problem with the remote task manager. if (!inputChannels.isEmpty()) { final SocketAddress remoteAddr = ctx.channel().remoteAddress(); notifyAllChannelsOfErrorAndClose(new RemoteTransportException( "Connection unexpectedly closed by remote task manager '" + remoteAddr + "'. " + "This might indicate that the remote task manager was lost.", remoteAddr)); } super.channelInactive(ctx); }
@Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { // Unexpected close. In normal operation, the client closes the connection after all input // channels have been removed. This indicates a problem with the remote task manager. if (!inputChannels.isEmpty()) { final SocketAddress remoteAddr = ctx.channel().remoteAddress(); notifyAllChannelsOfErrorAndClose(new RemoteTransportException( "Connection unexpectedly closed by remote task manager '" + remoteAddr + "'. " + "This might indicate that the remote task manager was lost.", remoteAddr)); } super.channelInactive(ctx); }
notifyAllChannelsOfErrorAndClose(new RemoteTransportException( "Fatal error at remote task manager '" + remoteAddr + "'.", remoteAddr, error.cause)); inputChannel.onError(new RemoteTransportException( "Error at remote task manager '" + remoteAddr + "'.", remoteAddr, error.cause));
@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( "Connecting to remote task manager + '" + connectionId.getAddress() + "' has been cancelled.", null)); } } }
notifyAllChannelsOfErrorAndClose(new RemoteTransportException( "Fatal error at remote task manager '" + remoteAddr + "'.", remoteAddr, inputChannel.onFailedPartitionRequest(); } else { inputChannel.onError(new RemoteTransportException( "Error at remote task manager '" + remoteAddr + "'.", remoteAddr,
notifyAllChannelsOfErrorAndClose(new RemoteTransportException( "Fatal error at remote task manager '" + remoteAddr + "'.", remoteAddr, error.cause)); inputChannel.onError(new RemoteTransportException( "Error at remote task manager '" + remoteAddr + "'.", remoteAddr, error.cause));
notifyAllChannelsOfErrorAndClose(new RemoteTransportException( "Fatal error at remote task manager '" + remoteAddr + "'.", remoteAddr, error.cause)); inputChannel.onError(new RemoteTransportException( "Error at remote task manager '" + remoteAddr + "'.", remoteAddr, error.cause));
notifyAllChannelsOfErrorAndClose(new RemoteTransportException( "Fatal error at remote task manager '" + remoteAddr + "'.", remoteAddr, inputChannel.onFailedPartitionRequest(); } else { inputChannel.onError(new RemoteTransportException( "Error at remote task manager '" + remoteAddr + "'.", remoteAddr,
notifyAllChannelsOfErrorAndClose(new RemoteTransportException( "Fatal error at remote task manager '" + remoteAddr + "'.", remoteAddr, inputChannel.onFailedPartitionRequest(); } else { inputChannel.onError(new RemoteTransportException( "Error at remote task manager '" + remoteAddr + "'.", remoteAddr,
/** * Called on exceptions in the client handler pipeline. * * <p>Remote exceptions are received as regular payload. */ @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { if (cause instanceof TransportException) { notifyAllChannelsOfErrorAndClose(cause); } else { final SocketAddress remoteAddr = ctx.channel().remoteAddress(); final TransportException tex; // Improve on the connection reset by peer error message if (cause instanceof IOException && cause.getMessage().equals("Connection reset by peer")) { tex = new RemoteTransportException("Lost connection to task manager '" + remoteAddr + "'. " + "This indicates that the remote task manager was lost.", remoteAddr, cause); } else { final SocketAddress localAddr = ctx.channel().localAddress(); tex = new LocalTransportException( String.format("%s (connection to '%s')", cause.getMessage(), remoteAddr), localAddr, cause); } notifyAllChannelsOfErrorAndClose(tex); } }
/** * Called on exceptions in the client handler pipeline. * * <p>Remote exceptions are received as regular payload. */ @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { if (cause instanceof TransportException) { notifyAllChannelsOfErrorAndClose(cause); } else { final SocketAddress remoteAddr = ctx.channel().remoteAddress(); final TransportException tex; // Improve on the connection reset by peer error message if (cause instanceof IOException && cause.getMessage().equals("Connection reset by peer")) { tex = new RemoteTransportException("Lost connection to task manager '" + remoteAddr + "'. " + "This indicates that the remote task manager was lost.", remoteAddr, cause); } else { final SocketAddress localAddr = ctx.channel().localAddress(); tex = new LocalTransportException( String.format("%s (connection to '%s')", cause.getMessage(), remoteAddr), localAddr, cause); } notifyAllChannelsOfErrorAndClose(tex); } }
notifyAllChannelsOfErrorAndClose(new RemoteTransportException( "Fatal error at remote task manager '" + remoteAddr + "'.", remoteAddr, error.cause)); inputChannel.onError(new RemoteTransportException( "Error at remote task manager '" + remoteAddr + "'.", remoteAddr, error.cause));
/** * Called on exceptions in the client handler pipeline. * * <p> Remote exceptions are received as regular payload. */ @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { if (cause instanceof TransportException) { notifyAllChannelsOfErrorAndClose(cause); } else { final SocketAddress remoteAddr = ctx.channel().remoteAddress(); final TransportException tex; // Improve on the connection reset by peer error message if (cause instanceof IOException && cause.getMessage().equals("Connection reset by peer")) { tex = new RemoteTransportException( "Lost connection to task manager '" + remoteAddr + "'. This indicates " + "that the remote task manager was lost.", remoteAddr, cause); } else { SocketAddress localAddr = ctx.channel().localAddress(); tex = new LocalTransportException( String.format("%s (connection to '%s')", cause.getMessage(), remoteAddr), localAddr, cause); } notifyAllChannelsOfErrorAndClose(tex); } }
/** * Called on exceptions in the client handler pipeline. * * <p>Remote exceptions are received as regular payload. */ @Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { if (cause instanceof TransportException) { notifyAllChannelsOfErrorAndClose(cause); } else { final SocketAddress remoteAddr = ctx.channel().remoteAddress(); final TransportException tex; // Improve on the connection reset by peer error message if (cause instanceof IOException && cause.getMessage().equals("Connection reset by peer")) { tex = new RemoteTransportException("Lost connection to task manager '" + remoteAddr + "'. " + "This indicates that the remote task manager was lost.", remoteAddr, cause); } else { tex = new LocalTransportException(cause.getMessage(), ctx.channel().localAddress(), cause); } notifyAllChannelsOfErrorAndClose(tex); } }