public void notifyCreditAvailable(RemoteInputChannel inputChannel) { clientHandler.notifyCreditAvailable(inputChannel); }
public void close(RemoteInputChannel inputChannel) throws IOException { clientHandler.removeInputChannel(inputChannel); if (closeReferenceCounter.decrement()) { // Close the TCP connection. Send a close request msg to ensure // that outstanding backwards task events are not discarded. tcpChannel.writeAndFlush(new NettyMessage.CloseRequest()) .addListener(ChannelFutureListener.CLOSE_ON_FAILURE); // Make sure to remove the client from the factory clientFactory.destroyPartitionRequestClient(connectionId, this); } else { clientHandler.cancelRequestFor(inputChannel.getInputChannelId()); } }
@Override public void operationComplete(ChannelFuture future) throws Exception { if (!future.isSuccess()) { clientHandler.removeInputChannel(inputChannel); SocketAddress remoteAddr = future.channel().remoteAddress(); inputChannel.onError( new LocalTransportException( String.format("Sending the partition request to '%s' failed.", remoteAddr), future.channel().localAddress(), future.cause() )); } } };
subpartitionIndex, partitionId, delayMs); clientHandler.addInputChannel(inputChannel);
public void close(RemoteInputChannel inputChannel) throws IOException { clientHandler.removeInputChannel(inputChannel); if (closeReferenceCounter.decrement()) { // Close the TCP connection. Send a close request msg to ensure // that outstanding backwards task events are not discarded. tcpChannel.writeAndFlush(new NettyMessage.CloseRequest()) .addListener(ChannelFutureListener.CLOSE_ON_FAILURE); // Make sure to remove the client from the factory clientFactory.destroyPartitionRequestClient(connectionId, this); } else { clientHandler.cancelRequestFor(inputChannel.getInputChannelId()); } }
@Override public void operationComplete(ChannelFuture future) throws Exception { if (!future.isSuccess()) { clientHandler.removeInputChannel(inputChannel); inputChannel.onError( new LocalTransportException( "Sending the partition request failed.", future.channel().localAddress(), future.cause() )); } } };
subpartitionIndex, partitionId, delayMs); clientHandler.addInputChannel(inputChannel);
public void close(RemoteInputChannel inputChannel) throws IOException { clientHandler.removeInputChannel(inputChannel); if (closeReferenceCounter.decrement()) { // Close the TCP connection. Send a close request msg to ensure // that outstanding backwards task events are not discarded. tcpChannel.writeAndFlush(new NettyMessage.CloseRequest()) .addListener(ChannelFutureListener.CLOSE_ON_FAILURE); // Make sure to remove the client from the factory clientFactory.destroyPartitionRequestClient(connectionId, this); } else { clientHandler.cancelRequestFor(inputChannel.getInputChannelId()); } }
@Override public void operationComplete(ChannelFuture future) throws Exception { if (!future.isSuccess()) { clientHandler.removeInputChannel(inputChannel); SocketAddress remoteAddr = future.channel().remoteAddress(); inputChannel.onError( new LocalTransportException( String.format("Sending the partition request to '%s' failed.", remoteAddr), future.channel().localAddress(), future.cause() )); } } };
public void notifyCreditAvailable(RemoteInputChannel inputChannel) { clientHandler.notifyCreditAvailable(inputChannel); }
subpartitionIndex, partitionId, delayMs); clientHandler.addInputChannel(inputChannel);
public void notifyCreditAvailable(RemoteInputChannel inputChannel) { // We should skip the notification if the client is already closed. if (!closeReferenceCounter.isDisposed()) { clientHandler.notifyCreditAvailable(inputChannel); } }