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:
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>
AccumulatorV2
for Beam metrics captured in MetricsContainerStepMap
.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(org.apache.beam.runners.core.metrics.MetricsContainerStepMap other) static void
clear()
copy()
static MetricsAccumulator
getInstance
(org.apache.spark.sql.SparkSession session) Get theMetricsAccumulator
on this driver.boolean
isZero()
void
merge
(org.apache.spark.util.AccumulatorV2<org.apache.beam.runners.core.metrics.MetricsContainerStepMap, org.apache.beam.runners.core.metrics.MetricsContainerStepMap> other) void
reset()
org.apache.beam.runners.core.metrics.MetricsContainerStepMap
value()
Methods inherited from class org.apache.spark.util.AccumulatorV2
copyAndReset, countFailedValues, id, isAtDriverSide, isRegistered, metadata, metadata_$eq, name, register, register$default$2, register$default$3, toInfo, toString, withBufferSerialized, writeReplace
-
Constructor Details
-
MetricsAccumulator
public MetricsAccumulator()
-
-
Method Details
-
isZero
public boolean isZero()- Specified by:
isZero
in classorg.apache.spark.util.AccumulatorV2<org.apache.beam.runners.core.metrics.MetricsContainerStepMap,
org.apache.beam.runners.core.metrics.MetricsContainerStepMap>
-
copy
- Specified by:
copy
in 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:
reset
in 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:
add
in 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:
merge
in 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:
value
in classorg.apache.spark.util.AccumulatorV2<org.apache.beam.runners.core.metrics.MetricsContainerStepMap,
org.apache.beam.runners.core.metrics.MetricsContainerStepMap>
-
getInstance
Get theMetricsAccumulator
on this driver. If there's no such accumulator yet, it will be created and registered using the providedSparkSession
. -
clear
public static void clear()
-