FlowRunner extends EventHandler<Event> implements Runnable { public ExecutableFlow getExecutableFlow() { return this.flow; } FlowRunner(final ExecutableFlow flow, final ExecutorLoader executorLoader,
      final ProjectLoader projectLoader, final JobTypeManager jobtypeManager,
      final Props azkabanProps, final AzkabanEventReporter azkabanEventReporter,
      final AlerterHolder alerterHolder, final CommonMetrics commonMetrics,
      final ExecMetrics execMetrics);  FlowRunner(final ExecutableFlow flow, final ExecutorLoader executorLoader,
      final ProjectLoader projectLoader, final JobTypeManager jobtypeManager,
      final ExecutorService executorService, final Props azkabanProps,
      final AzkabanEventReporter azkabanEventReporter, final AlerterHolder alerterHolder,
      final CommonMetrics commonMetrics, final ExecMetrics execMetrics); long getFlowKillTime(); long getFlowKillDuration(); long getFlowPauseTime(); void setFlowCreateTime(final long flowCreateTime); long getFlowPauseDuration(); long getFlowCreateTime(); FlowRunner setFlowWatcher(final FlowWatcher watcher); FlowRunner setNumJobThreads(final int jobs); FlowRunner setJobLogSettings(final String jobLogFileSize, final int jobLogNumFiles); FlowRunner setValidateProxyUser(final boolean validateUserProxy); File getExecutionDir(); @Override void run(); Status getImpliedStatus(final ExecutableNode node); void pause(final String user); void resume(final String user); void kill(final String user); void kill(); void retryFailures(final String user); boolean isKilled(); boolean isRamping(); ExecutableFlow getExecutableFlow(); File getFlowLogFile(); File getJobLogFile(final String jobId, final int attempt); File getJobAttachmentFile(final String jobId, final int attempt); File getJobMetaDataFile(final String jobId, final int attempt); boolean isRunnerThreadAlive(); int getExecutionId(); Set<JobRunner> getActiveJobRunners(); FlowRunnerEventListener getFlowRunnerEventListener();  }
@Test public void exec1Normal() throws Exception { final EventCollectorListener eventCollector = new EventCollectorListener(); eventCollector.setEventFilterOut(EventType.JOB_FINISHED, EventType.JOB_STARTED, EventType.JOB_STATUS_CHANGED); this.runner = this.testUtil.createFromFlowFile(eventCollector, "exec1"); FlowRunnerTestUtil.startThread(this.runner); succeedJobs("job3", "job4", "job6"); waitForAndAssertFlowStatus(Status.SUCCEEDED); assertThreadShutDown(); compareFinishedRuntime(this.runner); assertFlowVersion(this.runner.getExecutableFlow(), 1.0); assertStatus("job1", Status.SUCCEEDED); assertStatus("job2", Status.SUCCEEDED); assertStatus("job3", Status.SUCCEEDED); assertStatus("job4", Status.SUCCEEDED); assertStatus("job5", Status.SUCCEEDED); assertStatus("job6", Status.SUCCEEDED); assertStatus("job7", Status.SUCCEEDED); assertStatus("job8", Status.SUCCEEDED); assertStatus("job10", Status.SUCCEEDED); eventCollector.assertEvents(EventType.FLOW_STARTED, EventType.FLOW_FINISHED); }