Package org.apache.iceberg.metrics
Class DefaultMetricsContext
java.lang.Object
org.apache.iceberg.metrics.DefaultMetricsContext
- All Implemented Interfaces:
Serializable
,MetricsContext
A default
MetricsContext
implementation that uses native Java counters/timers.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.iceberg.metrics.MetricsContext
MetricsContext.Counter<T extends Number>, MetricsContext.Unit
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T extends Number>
MetricsContext.Counter<T> counter
(String name, Class<T> type, MetricsContext.Unit unit) Deprecated.counter
(String name, MetricsContext.Unit unit) Get a named counter.Get a named timer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.iceberg.metrics.MetricsContext
counter, initialize
-
Constructor Details
-
DefaultMetricsContext
public DefaultMetricsContext()
-
-
Method Details
-
counter
@Deprecated public <T extends Number> MetricsContext.Counter<T> counter(String name, Class<T> type, MetricsContext.Unit unit) Deprecated.will be removed in 2.0.0, useCounter
instead.Description copied from interface:MetricsContext
Get a named counter of a specific type. Metric implementations may impose restrictions on what types are supported for specific counters.- Specified by:
counter
in interfaceMetricsContext
- Parameters:
name
- name of the metrictype
- numeric type of the counter valueunit
- the unit designation of the metric- Returns:
- a counter implementation
-
timer
Description copied from interface:MetricsContext
Get a named timer.- Specified by:
timer
in interfaceMetricsContext
- Parameters:
name
- name of the metricunit
- the time unit designation of the metric- Returns:
- a timer implementation
-
counter
Description copied from interface:MetricsContext
Get a named counter.- Specified by:
counter
in interfaceMetricsContext
- Parameters:
name
- The name of the counterunit
- The unit designation of the counter- Returns:
- a
Counter
implementation
-
histogram
- Specified by:
histogram
in interfaceMetricsContext
-
Counter
instead.