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.
| 限定符和类型 | 类和说明 |
|---|---|
static class |
JobResult.Builder
Builder for
JobResult. |
| 限定符和类型 | 方法和说明 |
|---|---|
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() |
ApplicationStatus |
getApplicationStatus() |
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 ApplicationStatus getApplicationStatus()
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 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–2022 The Apache Software Foundation. All rights reserved.