public void shutdown() {
    logger.warn("Shutting down FlowRunnerManager...");
    if (this.azkabanProps.getBoolean(ConfigurationKeys.AZKABAN_POLL_MODEL, false)) {
      this.pollingService.shutdown();
    }
    this.executorService.shutdown();
    boolean result = false;
    while (!result) {
      logger.info("Awaiting Shutdown. # of executing flows: " + getNumRunningFlows());
      try {
        result = this.executorService.awaitTermination(1, TimeUnit.MINUTES);
      } catch (final InterruptedException e) {
        logger.error(e);
      }
    }
    logger.warn("Shutdown FlowRunnerManager complete.");
  }
public void shutdown ( ) { logger . warn ( "Shutting down FlowRunnerManager..." ) ; if ( this . azkabanProps . getBoolean ( ConfigurationKeys . AZKABAN_POLL_MODEL , false ) ) { this . pollingService . shutdown ( ) ; } this . executorService . shutdown ( ) ; boolean result = false ; while ( ! result ) { logger . info ( "Awaiting Shutdown. # of executing flows: " + getNumRunningFlows ( ) ) ; try { result = this . executorService . awaitTermination ( 1 , TimeUnit . MINUTES ) ; } catch ( final InterruptedException e ) { logger . error ( e ) ; } } logger . warn ( "Shutdown FlowRunnerManager complete." ) ; }
This shuts down the flow runner. The call is blocking and awaits execution of all jobs.