@Override
  public void flush() throws IOException {
    if (buf.isReadable()) {
      writeToChannel();
    }
    chc.flush();
  }
OutputStream to write to the Netty Channel
ql/src/java/org/apache/hadoop/hive/llap/ChannelOutputStream.java