@Override
    public void operationComplete(ChannelFuture future) {
      writeResources.release();

      if (future.isCancelled()) {
        LOG.error("Write cancelled on ID " + id);
      } else if (!future.isSuccess()) {
        LOG.error("Write error on ID " + id, future.cause());
      }
    }
OutputStream to write to the Netty Channel
ql/src/java/org/apache/hadoop/hive/llap/ChannelOutputStream.java