Class JobResult
java.lang.Object
org.apache.flink.runtime.jobmaster.JobResult
- All Implemented Interfaces:
Serializable
Similar to
JobExecutionResult but with an optional SerializedThrowable when the job failed.
This is used by the JobMaster to send the results to the Dispatcher.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic JobResultcreateFrom(AccessExecutionGraph accessExecutionGraph) Creates theJobResultfrom the givenAccessExecutionGraphwhich must be in a globally terminal state.org.apache.flink.api.common.JobIDgetJobId()longOptional<org.apache.flink.util.SerializedThrowable>Returns an emptyOptionalif the job finished successfully, otherwise theOptionalwill carry the failure cause.booleanReturnstrueif the job finished successfully.org.apache.flink.api.common.JobExecutionResulttoJobExecutionResult(ClassLoader classLoader) Converts theJobResultto aJobExecutionResult.
-
Method Details
-
isSuccess
public boolean isSuccess()Returnstrueif the job finished successfully. -
getJobId
public org.apache.flink.api.common.JobID getJobId() -
getApplicationStatus
-
getAccumulatorResults
-
getNetRuntime
public long getNetRuntime() -
getSerializedThrowable
Returns an emptyOptionalif the job finished successfully, otherwise theOptionalwill carry the failure cause. -
toJobExecutionResult
public org.apache.flink.api.common.JobExecutionResult toJobExecutionResult(ClassLoader classLoader) throws JobExecutionException, IOException, ClassNotFoundException Converts theJobResultto aJobExecutionResult.- Parameters:
classLoader- to use for deserialization- Returns:
- JobExecutionResult
- Throws:
JobCancellationException- if the job was cancelledJobExecutionException- if the job execution did not succeedIOException- if the accumulator could not be deserializedClassNotFoundException- if the accumulator could not deserialized
-
createFrom
Creates theJobResultfrom the givenAccessExecutionGraphwhich must be in a globally terminal state.- Parameters:
accessExecutionGraph- to create the JobResult from- Returns:
- JobResult of the given AccessExecutionGraph
-