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
.Constructor and Description |
---|
MetricsAccumulator() |
Modifier and Type | Method and Description |
---|---|
void |
add(org.apache.beam.runners.core.metrics.MetricsContainerStepMap other) |
static void |
clear() |
MetricsAccumulator |
copy() |
static MetricsAccumulator |
getInstance(org.apache.spark.sql.SparkSession session)
Get the
MetricsAccumulator 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() |
public boolean isZero()
isZero
in class org.apache.spark.util.AccumulatorV2<org.apache.beam.runners.core.metrics.MetricsContainerStepMap,org.apache.beam.runners.core.metrics.MetricsContainerStepMap>
public MetricsAccumulator copy()
copy
in class org.apache.spark.util.AccumulatorV2<org.apache.beam.runners.core.metrics.MetricsContainerStepMap,org.apache.beam.runners.core.metrics.MetricsContainerStepMap>
public void reset()
reset
in class org.apache.spark.util.AccumulatorV2<org.apache.beam.runners.core.metrics.MetricsContainerStepMap,org.apache.beam.runners.core.metrics.MetricsContainerStepMap>
public void add(org.apache.beam.runners.core.metrics.MetricsContainerStepMap other)
add
in class org.apache.spark.util.AccumulatorV2<org.apache.beam.runners.core.metrics.MetricsContainerStepMap,org.apache.beam.runners.core.metrics.MetricsContainerStepMap>
public void merge(org.apache.spark.util.AccumulatorV2<org.apache.beam.runners.core.metrics.MetricsContainerStepMap,org.apache.beam.runners.core.metrics.MetricsContainerStepMap> other)
merge
in class org.apache.spark.util.AccumulatorV2<org.apache.beam.runners.core.metrics.MetricsContainerStepMap,org.apache.beam.runners.core.metrics.MetricsContainerStepMap>
public org.apache.beam.runners.core.metrics.MetricsContainerStepMap value()
value
in class org.apache.spark.util.AccumulatorV2<org.apache.beam.runners.core.metrics.MetricsContainerStepMap,org.apache.beam.runners.core.metrics.MetricsContainerStepMap>
public static MetricsAccumulator getInstance(org.apache.spark.sql.SparkSession session)
MetricsAccumulator
on this driver. If there's no such accumulator yet, it will
be created and registered using the provided SparkSession
.public static void clear()