Package org.apache.beam.sdk
Interface PipelineResult
- All Known Subinterfaces:
PortablePipelineResult
- All Known Implementing Classes:
DataflowPipelineJob
,DataflowTemplateJob
,DirectRunner.DirectPipelineResult
,FailedRunningPipelineResults
,FlinkDetachedRunnerResult
,FlinkPortableRunnerResult
,FlinkRunnerResult
,JetPipelineResult
,SparkPipelineResult
,SparkRunnerDebugger.DebugSparkPipelineResult
,SparkStructuredStreamingPipelineResult
,Twister2PipelineResult
public interface PipelineResult
Result of
Pipeline.run()
.
This is often a job handle to an underlying data processing engine.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Possible job states, for both completed and ongoing jobs. -
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
PipelineResult.State getState()Retrieves the current state of the pipeline execution.- Returns:
- the
PipelineResult.State
representing the state of this pipeline.
-
cancel
Cancels the pipeline execution.- Throws:
IOException
- if there is a problem executing the cancel request.UnsupportedOperationException
- if the runner does not support cancellation.
-
waitUntilFinish
Waits until the pipeline finishes and returns the final status. It times out after the given duration.- 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.
- Throws:
UnsupportedOperationException
- if the runner does not support waiting to finish with a timeout.
-
waitUntilFinish
PipelineResult.State waitUntilFinish()Waits until the pipeline finishes and returns the final status.- Returns:
- The final state of the pipeline.
- Throws:
UnsupportedOperationException
- if the runner does not support waiting to finish.
-
metrics
MetricResults metrics()Returns the object to access metrics from the pipeline.- Throws:
UnsupportedOperationException
- if the runner doesn't support retrieving metrics.
-