Class MonitoringUtil

java.lang.Object
org.apache.beam.runners.dataflow.util.MonitoringUtil

public class MonitoringUtil extends Object
A helper class for monitoring jobs submitted to the service.
  • Constructor Details

    • MonitoringUtil

      public MonitoringUtil(DataflowClient dataflowClient)
      Construct a helper for monitoring.
  • Method Details

    • getJobMessages

      public List<JobMessage> getJobMessages(String jobId, long startTimestampMs) throws IOException
      Return job messages sorted in ascending order by timestamp.
      Parameters:
      jobId - The id of the job to get the messages for.
      startTimestampMs - Return only those messages with a timestamp greater than this value.
      Returns:
      collection of messages
      Throws:
      IOException
    • getJobMonitoringPageURL

      @Deprecated public static String getJobMonitoringPageURL(String projectName, String jobId)
      Deprecated.
      this method defaults the region to "us-central1". Prefer using the overload with an explicit regionId parameter.
    • getJobMonitoringPageURL

      public static String getJobMonitoringPageURL(String projectName, String regionId, String jobId)
    • getGcloudCancelCommand

      public static String getGcloudCancelCommand(DataflowPipelineOptions options, String jobId)
    • toState

      public static PipelineResult.State toState(@Nullable String stateName)