Class DataflowClient


  • public class DataflowClient
    extends java.lang.Object
    Wrapper around the generated Dataflow client to provide common functionality.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static DataflowClient create​(DataflowPipelineOptions options)  
      com.google.api.services.dataflow.model.Job createJob​(com.google.api.services.dataflow.model.Job job)
      Creates the Dataflow Job.
      com.google.api.services.dataflow.model.Job getJob​(java.lang.String jobId)
      Gets the Dataflow Job with the given jobId.
      com.google.api.services.dataflow.model.JobMetrics getJobMetrics​(java.lang.String jobId)
      Gets the JobMetrics with the given jobId.
      com.google.api.services.dataflow.model.LeaseWorkItemResponse leaseWorkItem​(java.lang.String jobId, com.google.api.services.dataflow.model.LeaseWorkItemRequest request)
      Leases the work item for jobId.
      com.google.api.services.dataflow.model.ListJobMessagesResponse listJobMessages​(java.lang.String jobId, @Nullable java.lang.String pageToken)
      Lists job messages with the given jobId.
      com.google.api.services.dataflow.model.ListJobsResponse listJobs​(@Nullable java.lang.String pageToken)
      Lists Dataflow Jobs in the project associated with the DataflowPipelineOptions.
      com.google.api.services.dataflow.model.ReportWorkItemStatusResponse reportWorkItemStatus​(java.lang.String jobId, com.google.api.services.dataflow.model.ReportWorkItemStatusRequest request)
      Reports the status of the work item for jobId.
      com.google.api.services.dataflow.model.Job updateJob​(java.lang.String jobId, com.google.api.services.dataflow.model.Job content)
      Updates the Dataflow Job with the given jobId.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • createJob

        public com.google.api.services.dataflow.model.Job createJob​(@Nonnull
                                                                    com.google.api.services.dataflow.model.Job job)
                                                             throws java.io.IOException
        Creates the Dataflow Job.
        Throws:
        java.io.IOException
      • listJobs

        public com.google.api.services.dataflow.model.ListJobsResponse listJobs​(@Nullable java.lang.String pageToken)
                                                                         throws java.io.IOException
        Lists Dataflow Jobs in the project associated with the DataflowPipelineOptions.
        Throws:
        java.io.IOException
      • updateJob

        public com.google.api.services.dataflow.model.Job updateJob​(@Nonnull
                                                                    java.lang.String jobId,
                                                                    @Nonnull
                                                                    com.google.api.services.dataflow.model.Job content)
                                                             throws java.io.IOException
        Updates the Dataflow Job with the given jobId.
        Throws:
        java.io.IOException
      • getJob

        public com.google.api.services.dataflow.model.Job getJob​(@Nonnull
                                                                 java.lang.String jobId)
                                                          throws java.io.IOException
        Gets the Dataflow Job with the given jobId.
        Throws:
        java.io.IOException
      • getJobMetrics

        public com.google.api.services.dataflow.model.JobMetrics getJobMetrics​(@Nonnull
                                                                               java.lang.String jobId)
                                                                        throws java.io.IOException
        Gets the JobMetrics with the given jobId.
        Throws:
        java.io.IOException
      • listJobMessages

        public com.google.api.services.dataflow.model.ListJobMessagesResponse listJobMessages​(@Nonnull
                                                                                              java.lang.String jobId,
                                                                                              @Nullable java.lang.String pageToken)
                                                                                       throws java.io.IOException
        Lists job messages with the given jobId.
        Throws:
        java.io.IOException
      • leaseWorkItem

        public com.google.api.services.dataflow.model.LeaseWorkItemResponse leaseWorkItem​(@Nonnull
                                                                                          java.lang.String jobId,
                                                                                          @Nonnull
                                                                                          com.google.api.services.dataflow.model.LeaseWorkItemRequest request)
                                                                                   throws java.io.IOException
        Leases the work item for jobId.
        Throws:
        java.io.IOException
      • reportWorkItemStatus

        public com.google.api.services.dataflow.model.ReportWorkItemStatusResponse reportWorkItemStatus​(@Nonnull
                                                                                                        java.lang.String jobId,
                                                                                                        @Nonnull
                                                                                                        com.google.api.services.dataflow.model.ReportWorkItemStatusRequest request)
                                                                                                 throws java.io.IOException
        Reports the status of the work item for jobId.
        Throws:
        java.io.IOException