Class DeploymentStateTimeMetrics
java.lang.Object
org.apache.flink.runtime.scheduler.metrics.DeploymentStateTimeMetrics
- All Implemented Interfaces:
ExecutionStateUpdateListener,MetricsRegistrar,StateTimeMetric
public class DeploymentStateTimeMetrics
extends Object
implements ExecutionStateUpdateListener, StateTimeMetric, MetricsRegistrar
Metrics that capture how long a job was deploying tasks.
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 Summary
ConstructorsConstructorDescriptionDeploymentStateTimeMetrics(JobType semantic, org.apache.flink.configuration.MetricOptions.JobStatusMetricsSettings stateTimeMetricsSettings) -
Method Summary
Modifier and TypeMethodDescriptionlongReturns 1 if we are in the targeted state, otherwise 0.longReturns the time, in milliseconds, that have elapsed since we transitioned to the targeted state.longReturns the total time, in milliseconds, that we have spent in the targeted state.voidonStateUpdate(ExecutionAttemptID execution, ExecutionState previousState, ExecutionState newState) voidregisterMetrics(org.apache.flink.metrics.MetricGroup metricGroup)
-
Constructor Details
-
DeploymentStateTimeMetrics
public DeploymentStateTimeMetrics(JobType semantic, org.apache.flink.configuration.MetricOptions.JobStatusMetricsSettings stateTimeMetricsSettings)
-
-
Method Details
-
getCurrentTime
public long getCurrentTime()Description copied from interface:StateTimeMetricReturns the time, in milliseconds, that have elapsed since we transitioned to the targeted state. Returns 0 if we are not in the targeted state.- Specified by:
getCurrentTimein interfaceStateTimeMetric
-
getTotalTime
public long getTotalTime()Description copied from interface:StateTimeMetricReturns the total time, in milliseconds, that we have spent in the targeted state.- Specified by:
getTotalTimein interfaceStateTimeMetric
-
getBinary
public long getBinary()Description copied from interface:StateTimeMetricReturns 1 if we are in the targeted state, otherwise 0.- Specified by:
getBinaryin interfaceStateTimeMetric
-
registerMetrics
public void registerMetrics(org.apache.flink.metrics.MetricGroup metricGroup) - Specified by:
registerMetricsin interfaceMetricsRegistrar
-
onStateUpdate
public void onStateUpdate(ExecutionAttemptID execution, ExecutionState previousState, ExecutionState newState) - Specified by:
onStateUpdatein interfaceExecutionStateUpdateListener
-