Class MonitoringUtil
java.lang.Object
org.apache.beam.runners.dataflow.util.MonitoringUtil
A helper class for monitoring jobs submitted to the service.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAn interface that can be used for defining callbacks to receive a list of JobMessages containing monitoring information.static classA handler that logs monitoring messages.static classComparator for sorting rows in increasing order based on timestamp. -
Constructor Summary
ConstructorsConstructorDescriptionMonitoringUtil(DataflowClient dataflowClient) Construct a helper for monitoring. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetGcloudCancelCommand(DataflowPipelineOptions options, String jobId) getJobMessages(String jobId, long startTimestampMs) Return job messages sorted in ascending order by timestamp.static StringgetJobMonitoringPageURL(String projectName, String jobId) Deprecated.this method defaults the region to "us-central1".static StringgetJobMonitoringPageURL(String projectName, String regionId, String jobId) static PipelineResult.State
-
Constructor Details
-
MonitoringUtil
Construct a helper for monitoring.
-
-
Method Details
-
getJobMessages
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.this method defaults the region to "us-central1". Prefer using the overload with an explicit regionId parameter. -
getJobMonitoringPageURL
-
getGcloudCancelCommand
-
toState
-