Class SubTaskInitializationMetricsBuilder
- java.lang.Object
-
- org.apache.flink.runtime.checkpoint.SubTaskInitializationMetricsBuilder
-
@ThreadSafe public class SubTaskInitializationMetricsBuilder extends Object
A builder forSubTaskInitializationMetrics
. Class isThreadSafe
to allow using it from async threads when used by state backends.
-
-
Constructor Summary
Constructors Constructor Description SubTaskInitializationMetricsBuilder(long initializationStartTs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubTaskInitializationMetricsBuilder
addDurationMetric(String name, long value)
This adds a custom "duration" type metric, handled and aggregated by theJobInitializationMetricsBuilder
.SubTaskInitializationMetrics
build()
SubTaskInitializationMetrics
build(long endTs)
long
getInitializationStartTs()
SubTaskInitializationMetricsBuilder
setStatus(InitializationStatus status)
-
-
-
Method Detail
-
getInitializationStartTs
public long getInitializationStartTs()
-
addDurationMetric
public SubTaskInitializationMetricsBuilder addDurationMetric(String name, long value)
This adds a custom "duration" type metric, handled and aggregated by theJobInitializationMetricsBuilder
. If a metric with the given name already exists the old and the new values will be added together.
-
setStatus
public SubTaskInitializationMetricsBuilder setStatus(InitializationStatus status)
-
build
public SubTaskInitializationMetrics build()
-
build
@VisibleForTesting public SubTaskInitializationMetrics build(long endTs)
-
-