public class DeploymentStateTimeMetrics extends Object implements ExecutionStateUpdateListener, StateTimeMetric, MetricsRegistrar
These metrics differentiate between batch & streaming use-cases:
Batch: Measures from the start of the first deployment until the first task has been deployed. From that point the job is making progress.
Streaming: Measures from the start of the first deployment until all tasks have been deployed. From that point on checkpoints can be triggered, and thus progress be made.
| Constructor and Description |
|---|
DeploymentStateTimeMetrics(JobType semantic,
org.apache.flink.configuration.MetricOptions.JobStatusMetricsSettings stateTimeMetricsSettings) |
| Modifier and Type | Method and Description |
|---|---|
long |
getBinary()
Returns 1 if we are in the targeted state, otherwise 0.
|
long |
getCurrentTime()
Returns the time, in milliseconds, that have elapsed since we transitioned to the targeted
state.
|
long |
getTotalTime()
Returns the total time, in milliseconds, that we have spent in the targeted state.
|
void |
onStateUpdate(ExecutionAttemptID execution,
ExecutionState previousState,
ExecutionState newState) |
void |
registerMetrics(org.apache.flink.metrics.MetricGroup metricGroup) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCurrentTimeMetricName, getStateMetricName, getTotalTimeMetricName, registerpublic DeploymentStateTimeMetrics(JobType semantic, org.apache.flink.configuration.MetricOptions.JobStatusMetricsSettings stateTimeMetricsSettings)
public long getCurrentTime()
StateTimeMetricgetCurrentTime in interface StateTimeMetricpublic long getTotalTime()
StateTimeMetricgetTotalTime in interface StateTimeMetricpublic long getBinary()
StateTimeMetricgetBinary in interface StateTimeMetricpublic void registerMetrics(org.apache.flink.metrics.MetricGroup metricGroup)
registerMetrics in interface MetricsRegistrarpublic void onStateUpdate(ExecutionAttemptID execution, ExecutionState previousState, ExecutionState newState)
onStateUpdate in interface ExecutionStateUpdateListenerCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.