@Override
  protected void closeOutputIfNecessary() {
    if (this.output != null) {
      try {
        this.output.close();
      } catch (IOException e) {
        LOG.warn("Close output failed", e);
      }
    }
  }
We have to call {@link AsyncFSOutput#getSyncedLength()} after {@link AsyncFSOutput#close()}
to get the final length synced to underlying filesystem because {@link AsyncFSOutput#close()}
may also flush some data to underlying filesystem.
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/AsyncProtobufLogWriter.java