@Override public void channelUnregistered(ChannelHandlerContext ctx) throws Exception { if (getState() != TajoProtos.FetcherState.FETCH_FINISHED) { // channel is closed, but cannot complete fetcher finishTime = System.currentTimeMillis(); state = TajoProtos.FetcherState.FETCH_FAILED; } IOUtils.cleanup(LOG, fc, raf); super.channelUnregistered(ctx); }
@Override public void channelInactive(@NotNull ChannelHandlerContext context) throws Exception { clientChannels.remove(context.channel()); super.channelInactive(context); }