public int blockSizeWritten() {
      return state != State.WRITING ? 0 : this.getEncodingState().getUnencodedDataSizeWritten();
    }
Returns the number of bytes written into the current block so far, or zero if not writing the
block at the moment. Note that this will return zero in the "block ready" state as well.
@return the number of bytes written
hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java