Java Code Examples for org.apache.flink.runtime.jobgraph.JobStatus#equals()
The following examples show how to use
org.apache.flink.runtime.jobgraph.JobStatus#equals() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FailoverRegion.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
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); } } }
Example 2
Source File: FailoverRegion.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
private void cancel(final long globalModVersionOfFailover) { executionGraph.getJobMasterMainThreadExecutor().assertRunningInMainThread(); while (true) { JobStatus curStatus = this.state; if (curStatus.equals(JobStatus.RUNNING)) { if (transitionState(curStatus, JobStatus.CANCELLING)) { createTerminationFutureOverAllConnectedVertexes() .thenAccept((nullptr) -> allVerticesInTerminalState(globalModVersionOfFailover)); break; } } else { LOG.info("FailoverRegion {} is {} when cancel.", id, state); break; } } }
Example 3
Source File: FailoverRegion.java From flink with Apache License 2.0 | 6 votes |
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); } } }
Example 4
Source File: FailoverRegion.java From flink with Apache License 2.0 | 6 votes |
private void cancel(final long globalModVersionOfFailover) { executionGraph.getJobMasterMainThreadExecutor().assertRunningInMainThread(); while (true) { JobStatus curStatus = this.state; if (curStatus.equals(JobStatus.RUNNING)) { if (transitionState(curStatus, JobStatus.CANCELLING)) { createTerminationFutureOverAllConnectedVertexes() .thenAccept((nullptr) -> allVerticesInTerminalState(globalModVersionOfFailover)); break; } } else { LOG.info("FailoverRegion {} is {} when cancel.", id, state); break; } } }
Example 5
Source File: FailoverRegion.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
private void allVerticesInTerminalState(long globalModVersionOfFailover) { while (true) { JobStatus curStatus = this.state; if (curStatus.equals(JobStatus.CANCELLING)) { if (transitionState(curStatus, JobStatus.CANCELED)) { reset(globalModVersionOfFailover); break; } } else { LOG.info("FailoverRegion {} is {} when allVerticesInTerminalState.", id, state); break; } } }
Example 6
Source File: FailoverRegion.java From flink with Apache License 2.0 | 5 votes |
private void allVerticesInTerminalState(long globalModVersionOfFailover) { while (true) { JobStatus curStatus = this.state; if (curStatus.equals(JobStatus.CANCELLING)) { if (transitionState(curStatus, JobStatus.CANCELED)) { reset(globalModVersionOfFailover); break; } } else { LOG.info("FailoverRegion {} is {} when allVerticesInTerminalState.", id, state); break; } } }