Package org.apache.beam.runners.direct
Class DirectRunner.DirectPipelineResult
java.lang.Object
org.apache.beam.runners.direct.DirectRunner.DirectPipelineResult
- All Implemented Interfaces:
PipelineResult
- Enclosing class:
DirectRunner
The result of running a
Pipeline
with the DirectRunner
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.beam.sdk.PipelineResult
PipelineResult.State
-
Method Summary
Modifier and TypeMethodDescriptioncancel()
Cancels the pipeline execution.getState()
Retrieves the current state of the pipeline execution.metrics()
Returns the object to access metrics from the pipeline.Waits until the pipeline finishes and returns the final status.waitUntilFinish
(Duration duration) Waits until the pipeline finishes and returns the final status.
-
Method Details
-
getState
Description copied from interface:PipelineResult
Retrieves the current state of the pipeline execution.- Specified by:
getState
in interfacePipelineResult
- Returns:
- the
PipelineResult.State
representing the state of this pipeline.
-
metrics
Description copied from interface:PipelineResult
Returns the object to access metrics from the pipeline.- Specified by:
metrics
in interfacePipelineResult
-
waitUntilFinish
Waits until the pipeline finishes and returns the final status..If the pipeline terminates abnormally by throwing an
Exception
, this will rethrow the originalException
. Future calls togetState()
will returnPipelineResult.State.FAILED
.- Specified by:
waitUntilFinish
in interfacePipelineResult
- Returns:
- The final state of the pipeline.
-
cancel
Description copied from interface:PipelineResult
Cancels the pipeline execution.- Specified by:
cancel
in interfacePipelineResult
-
waitUntilFinish
Waits until the pipeline finishes and returns the final status. It times out after the given duration..If the pipeline terminates abnormally by throwing an
Exception
, this will rethrow the originalException
. Future calls togetState()
will returnPipelineResult.State.FAILED
.- Specified by:
waitUntilFinish
in interfacePipelineResult
- Parameters:
duration
- The time to wait for the pipeline to finish. Provide a value less than 1 ms for an infinite wait.- Returns:
- The final state of the pipeline or null on timeout.
-