Search in sources :

Example 1 with ArchivedExecutionGraph

use of org.apache.flink.runtime.executiongraph.ArchivedExecutionGraph in project flink by apache.

the class ArchivedExecutionGraphBuilder method build.

public ArchivedExecutionGraph build() {
    Preconditions.checkNotNull(tasks, "Tasks must not be null.");
    JobID jobID = this.jobID != null ? this.jobID : new JobID();
    String jobName = this.jobName != null ? this.jobName : "job_" + RANDOM.nextInt();
    return new ArchivedExecutionGraph(jobID, jobName, tasks, verticesInCreationOrder != null ? verticesInCreationOrder : new ArrayList<>(tasks.values()), stateTimestamps != null ? stateTimestamps : new long[JobStatus.values().length], state != null ? state : JobStatus.FINISHED, failureCause != null ? failureCause : "(null)", jsonPlan != null ? jsonPlan : "{\"jobid\":\"" + jobID + "\", \"name\":\"" + jobName + "\", \"nodes\":[]}", archivedUserAccumulators != null ? archivedUserAccumulators : new StringifiedAccumulatorResult[0], serializedUserAccumulators != null ? serializedUserAccumulators : Collections.<String, SerializedValue<Object>>emptyMap(), archivedExecutionConfig != null ? archivedExecutionConfig : new ArchivedExecutionConfigBuilder().build(), isStoppable, null, null);
}
Also used : ArrayList(java.util.ArrayList) StringifiedAccumulatorResult(org.apache.flink.runtime.accumulators.StringifiedAccumulatorResult) ArchivedExecutionGraph(org.apache.flink.runtime.executiongraph.ArchivedExecutionGraph) SerializedValue(org.apache.flink.util.SerializedValue) JobID(org.apache.flink.api.common.JobID)

Aggregations

ArrayList (java.util.ArrayList)1 JobID (org.apache.flink.api.common.JobID)1 StringifiedAccumulatorResult (org.apache.flink.runtime.accumulators.StringifiedAccumulatorResult)1 ArchivedExecutionGraph (org.apache.flink.runtime.executiongraph.ArchivedExecutionGraph)1 SerializedValue (org.apache.flink.util.SerializedValue)1