public void onExecutionFail(Execution taskExecution, Throwable cause) { // TODO: check if need to failover the preceding region if (!executionGraph.getRestartStrategy().canRestart()) { // delegate the failure to a global fail that will check the restart strategy and not restart executionGraph.failGlobal(cause); } else { cancel(taskExecution.getGlobalModVersion()); } }
public void onExecutionFail(Execution taskExecution, Throwable cause) { // TODO: check if need to failover the preceding region if (!executionGraph.getRestartStrategy().canRestart()) { // delegate the failure to a global fail that will check the restart strategy and not restart executionGraph.failGlobal(cause); } else { cancel(taskExecution.getGlobalModVersion()); } }
public void onExecutionFail(Execution taskExecution, Throwable cause) { // TODO: check if need to failover the preceding region if (!executionGraph.getRestartStrategy().canRestart()) { // delegate the failure to a global fail that will check the restart strategy and not restart executionGraph.failGlobal(cause); } else { cancel(taskExecution.getGlobalModVersion()); } }
private void failover(long globalModVersionOfFailover) { if (!executionGraph.getRestartStrategy().canRestart()) { executionGraph.failGlobal(new FlinkException("RestartStrategy validate fail")); } else { JobStatus curStatus = this.state; if (curStatus.equals(JobStatus.RUNNING)) { cancel(globalModVersionOfFailover); } else if (curStatus.equals(JobStatus.CANCELED)) { reset(globalModVersionOfFailover); } else { LOG.info("FailoverRegion {} is {} when notified to failover.", id, state); } } }
private void failover(long globalModVersionOfFailover) { if (!executionGraph.getRestartStrategy().canRestart()) { executionGraph.failGlobal(new FlinkException("RestartStrategy validate fail")); } else { JobStatus curStatus = this.state; if (curStatus.equals(JobStatus.RUNNING)) { cancel(globalModVersionOfFailover); } else if (curStatus.equals(JobStatus.CANCELED)) { reset(globalModVersionOfFailover); } else { LOG.info("FailoverRegion {} is {} when notified to failover.", id, state); } } }
private void failover(long globalModVersionOfFailover) { if (!executionGraph.getRestartStrategy().canRestart()) { executionGraph.failGlobal(new FlinkException("RestartStrategy validate fail")); } else { JobStatus curStatus = this.state; if (curStatus.equals(JobStatus.RUNNING)) { cancel(globalModVersionOfFailover); } else if (curStatus.equals(JobStatus.CANCELED)) { reset(globalModVersionOfFailover); } else { LOG.info("FailoverRegion {} is {} when notified to failover.", id, state); } } }
/** * Notify the region to failover. */ private void failover(long globalModVersionOfFailover, Throwable cause) { LOG.info("Try to fail and restart region due to error: ", cause); regionFailCount++; if (!executionGraph.getRestartStrategy().canRestart()) { executionGraph.failGlobal(new FlinkException("RestartStrategy validate fail", cause)); } else if (regionFailCount > regionFailLimit) { executionGraph.failGlobal(new FlinkException("FailoverRegion " + id + " exceeds max region restart limit", cause)); } else { JobStatus curStatus = this.state; if (curStatus.equals(JobStatus.RUNNING)) { cancel(globalModVersionOfFailover); } else if (curStatus.equals(JobStatus.CANCELED)) { reset(globalModVersionOfFailover); } else { LOG.info("FailoverRegion {} is {} when notified to failover.", id, state); } } }