Package org.apache.flink.core.execution
Class DetachedJobExecutionResult
- java.lang.Object
-
- org.apache.flink.api.common.JobSubmissionResult
-
- org.apache.flink.api.common.JobExecutionResult
-
- org.apache.flink.core.execution.DetachedJobExecutionResult
-
@Internal public final class DetachedJobExecutionResult extends JobExecutionResult
TheJobExecutionResultreturned by a context environment when executing a job in detached mode.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDETACHED_MESSAGEstatic StringEAGER_FUNCTION_MESSAGEstatic StringJOB_RESULT_MESSAGE
-
Constructor Summary
Constructors Constructor Description DetachedJobExecutionResult(JobID jobID)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> TgetAccumulatorResult(String accumulatorName)Gets the accumulator with the given name.Map<String,Object>getAllAccumulatorResults()Gets all accumulators produced by the job.IntegergetIntCounterResult(String accumulatorName)Gets the accumulator with the given name as an integer.JobExecutionResultgetJobExecutionResult()Returns the JobExecutionResult if available.JobIDgetJobID()Returns the JobID assigned to the job by the Flink runtime.longgetNetRuntime()Gets the net execution time of the job, i.e., the execution time in the parallel system, without the pre-flight steps like the optimizer.booleanisJobExecutionResult()Checks if this JobSubmissionResult is also a JobExecutionResult.StringtoString()-
Methods inherited from class org.apache.flink.api.common.JobExecutionResult
fromJobSubmissionResult, getNetRuntime
-
-
-
-
Field Detail
-
DETACHED_MESSAGE
public static final String DETACHED_MESSAGE
- See Also:
- Constant Field Values
-
EAGER_FUNCTION_MESSAGE
public static final String EAGER_FUNCTION_MESSAGE
- See Also:
- Constant Field Values
-
JOB_RESULT_MESSAGE
public static final String JOB_RESULT_MESSAGE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DetachedJobExecutionResult
public DetachedJobExecutionResult(JobID jobID)
-
-
Method Detail
-
getNetRuntime
public long getNetRuntime()
Description copied from class:JobExecutionResultGets the net execution time of the job, i.e., the execution time in the parallel system, without the pre-flight steps like the optimizer.- Overrides:
getNetRuntimein classJobExecutionResult- Returns:
- The net execution time in milliseconds.
-
getAccumulatorResult
public <T> T getAccumulatorResult(String accumulatorName)
Description copied from class:JobExecutionResultGets the accumulator with the given name. Returnsnull, if no accumulator with that name was produced.- Overrides:
getAccumulatorResultin classJobExecutionResult- Type Parameters:
T- The generic type of the accumulator value.- Parameters:
accumulatorName- The name of the accumulator.- Returns:
- The value of the accumulator with the given name.
-
getAllAccumulatorResults
public Map<String,Object> getAllAccumulatorResults()
Description copied from class:JobExecutionResultGets all accumulators produced by the job. The map contains the accumulators as mappings from the accumulator name to the accumulator value.- Overrides:
getAllAccumulatorResultsin classJobExecutionResult- Returns:
- A map containing all accumulators produced by the job.
-
getIntCounterResult
public Integer getIntCounterResult(String accumulatorName)
Description copied from class:JobExecutionResultGets the accumulator with the given name as an integer.- Overrides:
getIntCounterResultin classJobExecutionResult- Parameters:
accumulatorName- Name of the counter- Returns:
- Result of the counter, or null if the counter does not exist
-
getJobID
public JobID getJobID()
Description copied from class:JobSubmissionResultReturns the JobID assigned to the job by the Flink runtime.- Overrides:
getJobIDin classJobSubmissionResult- Returns:
- jobID, or null if the job has been executed on a runtime without JobIDs or if the execution failed.
-
isJobExecutionResult
public boolean isJobExecutionResult()
Description copied from class:JobSubmissionResultChecks if this JobSubmissionResult is also a JobExecutionResult. SeegetJobExecutionResultto retrieve the JobExecutionResult.- Overrides:
isJobExecutionResultin classJobExecutionResult- Returns:
- True if this is a JobExecutionResult, false otherwise
-
getJobExecutionResult
public JobExecutionResult getJobExecutionResult()
Description copied from class:JobSubmissionResultReturns the JobExecutionResult if available.- Overrides:
getJobExecutionResultin classJobExecutionResult- Returns:
- The JobExecutionResult
-
toString
public String toString()
- Overrides:
toStringin classJobExecutionResult
-
-