code: private void commitDataset(Collection<TaskState> taskStates, DataPublisher publisher) {
  
      try {
        publisher.publish(taskStates);
      } catch (Throwable t) {
        log.error("Failed to commit dataset", t);
        setTaskFailureException(taskStates, t);
      }
    }
docs: Commit the output data of a dataset.