Class JobResult
- java.lang.Object
-
- org.apache.flink.runtime.jobmaster.JobResult
-
- All Implemented Interfaces:
Serializable
public class JobResult extends Object implements Serializable
Similar toJobExecutionResult
but with an optionalSerializedThrowable
when the job failed.This is used by the
JobMaster
to send the results to theDispatcher
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JobResult.Builder
Builder forJobResult
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JobResult
createFrom(AccessExecutionGraph accessExecutionGraph)
Creates theJobResult
from the givenAccessExecutionGraph
which must be in a globally terminal state.Map<String,SerializedValue<OptionalFailure<Object>>>
getAccumulatorResults()
ApplicationStatus
getApplicationStatus()
JobID
getJobId()
long
getNetRuntime()
Optional<SerializedThrowable>
getSerializedThrowable()
Returns an emptyOptional
if the job finished successfully, otherwise theOptional
will carry the failure cause.boolean
isSuccess()
Returnstrue
if the job finished successfully.JobExecutionResult
toJobExecutionResult(ClassLoader classLoader)
Converts theJobResult
to aJobExecutionResult
.
-
-
-
Method Detail
-
isSuccess
public boolean isSuccess()
Returnstrue
if the job finished successfully.
-
getJobId
public JobID getJobId()
-
getApplicationStatus
public ApplicationStatus getApplicationStatus()
-
getAccumulatorResults
public Map<String,SerializedValue<OptionalFailure<Object>>> getAccumulatorResults()
-
getNetRuntime
public long getNetRuntime()
-
getSerializedThrowable
public Optional<SerializedThrowable> getSerializedThrowable()
Returns an emptyOptional
if the job finished successfully, otherwise theOptional
will carry the failure cause.
-
toJobExecutionResult
public JobExecutionResult toJobExecutionResult(ClassLoader classLoader) throws JobExecutionException, IOException, ClassNotFoundException
Converts theJobResult
to 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
public static JobResult createFrom(AccessExecutionGraph accessExecutionGraph)
Creates theJobResult
from the givenAccessExecutionGraph
which must be in a globally terminal state.- Parameters:
accessExecutionGraph
- to create the JobResult from- Returns:
- JobResult of the given AccessExecutionGraph
-
-