Interface CountersAndGauges

All Superinterfaces:
org.apache.hadoop.fs.statistics.DurationTrackerFactory
All Known Subinterfaces:
S3AStatisticsContext
All Known Implementing Classes:
BondedS3AStatisticsContext, EmptyS3AStatisticsContext, S3AInstrumentation

public interface CountersAndGauges extends org.apache.hadoop.fs.statistics.DurationTrackerFactory
This is the foundational API for collecting S3A statistics.
  • Method Details

    • incrementCounter

      void incrementCounter(Statistic op, long count)
      Increment a specific counter. No-op if not defined.
      Parameters:
      op - operation
      count - increment value
    • incrementGauge

      void incrementGauge(Statistic op, long count)
      Increment a specific gauge. No-op if not defined.
      Parameters:
      op - operation
      count - increment value
      Throws:
      ClassCastException - if the metric is of the wrong type
    • decrementGauge

      void decrementGauge(Statistic op, long count)
      Decrement a specific gauge. No-op if not defined.
      Parameters:
      op - operation
      count - increment value
      Throws:
      ClassCastException - if the metric is of the wrong type
    • addValueToQuantiles

      void addValueToQuantiles(Statistic op, long value)
      Add a value to a quantiles statistic. No-op if the quantile isn't found.
      Parameters:
      op - operation to look up.
      value - value to add.
      Throws:
      ClassCastException - if the metric is not a Quantiles.
    • recordDuration

      void recordDuration(Statistic op, boolean success, Duration duration)
      Record a duration.
      Parameters:
      op - operation
      success - was the operation a success?
      duration - how long did it take