public class DataflowPipelineJob
extends java.lang.Object
implements org.apache.beam.sdk.PipelineResult
DataflowRunner.| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
jobId
The id for the job.
|
protected static org.apache.beam.sdk.util.FluentBackoff |
STATUS_BACKOFF_FACTORY |
protected org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.BiMap<org.apache.beam.sdk.runners.AppliedPTransform<?,?,?>,java.lang.String> |
transformStepNames |
| Constructor and Description |
|---|
DataflowPipelineJob(DataflowClient dataflowClient,
java.lang.String jobId,
DataflowPipelineOptions dataflowOptions,
java.util.Map<org.apache.beam.sdk.runners.AppliedPTransform<?,?,?>,java.lang.String> transformStepNames)
Constructs the job.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.beam.sdk.PipelineResult.State |
cancel() |
DataflowPipelineOptions |
getDataflowOptions() |
java.lang.String |
getJobId()
Get the id of this job.
|
java.lang.String |
getProjectId()
Get the project this job exists in.
|
java.lang.String |
getRegion()
Get the region this job exists in.
|
DataflowPipelineJob |
getReplacedByJob()
Returns a new
DataflowPipelineJob for the job that replaced this one, if applicable. |
org.apache.beam.sdk.PipelineResult.State |
getState() |
org.apache.beam.sdk.metrics.MetricResults |
metrics() |
org.apache.beam.sdk.PipelineResult.State |
waitUntilFinish() |
org.apache.beam.sdk.PipelineResult.State |
waitUntilFinish(org.joda.time.Duration duration) |
org.apache.beam.sdk.PipelineResult.State |
waitUntilFinish(org.joda.time.Duration duration,
MonitoringUtil.JobMessagesHandler messageHandler)
Waits until the pipeline finishes and returns the final status.
|
protected java.lang.String jobId
protected org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.BiMap<org.apache.beam.sdk.runners.AppliedPTransform<?,?,?>,java.lang.String> transformStepNames
protected static final org.apache.beam.sdk.util.FluentBackoff STATUS_BACKOFF_FACTORY
public DataflowPipelineJob(DataflowClient dataflowClient, java.lang.String jobId, DataflowPipelineOptions dataflowOptions, java.util.Map<org.apache.beam.sdk.runners.AppliedPTransform<?,?,?>,java.lang.String> transformStepNames)
jobId - the job iddataflowOptions - used to configure the client for the Dataflow ServicetransformStepNames - a mapping from AppliedPTransforms to Step Namespublic java.lang.String getJobId()
public java.lang.String getProjectId()
public DataflowPipelineOptions getDataflowOptions()
public java.lang.String getRegion()
public DataflowPipelineJob getReplacedByJob()
DataflowPipelineJob for the job that replaced this one, if applicable.java.lang.IllegalStateException - if called before the job has terminated or if the job terminated
but was not updated@Nullable public org.apache.beam.sdk.PipelineResult.State waitUntilFinish()
waitUntilFinish in interface org.apache.beam.sdk.PipelineResult@Nullable public org.apache.beam.sdk.PipelineResult.State waitUntilFinish(org.joda.time.Duration duration)
waitUntilFinish in interface org.apache.beam.sdk.PipelineResult@Nullable
public org.apache.beam.sdk.PipelineResult.State waitUntilFinish(org.joda.time.Duration duration,
MonitoringUtil.JobMessagesHandler messageHandler)
throws java.io.IOException,
java.lang.InterruptedException
duration - The time to wait for the job to finish. Provide a value less than 1 ms for an
infinite wait.messageHandler - If non null this handler will be invoked for each batch of messages
received.java.io.IOException - If there is a persistent problem getting job information.java.lang.InterruptedExceptionpublic org.apache.beam.sdk.PipelineResult.State cancel()
throws java.io.IOException
cancel in interface org.apache.beam.sdk.PipelineResultjava.io.IOExceptionpublic org.apache.beam.sdk.PipelineResult.State getState()
getState in interface org.apache.beam.sdk.PipelineResultpublic org.apache.beam.sdk.metrics.MetricResults metrics()
metrics in interface org.apache.beam.sdk.PipelineResult