code: public void updateByteMetrics() {
      try {
        for (Optional<Fork> fork : this.forks.keySet()) {
          if (fork.isPresent()) {
            fork.get().updateByteMetrics();
          }
        }
      } catch (IOException ioe) {
        LOG.error("Failed to update byte-level metrics for task " + this.taskId, ioe);
      }
    }
docs: Update byte-level metrics.
  
  <p>
  This method is only supposed to be called after the writer commits.
  </p>