@Override public final void execute( ExecutionMonitor monitor, ExecutionContext context, HadoopScript script) throws InterruptedException, IOException { monitor.open(1); try { execute0(monitor, context, script); } finally { monitor.close(); } }
@Override public final void execute( ExecutionMonitor monitor, ExecutionContext context, CommandScript script) throws InterruptedException, IOException { monitor.open(1); try { execute0(monitor, context, script); } finally { monitor.close(); } }
/** * Cleanup the target environment. * @param monitor the progress monitor of the operation * @param context the current execution context * @throws InterruptedException if this operation is interrupted * @throws IOException if failed to setup the target environment */ public void cleanUp( ExecutionMonitor monitor, ExecutionContext context) throws InterruptedException, IOException { monitor.open(1); try { voidCleanUp(context); } finally { monitor.close(); } }
/** * Setup the target environment. * @param monitor the progress monitor of the operation * @param context the current execution context * @throws InterruptedException if this operation is interrupted * @throws IOException if failed to setup the target environment */ public void setUp( ExecutionMonitor monitor, ExecutionContext context) throws InterruptedException, IOException { monitor.open(1); try { voidSetUp(context); } finally { monitor.close(); } }
@Override public void setUp( ExecutionMonitor monitor, ExecutionContext context) throws InterruptedException, IOException { monitor.open(1); try { if (setupCommand.isEmpty() == false) { command(monitor, context, null, setupCommand); } else { voidSetUp(context); } } finally { monitor.close(); } }
@Override public void cleanUp( ExecutionMonitor monitor, ExecutionContext context) throws InterruptedException, IOException { monitor.open(1); try { if (cleanupCommand.isEmpty() == false) { command(monitor, context, null, cleanupCommand); } else { voidCleanUp(context); } } finally { monitor.close(); } }
@Override public void cleanUp( ExecutionMonitor monitor, ExecutionContext context) throws InterruptedException, IOException { monitor.open(1); try { if (cleanup) { YSLOG.info("I51001", context.getBatchId(), context.getFlowId(), context.getExecutionId(), getHandlerId()); HadoopScript script = new HadoopScript( context.getPhase().getSymbol(), Collections.emptySet(), CLEANUP_STAGE_CLASS, Collections.emptyMap(), Collections.emptyMap()); execute0(monitor, context, script); } else { YSLOG.info("I51002", context.getBatchId(), context.getFlowId(), context.getExecutionId(), getHandlerId()); } } finally { monitor.close(); } }
assert context != null; assert script != null; monitor.open(100); try { monitor.checkCancelled();