public class JobResult extends Object implements Serializable
JobExecutionResult
but with an optional SerializedThrowable
when the job failed.
This is used by the JobMaster
to send the results to the Dispatcher
.
Modifier and Type | Class and Description |
---|---|
static class |
JobResult.Builder
Builder for
JobResult . |
Modifier and Type | Method and Description |
---|---|
static JobResult |
createFrom(AccessExecutionGraph accessExecutionGraph)
Creates the
JobResult from the given AccessExecutionGraph 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 empty
Optional if the job finished successfully, otherwise the Optional will carry the failure cause. |
boolean |
isSuccess()
Returns
true if the job finished successfully. |
JobExecutionResult |
toJobExecutionResult(ClassLoader classLoader)
Converts the
JobResult to a JobExecutionResult . |
public boolean isSuccess()
true
if the job finished successfully.public JobID getJobId()
public ApplicationStatus getApplicationStatus()
public Map<String,SerializedValue<OptionalFailure<Object>>> getAccumulatorResults()
public long getNetRuntime()
public Optional<SerializedThrowable> getSerializedThrowable()
Optional
if the job finished successfully, otherwise the Optional
will carry the failure cause.public JobExecutionResult toJobExecutionResult(ClassLoader classLoader) throws JobExecutionException, IOException, ClassNotFoundException
JobResult
to a JobExecutionResult
.classLoader
- to use for deserializationJobCancellationException
- if the job was cancelledJobExecutionException
- if the job execution did not succeedIOException
- if the accumulator could not be deserializedClassNotFoundException
- if the accumulator could not deserializedpublic static JobResult createFrom(AccessExecutionGraph accessExecutionGraph)
JobResult
from the given AccessExecutionGraph
which must be in a
globally terminal state.accessExecutionGraph
- to create the JobResult fromCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.