@Override
  protected void initOutput(FileSystem fs, Path path, boolean overwritable, int bufferSize,
    short replication, long blockSize, StreamSlowMonitor monitor, boolean noLocalWrite)
    throws IOException, StreamLacksCapabilityException {
    this.output = AsyncFSOutputHelper.createOutput(fs, path, overwritable, false, replication,
      blockSize, eventLoopGroup, channelClass, monitor, noLocalWrite);
    this.asyncOutputWrapper = new OutputStreamWrapper(output);
  }
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