Class AbstractS3AStatisticsSource

java.lang.Object
org.apache.hadoop.fs.s3a.statistics.impl.AbstractS3AStatisticsSource
All Implemented Interfaces:
org.apache.hadoop.fs.statistics.DurationTrackerFactory, org.apache.hadoop.fs.statistics.IOStatisticsSource
Direct Known Subclasses:
S3AMultipartUploaderStatisticsImpl

public abstract class AbstractS3AStatisticsSource extends Object implements org.apache.hadoop.fs.statistics.IOStatisticsSource, org.apache.hadoop.fs.statistics.DurationTrackerFactory
Base class for implementing IOStatistics sources in the S3 module.

A lot of the methods are very terse, because S3AInstrumentation has verbose methods of similar names; the short ones always refer to the inner class and not any superclass method.

  • Constructor Details

    • AbstractS3AStatisticsSource

      protected AbstractS3AStatisticsSource()
  • Method Details

    • getIOStatistics

      public org.apache.hadoop.fs.statistics.impl.IOStatisticsStore getIOStatistics()
      Specified by:
      getIOStatistics in interface org.apache.hadoop.fs.statistics.IOStatisticsSource
    • setIOStatistics

      protected void setIOStatistics(org.apache.hadoop.fs.statistics.impl.IOStatisticsStore statistics)
      Setter. this must be called in the subclass constructor with whatever
      Parameters:
      statistics - statistics to set
    • incCounter

      public long incCounter(String name)
      Increment a named counter by 1.
      Parameters:
      name - counter name
      Returns:
      the updated value or, if the counter is unknown: 0
    • incCounter

      public long incCounter(String name, long value)
      DefaultS3ClientFactoryDefaultS3ClientFactory Increment a named counter by 1.
      Parameters:
      name - counter name
      value - value to increment by
      Returns:
      the updated value or, if the counter is unknown: 0
    • lookupCounterValue

      public Long lookupCounterValue(String name)
    • lookupGaugeValue

      public Long lookupGaugeValue(String name)
    • incGauge

      public long incGauge(String name, long v)
    • incGauge

      public long incGauge(String name)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • trackDuration

      public org.apache.hadoop.fs.statistics.DurationTracker trackDuration(String key, long count)
      Specified by:
      trackDuration in interface org.apache.hadoop.fs.statistics.DurationTrackerFactory