Java Code Examples for org.apache.flink.runtime.executiongraph.ArchivedExecutionGraph#getState()
The following examples show how to use
org.apache.flink.runtime.executiongraph.ArchivedExecutionGraph#getState() .
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: FileArchivedExecutionGraphStoreTest.java From Flink-CEPplus with Apache License 2.0 | 6 votes |
@Override public boolean matches(Object o) { if (archivedExecutionGraph == o) { return true; } if (o == null || archivedExecutionGraph.getClass() != o.getClass()) { return false; } ArchivedExecutionGraph that = (ArchivedExecutionGraph) o; return archivedExecutionGraph.isStoppable() == that.isStoppable() && Objects.equals(archivedExecutionGraph.getJobID(), that.getJobID()) && Objects.equals(archivedExecutionGraph.getJobName(), that.getJobName()) && archivedExecutionGraph.getState() == that.getState() && Objects.equals(archivedExecutionGraph.getJsonPlan(), that.getJsonPlan()) && Objects.equals(archivedExecutionGraph.getAccumulatorsSerialized(), that.getAccumulatorsSerialized()) && Objects.equals(archivedExecutionGraph.getCheckpointCoordinatorConfiguration(), that.getCheckpointCoordinatorConfiguration()) && archivedExecutionGraph.getAllVertices().size() == that.getAllVertices().size(); }
Example 2
Source File: FileArchivedExecutionGraphStoreTest.java From flink with Apache License 2.0 | 6 votes |
@Override public boolean matches(Object o) { if (archivedExecutionGraph == o) { return true; } if (o == null || archivedExecutionGraph.getClass() != o.getClass()) { return false; } ArchivedExecutionGraph that = (ArchivedExecutionGraph) o; return archivedExecutionGraph.isStoppable() == that.isStoppable() && Objects.equals(archivedExecutionGraph.getJobID(), that.getJobID()) && Objects.equals(archivedExecutionGraph.getJobName(), that.getJobName()) && archivedExecutionGraph.getState() == that.getState() && Objects.equals(archivedExecutionGraph.getJsonPlan(), that.getJsonPlan()) && Objects.equals(archivedExecutionGraph.getAccumulatorsSerialized(), that.getAccumulatorsSerialized()) && Objects.equals(archivedExecutionGraph.getCheckpointCoordinatorConfiguration(), that.getCheckpointCoordinatorConfiguration()) && archivedExecutionGraph.getAllVertices().size() == that.getAllVertices().size(); }
Example 3
Source File: FileArchivedExecutionGraphStoreTest.java From flink with Apache License 2.0 | 6 votes |
@Override public boolean matches(Object o) { if (archivedExecutionGraph == o) { return true; } if (o == null || archivedExecutionGraph.getClass() != o.getClass()) { return false; } ArchivedExecutionGraph that = (ArchivedExecutionGraph) o; return archivedExecutionGraph.isStoppable() == that.isStoppable() && Objects.equals(archivedExecutionGraph.getJobID(), that.getJobID()) && Objects.equals(archivedExecutionGraph.getJobName(), that.getJobName()) && archivedExecutionGraph.getState() == that.getState() && Objects.equals(archivedExecutionGraph.getJsonPlan(), that.getJsonPlan()) && Objects.equals(archivedExecutionGraph.getAccumulatorsSerialized(), that.getAccumulatorsSerialized()) && Objects.equals(archivedExecutionGraph.getCheckpointCoordinatorConfiguration(), that.getCheckpointCoordinatorConfiguration()) && archivedExecutionGraph.getAllVertices().size() == that.getAllVertices().size(); }
Example 4
Source File: FileArchivedExecutionGraphStore.java From Flink-CEPplus with Apache License 2.0 | 5 votes |
@Override public void put(ArchivedExecutionGraph archivedExecutionGraph) throws IOException { final JobStatus jobStatus = archivedExecutionGraph.getState(); final JobID jobId = archivedExecutionGraph.getJobID(); final String jobName = archivedExecutionGraph.getJobName(); Preconditions.checkArgument( jobStatus.isGloballyTerminalState(), "The job " + jobName + '(' + jobId + ") is not in a globally terminal state. Instead it is in state " + jobStatus + '.'); switch (jobStatus) { case FINISHED: numFinishedJobs++; break; case CANCELED: numCanceledJobs++; break; case FAILED: numFailedJobs++; break; default: throw new IllegalStateException("The job " + jobName + '(' + jobId + ") should have been in a globally terminal state. " + "Instead it was in state " + jobStatus + '.'); } // write the ArchivedExecutionGraph to disk storeArchivedExecutionGraph(archivedExecutionGraph); final JobDetails detailsForJob = WebMonitorUtils.createDetailsForJob(archivedExecutionGraph); jobDetailsCache.put(jobId, detailsForJob); archivedExecutionGraphCache.put(jobId, archivedExecutionGraph); }
Example 5
Source File: FileArchivedExecutionGraphStore.java From flink with Apache License 2.0 | 5 votes |
@Override public void put(ArchivedExecutionGraph archivedExecutionGraph) throws IOException { final JobStatus jobStatus = archivedExecutionGraph.getState(); final JobID jobId = archivedExecutionGraph.getJobID(); final String jobName = archivedExecutionGraph.getJobName(); Preconditions.checkArgument( jobStatus.isGloballyTerminalState(), "The job " + jobName + '(' + jobId + ") is not in a globally terminal state. Instead it is in state " + jobStatus + '.'); switch (jobStatus) { case FINISHED: numFinishedJobs++; break; case CANCELED: numCanceledJobs++; break; case FAILED: numFailedJobs++; break; default: throw new IllegalStateException("The job " + jobName + '(' + jobId + ") should have been in a globally terminal state. " + "Instead it was in state " + jobStatus + '.'); } // write the ArchivedExecutionGraph to disk storeArchivedExecutionGraph(archivedExecutionGraph); final JobDetails detailsForJob = WebMonitorUtils.createDetailsForJob(archivedExecutionGraph); jobDetailsCache.put(jobId, detailsForJob); archivedExecutionGraphCache.put(jobId, archivedExecutionGraph); }
Example 6
Source File: FileArchivedExecutionGraphStore.java From flink with Apache License 2.0 | 5 votes |
@Override public void put(ArchivedExecutionGraph archivedExecutionGraph) throws IOException { final JobStatus jobStatus = archivedExecutionGraph.getState(); final JobID jobId = archivedExecutionGraph.getJobID(); final String jobName = archivedExecutionGraph.getJobName(); Preconditions.checkArgument( jobStatus.isGloballyTerminalState(), "The job " + jobName + '(' + jobId + ") is not in a globally terminal state. Instead it is in state " + jobStatus + '.'); switch (jobStatus) { case FINISHED: numFinishedJobs++; break; case CANCELED: numCanceledJobs++; break; case FAILED: numFailedJobs++; break; default: throw new IllegalStateException("The job " + jobName + '(' + jobId + ") should have been in a globally terminal state. " + "Instead it was in state " + jobStatus + '.'); } // write the ArchivedExecutionGraph to disk storeArchivedExecutionGraph(archivedExecutionGraph); final JobDetails detailsForJob = WebMonitorUtils.createDetailsForJob(archivedExecutionGraph); jobDetailsCache.put(jobId, detailsForJob); archivedExecutionGraphCache.put(jobId, archivedExecutionGraph); }