Class HadoopMetricsContext

java.lang.Object
org.apache.iceberg.hadoop.HadoopMetricsContext
All Implemented Interfaces:
Serializable, FileIOMetricsContext, MetricsContext

public class HadoopMetricsContext extends Object implements FileIOMetricsContext
FileIO Metrics implementation that delegates to Hadoop FileSystem statistics implementation using the provided scheme.
See Also:
  • Field Details

  • Constructor Details

    • HadoopMetricsContext

      public HadoopMetricsContext(String scheme)
  • Method Details

    • initialize

      public void initialize(Map<String,String> properties)
      Specified by:
      initialize in interface MetricsContext
    • counter

      public <T extends Number> MetricsContext.Counter<T> counter(String name, 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 interface MetricsContext
      Type Parameters:
      T - Counter numeric type
      Parameters:
      name - name of the metric
      type - numeric type of the counter value
      unit - ignored
      Returns:
      counter
    • counter

      public Counter counter(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 interface MetricsContext
      Parameters:
      name - name of the metric
      unit - ignored
      Returns:
      counter