public final class MonitoringUtil extends 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.PrintHandler
A handler that prints monitoring messages to a stream.
|
static class |
MonitoringUtil.TimeStampComparator
Comparator for sorting rows in increasing order based on timestamp.
|
| Constructor and Description |
|---|
MonitoringUtil(String projectId,
com.google.api.services.dataflow.Dataflow dataflow)
Construct a helper for monitoring.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
getGcloudCancelCommand(DataflowPipelineOptions options,
String jobId) |
ArrayList<com.google.api.services.dataflow.model.JobMessage> |
getJobMessages(String jobId,
long startTimestampMs)
Return job messages sorted in ascending order by timestamp.
|
static String |
getJobMonitoringPageURL(String projectName,
String jobId) |
static PipelineResult.State |
toState(String stateName) |
public MonitoringUtil(String projectId, com.google.api.services.dataflow.Dataflow dataflow)
public ArrayList<com.google.api.services.dataflow.model.JobMessage> getJobMessages(String jobId, long startTimestampMs) throws IOException
jobId - The id of the job to get the messages for.startTimestampMs - Return only those messages with a
timestamp greater than this value.IOExceptionpublic static String getJobMonitoringPageURL(String projectName, String jobId)
public static String getGcloudCancelCommand(DataflowPipelineOptions options, String jobId)
public static PipelineResult.State toState(String stateName)