code: private void updateDagStatusInternal(final boolean failed) {
      if (this.status == Status.KILLING) {
        /*
        It's possible that some nodes have failed when the dag is killed.
        Since killing a dag signals an intent from an operator, it is more important to make
        the dag status reflect the result of that explict intent. e.g. if the killing is a
        result of handing a job failure, users more likely want to know that someone has taken
        an action rather than that a job has failed. Operators can still see the individual job
        status.
        */
        changeStatus(Status.KILLED);
      } else if (failed) {
        changeStatus(Status.FAILURE);
      } else {
        changeStatus(Status.SUCCESS);
      }
    }
docs: Update the final dag status.
  
  @param failed true if any of the jobs has failed