@Override public void doAction() throws Exception { final ExecutableFlow exFlow = executorManagerAdapter.getExecutableFlow(this.execId); logger.info("ready to kill execution " + this.execId); if (!Status.isStatusFinished(exFlow.getStatus())) { logger.info("Killing execution " + this.execId); executorManagerAdapter.cancelFlow(exFlow, Constants.AZKABAN_SLA_CHECKER_USERNAME); } }
public Status blockOnFinishedStatus() { if (status == null) { return null; } while (!Status.isStatusFinished(status)) { synchronized(this) { try { this.wait(WAIT_TIME); } catch (InterruptedException e) { } } } return status; }
public void changeStatus(Status status) { synchronized(this) { this.status = status; if (Status.isStatusFinished(status)) { unblock(); } } }
@Override public void doAction() throws Exception { ExecutableFlow exFlow = executorManager.getExecutableFlow(execId); logger.info("ready to kill execution " + execId); if(!Status.isStatusFinished(exFlow.getStatus())) { logger.info("Killing execution " + execId); executorManager.cancelFlow(exFlow, "azkaban_sla"); } }
@Override public void doAction() throws Exception { final ExecutableFlow exFlow = executorManager.getExecutableFlow(this.execId); logger.info("ready to kill execution " + this.execId); if (!Status.isStatusFinished(exFlow.getStatus())) { logger.info("Killing execution " + this.execId); executorManager.cancelFlow(exFlow, Constants.AZKABAN_SLA_CHECKER_USERNAME); } }
/** * Only returns true if the status of all finished nodes is true. * @return */ public boolean isFlowFinished() { for (String end: getEndNodes()) { ExecutableNode node = getExecutableNode(end); if (!Status.isStatusFinished(node.getStatus()) ) { return false; } } return true; }
private void propagateStatus(ExecutableFlowBase base, Status status) { if (!Status.isStatusFinished(base.getStatus())) { logger.info("Setting " + base.getNestedId() + " to " + status); base.setStatus(status); if (base.getParentFlow() != null) { propagateStatus(base.getParentFlow(), status); } } }
for (String waitingJobId : pipelineJobs) { Status status = watcher.peekStatus(waitingJobId); if (status != null && !Status.isStatusFinished(status)) { BlockingStatus block = watcher.getBlockingStatus(waitingJobId); blockingStatus.add(block);
ArrayList<ExecutableNode> jobsToRun = new ArrayList<ExecutableNode>(); if (isFlowFinished() && !Status.isStatusFinished(getStatus())) { jobsToRun.add(this); nodeloop: for (ExecutableNode node: executableNodes.values()) { if(Status.isStatusFinished(node.getStatus())) { continue; for (String dependency: node.getInNodes()) { if (!Status.isStatusFinished(getExecutableNode(dependency).getStatus())) { continue nodeloop;
private void runJob() { try { job.run(); } catch (Exception e) { e.printStackTrace(); if (props.getBoolean("job.succeed.on.failure", false)) { changeStatus(Status.FAILED_SUCCEEDED); logError("Job run failed, but will treat it like success."); logError(e.getMessage() + e.getCause()); } else { changeStatus(Status.FAILED); logError("Job run failed!"); logError(e.getMessage() + e.getCause()); } } if (job != null) { node.setOutputProps(job.getJobGeneratedProperties()); } // If the job is still running, set the status to Success. if (!Status.isStatusFinished(node.getStatus())) { changeStatus(Status.SUCCEEDED); } }
public void kill() { synchronized (syncObject) { if (Status.isStatusFinished(node.getStatus())) { return;
private boolean runReadyJob(ExecutableNode node) throws IOException { if (Status.isStatusFinished(node.getStatus()) || Status.isStatusRunning(node.getStatus())) { return false;
long time = System.currentTimeMillis(); if (Status.isStatusFinished(nodeStatus)) { quickFinish = true;
if (Status.isStatusFinished(node.getStatus()) || Status.isStatusRunning(node.getStatus())) {
if (Status.isStatusFinished(flow.getStatus())) { isShutdown = true;
Status depStatus = dependencyNode.getStatus(); if (!Status.isStatusFinished(depStatus)) { return null;