DataflowPipelineJob (Google Cloud Dataflow SDK 1.9.1 API)

Google Cloud Dataflow SDK for Java, version 1.9.1

Class DataflowPipelineJob

    • Field Detail


        protected static final STATUS_BACKOFF_FACTORY
    • Constructor Detail

      • DataflowPipelineJob

        public DataflowPipelineJob(String projectId,
                                   String jobId,
        Constructs the job.
        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 getDataflowClient()
        Get the Cloud Dataflow API Client used by this job.
      • waitToFinish

        public PipelineResult.State waitToFinish(long timeToWait,
                                                           TimeUnit timeUnit,
                                                    throws IOException,
        Waits for the job to finish and return the final status.
        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.
        The final state of the job or null on timeout or if the thread is interrupted.
        IOException - If there is a persistent problem getting job information.
      • cancel

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