@Test public void cleanup() throws Exception { MockJobClient c1 = new MockJobClient("testing", COMPLETED); JobClientProfile profile = new JobClientProfile("testing", list(c1), 1000, 10); QueueHadoopScriptHandler handler = create(); handler.doConfigure(profile); ExecutionContext context = context(); handler.cleanUp(ExecutionMonitor.NULL, context); JobScript js = c1.registered.get("testing"); assertThat(js, is(notNullValue())); assertThat(js.getBatchId(), is(context.getBatchId())); assertThat(js.getFlowId(), is(context.getFlowId())); assertThat(js.getExecutionId(), is(context.getExecutionId())); assertThat(js.getPhase(), is(context.getPhase())); assertThat(js.getMainClassName(), is(QueueHadoopScriptHandler.CLEANUP_STAGE_CLASS)); assertThat(js.getArguments(), is(context.getArguments())); assertThat(js.getProperties(), hasEntry("s", "service")); }
@Override public void cleanUp( ExecutionMonitor monitor, ExecutionContext context) throws InterruptedException, IOException { HadoopScript script = new HadoopScript( context.getPhase().getSymbol(), Collections.emptySet(), CLEANUP_STAGE_CLASS, Collections.emptyMap(), Collections.emptyMap()); run(monitor, context, script); }
QueueHadoopScriptHandler extends ExecutionScriptHandlerBase implements HadoopScriptHandler { @Override public void cleanUp( ExecutionMonitor monitor, ExecutionContext context) throws InterruptedException, IOException { HadoopScript script = new HadoopScript( context.getPhase().getSymbol(), Collections.emptySet(), CLEANUP_STAGE_CLASS, Collections.emptyMap(), Collections.emptyMap()); run(monitor, context, script); } }
QueueHadoopScriptHandler extends ExecutionScriptHandlerBase implements HadoopScriptHandler { @Override public void cleanUp( ExecutionMonitor monitor, ExecutionContext context) throws InterruptedException, IOException { HadoopScript script = new HadoopScript( context.getPhase().getSymbol(), Collections.emptySet(), CLEANUP_STAGE_CLASS, Collections.emptyMap(), Collections.emptyMap()); run(monitor, context, script); }  }
QueueHadoopScriptHandler extends ExecutionScriptHandlerBase implements HadoopScriptHandler { @Override public void cleanUp( ExecutionMonitor monitor, ExecutionContext context) throws InterruptedException, IOException { HadoopScript script = new HadoopScript( context.getPhase().getSymbol(), Collections.emptySet(), CLEANUP_STAGE_CLASS, Collections.emptyMap(), Collections.emptyMap()); run(monitor, context, script); }  @Override void execute(
            ExecutionMonitor monitor,
            ExecutionContext context,
            HadoopScript script); @Override void cleanUp(
            ExecutionMonitor monitor,
            ExecutionContext context); }
QueueHadoopScriptHandler extends ExecutionScriptHandlerBase implements HadoopScriptHandler { @Override public void cleanUp( ExecutionMonitor monitor, ExecutionContext context) throws InterruptedException, IOException { HadoopScript script = new HadoopScript( context.getPhase().getSymbol(), Collections.emptySet(), CLEANUP_STAGE_CLASS, Collections.emptyMap(), Collections.emptyMap()); run(monitor, context, script); }  @Override void execute(
            ExecutionMonitor monitor,
            ExecutionContext context,
            HadoopScript script); @Override void cleanUp(
            ExecutionMonitor monitor,
            ExecutionContext context);  }