code: public void updateByteMetrics()
        throws IOException {
      if (this.writer.isPresent()) {
        this.taskState.updateByteMetrics(this.writer.get().bytesWritten(), this.index);
      }
    }
docs: Update byte-level metrics.