DataflowPipelineJob (Google Cloud Dataflow SDK 1.9.1 API)

Google Cloud Dataflow SDK for Java, version 1.9.1

com.google.cloud.dataflow.sdk.runners

Class DataflowPipelineJob

    • Field Detail

      • STATUS_BACKOFF_FACTORY

        protected static final com.google.cloud.dataflow.sdk.util.FluentBackoff STATUS_BACKOFF_FACTORY
    • Constructor Detail

      • DataflowPipelineJob

        public DataflowPipelineJob(String projectId,
                                   String jobId,
                                   com.google.api.services.dataflow.Dataflow dataflowClient,
                                   com.google.cloud.dataflow.sdk.runners.dataflow.DataflowAggregatorTransforms aggregatorTransforms)
        Constructs the job.
        Parameters:
        projectId - the project id
        jobId - the job id
        dataflowClient - the client for the Dataflow Service
    • Method Detail

      • getJobId

        public String getJobId()
        Get the id of this job.
      • getProjectId

        public String getProjectId()
        Get the project this job exists in.
      • getDataflowClient

        public com.google.api.services.dataflow.Dataflow getDataflowClient()
        Get the Cloud Dataflow API Client used by this job.
      • waitToFinish

        @Nullable
        public PipelineResult.State waitToFinish(long timeToWait,
                                                           TimeUnit timeUnit,
                                                           com.google.cloud.dataflow.sdk.util.MonitoringUtil.JobMessagesHandler messageHandler)
                                                    throws IOException,
                                                           InterruptedException
        Waits for the job to finish and return the final status.
        Parameters:
        timeToWait - The time to wait in units timeUnit for the job to finish. Provide a value less than 1 ms for an infinite wait.
        timeUnit - The unit of time for timeToWait.
        messageHandler - If non null this handler will be invoked for each batch of messages received.
        Returns:
        The final state of the job or null on timeout or if the thread is interrupted.
        Throws:
        IOException - If there is a persistent problem getting job information.
        InterruptedException
      • cancel

        public void cancel()
                    throws IOException
        Cancels the job.
        Throws:
        IOException - if there is a problem executing the cancel request.


Send feedback about...

Cloud Dataflow