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,
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(MetricGroup metricGroup) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCurrentTimeMetricName, getStateMetricName, getTotalTimeMetricName, register
public DeploymentStateTimeMetrics(JobType semantic, MetricOptions.JobStatusMetricsSettings stateTimeMetricsSettings)
public long getCurrentTime()
StateTimeMetric
getCurrentTime
in interface StateTimeMetric
public long getTotalTime()
StateTimeMetric
getTotalTime
in interface StateTimeMetric
public long getBinary()
StateTimeMetric
getBinary
in interface StateTimeMetric
public void registerMetrics(MetricGroup metricGroup)
registerMetrics
in interface MetricsRegistrar
public void onStateUpdate(ExecutionAttemptID execution, ExecutionState previousState, ExecutionState newState)
onStateUpdate
in interface ExecutionStateUpdateListener
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.