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 . |
static class |
JobResult.WrappedJobException
Exception which indicates that the job has finished with an
Exception . |
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,org.apache.flink.util.SerializedValue<org.apache.flink.util.OptionalFailure<Object>>> |
getAccumulatorResults() |
org.apache.flink.api.common.JobID |
getJobId() |
long |
getNetRuntime() |
Optional<org.apache.flink.util.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. |
org.apache.flink.api.common.JobExecutionResult |
toJobExecutionResult(ClassLoader classLoader)
Converts the
JobResult to a JobExecutionResult . |
public boolean isSuccess()
true
if the job finished successfully.public org.apache.flink.api.common.JobID getJobId()
public Map<String,org.apache.flink.util.SerializedValue<org.apache.flink.util.OptionalFailure<Object>>> getAccumulatorResults()
public long getNetRuntime()
public Optional<org.apache.flink.util.SerializedThrowable> getSerializedThrowable()
Optional
if the job finished successfully, otherwise the
Optional
will carry the failure cause.public org.apache.flink.api.common.JobExecutionResult toJobExecutionResult(ClassLoader classLoader) throws JobResult.WrappedJobException, IOException, ClassNotFoundException
JobResult
to a JobExecutionResult
.classLoader
- to use for deserializationJobResult.WrappedJobException
- if the JobResult contains a serialized exceptionIOException
- 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–2018 The Apache Software Foundation. All rights reserved.