Search in sources :

Example 1 with S3AInstrumentation

use of org.apache.hadoop.fs.s3a.S3AInstrumentation in project hadoop by apache.

the class S3AScaleTestBase method gaugeValue.

/**
   * Get the gauge value of a statistic. Raises an assertion if
   * there is no such gauge.
   * @param statistic statistic to look up
   * @return the value.
   */
public long gaugeValue(Statistic statistic) {
    S3AInstrumentation instrumentation = getFileSystem().getInstrumentation();
    MutableGaugeLong gauge = instrumentation.lookupGauge(statistic.getSymbol());
    assertNotNull("No gauge " + statistic + " in " + instrumentation.dump("", " = ", "\n", true), gauge);
    return gauge.value();
}
Also used : MutableGaugeLong(org.apache.hadoop.metrics2.lib.MutableGaugeLong) S3AInstrumentation(org.apache.hadoop.fs.s3a.S3AInstrumentation)

Aggregations

S3AInstrumentation (org.apache.hadoop.fs.s3a.S3AInstrumentation)1 MutableGaugeLong (org.apache.hadoop.metrics2.lib.MutableGaugeLong)1