gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManager.java
/**
     * Method that defines the actions to be performed when a job finishes either successfully or with failure.
     * This method updates the state of the dag and performs clean up actions as necessary.
     */
Method that defines the actions to be performed when a job finishes either successfully or with failure.
This method updates the state of the dag and performs clean up actions as necessary.
Method that defines the actions to be performed when a job finishes either successfully or with failure . This method updates the state of the dag and performs clean up actions as necessary .
private Map<String, Set<DagNode<JobExecutionPlan>>> onJobFinish(DagNode<JobExecutionPlan> dagNode)
        throws IOException {
      Dag<JobExecutionPlan> dag = this.jobToDag.get(dagNode);
      String dagId = DagManagerUtils.generateDagId(dag);
      String jobName = DagManagerUtils.getFullyQualifiedJobName(dagNode);
      ExecutionStatus jobStatus = DagManagerUtils.getExecutionStatus(dagNode);
      log.info("Job {} of Dag {} has finished with status {}", jobName, dagId, jobStatus.name());
      if (this.metricContext != null) {
        getRunningJobsCounter(dagNode).dec();
      }
      if (jobStatus == COMPLETE) {
        return submitNext(dagId);
      } else if (jobStatus == FAILED) {
        if (DagManagerUtils.getFailureOption(dag) == FailureOption.FINISH_RUNNING) {
          this.failedDagIdsFinishRunning.add(dagId);
        } else {
          this.failedDagIdsFinishAllPossible.add(dagId);
        }
      }
      return Maps.newHashMap();
    }
private Map < String , Set < DagNode < JobExecutionPlan > > > onJobFinish ( DagNode < JobExecutionPlan > dagNode ) throws IOException { Dag < JobExecutionPlan > dag = this . jobToDag . get ( dagNode ) ; String dagId = DagManagerUtils . generateDagId ( dag ) ; String jobName = DagManagerUtils . getFullyQualifiedJobName ( dagNode ) ; ExecutionStatus jobStatus = DagManagerUtils . getExecutionStatus ( dagNode ) ; log . info ( "Job {} of Dag {} has finished with status {}" , jobName , dagId , jobStatus . name ( ) ) ; if ( this . metricContext != null ) { getRunningJobsCounter ( dagNode ) . dec ( ) ; } if ( jobStatus == COMPLETE ) { return submitNext ( dagId ) ; } else if ( jobStatus == FAILED ) { if ( DagManagerUtils . getFailureOption ( dag ) == FailureOption . FINISH_RUNNING ) { this . failedDagIdsFinishRunning . add ( dagId ) ; } else { this . failedDagIdsFinishAllPossible . add ( dagId ) ; } } return Maps . newHashMap ( ) ; }
Method that defines the actions to be performed when a job finishes either successfully or with failure.
Method that defines the actions to be performed when a job finishes either successfully or with failure .