Class MetricsAccumulator
- java.lang.Object
-
- org.apache.spark.util.AccumulatorV2<org.apache.beam.runners.core.metrics.MetricsContainerStepMap,org.apache.beam.runners.core.metrics.MetricsContainerStepMap>
-
- org.apache.beam.runners.spark.structuredstreaming.metrics.MetricsAccumulator
-
- All Implemented Interfaces:
java.io.Serializable,scala.Serializable
public class MetricsAccumulator extends org.apache.spark.util.AccumulatorV2<org.apache.beam.runners.core.metrics.MetricsContainerStepMap,org.apache.beam.runners.core.metrics.MetricsContainerStepMap>AccumulatorV2for Beam metrics captured inMetricsContainerStepMap.- See Also:
- accumulatorsV2, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MetricsAccumulator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(org.apache.beam.runners.core.metrics.MetricsContainerStepMap other)static voidclear()MetricsAccumulatorcopy()static MetricsAccumulatorgetInstance(org.apache.spark.sql.SparkSession session)Get theMetricsAccumulatoron this driver.booleanisZero()voidmerge(org.apache.spark.util.AccumulatorV2<org.apache.beam.runners.core.metrics.MetricsContainerStepMap,org.apache.beam.runners.core.metrics.MetricsContainerStepMap> other)voidreset()org.apache.beam.runners.core.metrics.MetricsContainerStepMapvalue()
-
-
-
Method Detail
-
isZero
public boolean isZero()
- Specified by:
isZeroin classorg.apache.spark.util.AccumulatorV2<org.apache.beam.runners.core.metrics.MetricsContainerStepMap,org.apache.beam.runners.core.metrics.MetricsContainerStepMap>
-
copy
public MetricsAccumulator copy()
- Specified by:
copyin classorg.apache.spark.util.AccumulatorV2<org.apache.beam.runners.core.metrics.MetricsContainerStepMap,org.apache.beam.runners.core.metrics.MetricsContainerStepMap>
-
reset
public void reset()
- Specified by:
resetin classorg.apache.spark.util.AccumulatorV2<org.apache.beam.runners.core.metrics.MetricsContainerStepMap,org.apache.beam.runners.core.metrics.MetricsContainerStepMap>
-
add
public void add(org.apache.beam.runners.core.metrics.MetricsContainerStepMap other)
- Specified by:
addin classorg.apache.spark.util.AccumulatorV2<org.apache.beam.runners.core.metrics.MetricsContainerStepMap,org.apache.beam.runners.core.metrics.MetricsContainerStepMap>
-
merge
public void merge(org.apache.spark.util.AccumulatorV2<org.apache.beam.runners.core.metrics.MetricsContainerStepMap,org.apache.beam.runners.core.metrics.MetricsContainerStepMap> other)
- Specified by:
mergein classorg.apache.spark.util.AccumulatorV2<org.apache.beam.runners.core.metrics.MetricsContainerStepMap,org.apache.beam.runners.core.metrics.MetricsContainerStepMap>
-
value
public org.apache.beam.runners.core.metrics.MetricsContainerStepMap value()
- Specified by:
valuein classorg.apache.spark.util.AccumulatorV2<org.apache.beam.runners.core.metrics.MetricsContainerStepMap,org.apache.beam.runners.core.metrics.MetricsContainerStepMap>
-
getInstance
public static MetricsAccumulator getInstance(org.apache.spark.sql.SparkSession session)
Get theMetricsAccumulatoron this driver. If there's no such accumulator yet, it will be created and registered using the providedSparkSession.
-
clear
public static void clear()
-
-