Package org.apache.beam.sdk
Interface PipelineResult
-
public interface PipelineResult
Result ofPipeline.run()
.This is often a job handle to an underlying data processing engine.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
PipelineResult.State
Possible job states, for both completed and ongoing jobs.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PipelineResult.State
cancel()
Cancels the pipeline execution.PipelineResult.State
getState()
Retrieves the current state of the pipeline execution.MetricResults
metrics()
Returns the object to access metrics from the pipeline.PipelineResult.State
waitUntilFinish()
Waits until the pipeline finishes and returns the final status.PipelineResult.State
waitUntilFinish(org.joda.time.Duration duration)
Waits until the pipeline finishes and returns the final status.
-
-
-
Method Detail
-
getState
PipelineResult.State getState()
Retrieves the current state of the pipeline execution.- Returns:
- the
PipelineResult.State
representing the state of this pipeline.
-
cancel
PipelineResult.State cancel() throws java.io.IOException
Cancels the pipeline execution.- Throws:
java.io.IOException
- if there is a problem executing the cancel request.java.lang.UnsupportedOperationException
- if the runner does not support cancellation.
-
waitUntilFinish
PipelineResult.State waitUntilFinish(org.joda.time.Duration duration)
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:
java.lang.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:
java.lang.UnsupportedOperationException
- if the runner does not support waiting to finish.
-
metrics
@Experimental(METRICS) MetricResults metrics()
Returns the object to access metrics from the pipeline.- Throws:
java.lang.UnsupportedOperationException
- if the runner doesn't support retrieving metrics.
-
-