Class JobResult

java.lang.Object
org.apache.flink.runtime.jobmaster.JobResult
All Implemented Interfaces:
Serializable

public class JobResult extends Object implements 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:
  • Method Details

    • isSuccess

      public boolean isSuccess()
      Returns true if the job finished successfully.
    • getJobId

      public org.apache.flink.api.common.JobID getJobId()
    • getApplicationStatus

      public ApplicationStatus getApplicationStatus()
    • getAccumulatorResults

      public Map<String,org.apache.flink.util.SerializedValue<org.apache.flink.util.OptionalFailure<Object>>> getAccumulatorResults()
    • getNetRuntime

      public long getNetRuntime()
    • getSerializedThrowable

      public Optional<org.apache.flink.util.SerializedThrowable> getSerializedThrowable()
      Returns an empty Optional if the job finished successfully, otherwise the Optional will carry the failure cause.
    • toJobExecutionResult

      public org.apache.flink.api.common.JobExecutionResult toJobExecutionResult(ClassLoader classLoader) throws JobExecutionException, IOException, ClassNotFoundException
      Converts the JobResult to a JobExecutionResult.
      Parameters:
      classLoader - to use for deserialization
      Returns:
      JobExecutionResult
      Throws:
      JobCancellationException - if the job was cancelled
      JobExecutionException - if the job execution did not succeed
      IOException - if the accumulator could not be deserialized
      ClassNotFoundException - if the accumulator could not deserialized
    • createFrom

      public static JobResult createFrom(AccessExecutionGraph accessExecutionGraph)
      Creates the JobResult from the given AccessExecutionGraph which must be in a globally terminal state.
      Parameters:
      accessExecutionGraph - to create the JobResult from
      Returns:
      JobResult of the given AccessExecutionGraph