Package org.apache.iceberg.hadoop
Class HadoopMetricsContext
- java.lang.Object
-
- org.apache.iceberg.hadoop.HadoopMetricsContext
-
- All Implemented Interfaces:
java.io.Serializable
,FileIOMetricsContext
,MetricsContext
public class HadoopMetricsContext extends java.lang.Object implements FileIOMetricsContext
FileIO Metrics implementation that delegates to Hadoop FileSystem statistics implementation using the provided scheme.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.iceberg.metrics.MetricsContext
MetricsContext.Counter<T extends java.lang.Number>, MetricsContext.Unit
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
SCHEME
-
Fields inherited from interface org.apache.iceberg.io.FileIOMetricsContext
READ_BYTES, READ_OPERATIONS, WRITE_BYTES, WRITE_OPERATIONS
-
-
Constructor Summary
Constructors Constructor Description HadoopMetricsContext(java.lang.String scheme)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends java.lang.Number>
MetricsContext.Counter<T>counter(java.lang.String name, java.lang.Class<T> type, MetricsContext.Unit unit)
The Hadoop implementation delegates to the FileSystem.Statistics implementation and therefore does not require support for operations like unit() and count() as the counter values are not directly consumed.Counter
counter(java.lang.String name, MetricsContext.Unit unit)
The Hadoop implementation delegates to the FileSystem.Statistics implementation and therefore does not require support for operations like unit() as the counter values are not directly consumed.void
initialize(java.util.Map<java.lang.String,java.lang.String> properties)
-
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, histogram, timer
-
-
-
-
Field Detail
-
SCHEME
public static final java.lang.String SCHEME
- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public void initialize(java.util.Map<java.lang.String,java.lang.String> properties)
- Specified by:
initialize
in interfaceMetricsContext
-
counter
public <T extends java.lang.Number> MetricsContext.Counter<T> counter(java.lang.String name, java.lang.Class<T> type, MetricsContext.Unit unit)
The Hadoop implementation delegates to the FileSystem.Statistics implementation and therefore does not require support for operations like unit() and count() as the counter values are not directly consumed.- Specified by:
counter
in interfaceMetricsContext
- Type Parameters:
T
- Counter numeric type- Parameters:
name
- name of the metrictype
- numeric type of the counter valueunit
- ignored- Returns:
- counter
-
counter
public Counter counter(java.lang.String name, MetricsContext.Unit unit)
The Hadoop implementation delegates to the FileSystem.Statistics implementation and therefore does not require support for operations like unit() as the counter values are not directly consumed.- Specified by:
counter
in interfaceMetricsContext
- Parameters:
name
- name of the metricunit
- ignored- Returns:
- counter
-
-