@Evolving
public interface CustomMetric
CustomTaskMetric
and combine the metrics at the driver side. How to combine task metrics is defined by the
metric class with the same metric name.
When Spark needs to aggregate task metrics, it will internally construct the instance of
custom metric class defined in data source by using reflection. Spark requires the class
implementing this interface to have a 0-arg constructor.Modifier and Type | Field and Description |
---|---|
static long |
initialValue
The initial value of this metric.
|
Modifier and Type | Method and Description |
---|---|
String |
aggregateTaskMetrics(long[] taskMetrics)
Given an array of task metric values, returns aggregated final metric value.
|
String |
description()
Returns the description of custom metric.
|
String |
name()
Returns the name of custom metric.
|
static final long initialValue