code: @Override
    public void flush(boolean forceSync)
        throws IOException {
      if (blockDataWriter != null) {
        blockDataWriter.flush();
        if (forceSync) {
          blockDataWriter.force(true);
        }
      }
    }
docs: Flush the data and checksum data out to the stream. Please call sync to
  make sure to write the data in to disk
  
  @throws IOException