public class MonitoringUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
MonitoringUtil.JobMessagesHandler
An interface that can be used for defining callbacks to receive a list of JobMessages
containing monitoring information.
|
static class |
MonitoringUtil.LoggingHandler
A handler that logs monitoring messages.
|
static class |
MonitoringUtil.TimeStampComparator
Comparator for sorting rows in increasing order based on timestamp.
|
Constructor and Description |
---|
MonitoringUtil(DataflowClient dataflowClient)
Construct a helper for monitoring.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getGcloudCancelCommand(DataflowPipelineOptions options,
java.lang.String jobId) |
java.util.List<com.google.api.services.dataflow.model.JobMessage> |
getJobMessages(java.lang.String jobId,
long startTimestampMs)
Return job messages sorted in ascending order by timestamp.
|
static java.lang.String |
getJobMonitoringPageURL(java.lang.String projectName,
java.lang.String jobId)
Deprecated.
this method defaults the region to "us-central1". Prefer using the overload with an
explicit regionId parameter.
|
static java.lang.String |
getJobMonitoringPageURL(java.lang.String projectName,
java.lang.String regionId,
java.lang.String jobId) |
static PipelineResult.State |
toState(java.lang.String stateName) |
public MonitoringUtil(DataflowClient dataflowClient)
public java.util.List<com.google.api.services.dataflow.model.JobMessage> getJobMessages(java.lang.String jobId, long startTimestampMs) throws java.io.IOException
jobId
- The id of the job to get the messages for.startTimestampMs
- Return only those messages with a timestamp greater than this value.java.io.IOException
@Deprecated public static java.lang.String getJobMonitoringPageURL(java.lang.String projectName, java.lang.String jobId)
public static java.lang.String getJobMonitoringPageURL(java.lang.String projectName, java.lang.String regionId, java.lang.String jobId)
public static java.lang.String getGcloudCancelCommand(DataflowPipelineOptions options, java.lang.String jobId)
public static PipelineResult.State toState(java.lang.String stateName)