org.apache.hadoop.metrics2.lib
Class MetricMutableRangeHistogram

java.lang.Object
  extended by org.apache.hadoop.metrics2.lib.MetricMutable
      extended by org.apache.hadoop.metrics2.lib.MetricMutableHistogram
          extended by org.apache.hadoop.metrics2.lib.MetricMutableRangeHistogram
All Implemented Interfaces:
MetricHistogram
Direct Known Subclasses:
MetricMutableSizeHistogram, MetricMutableTimeHistogram

@InterfaceAudience.Private
public abstract class MetricMutableRangeHistogram
extends MetricMutableHistogram

Extended histogram implementation with metric range counters.


Field Summary
 
Fields inherited from class org.apache.hadoop.metrics2.lib.MetricMutable
description, name
 
Fields inherited from interface org.apache.hadoop.metrics2.MetricHistogram
MAX_METRIC_NAME, MEAN_METRIC_NAME, MEDIAN_METRIC_NAME, MIN_METRIC_NAME, NINETIETH_PERCENTILE_METRIC_NAME, NINETY_FIFTH_PERCENTILE_METRIC_NAME, NINETY_NINETH_PERCENTILE_METRIC_NAME, NUM_OPS_METRIC_NAME, SEVENTY_FIFTH_PERCENTILE_METRIC_NAME
 
Constructor Summary
MetricMutableRangeHistogram(String name, String description)
           
 
Method Summary
 void add(long val)
          Add a single value to a histogram's stream of values.
abstract  long[] getRange()
          Returns the ranges to be counted
abstract  String getRangeType()
          Returns the type of range histogram size or time
abstract  AtomicLongArray getRangeVals()
          Returns the range counts
 void snapshot(org.apache.hadoop.metrics2.MetricsRecordBuilder metricsRecordBuilder, boolean all)
           
 void updateSnapshotRangeMetrics(org.apache.hadoop.metrics2.MetricsRecordBuilder metricsRecordBuilder)
           
 
Methods inherited from class org.apache.hadoop.metrics2.lib.MetricMutableHistogram
getMax, getMean, getMin, updateSnapshotMetrics
 
Methods inherited from class org.apache.hadoop.metrics2.lib.MetricMutable
changed, clearChanged, setChanged, snapshot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetricMutableRangeHistogram

public MetricMutableRangeHistogram(String name,
                                   String description)
Method Detail

getRangeType

public abstract String getRangeType()
Returns the type of range histogram size or time


getRange

public abstract long[] getRange()
Returns the ranges to be counted


getRangeVals

public abstract AtomicLongArray getRangeVals()
Returns the range counts


add

public void add(long val)
Description copied from interface: MetricHistogram
Add a single value to a histogram's stream of values.

Specified by:
add in interface MetricHistogram
Overrides:
add in class MetricMutableHistogram

snapshot

public void snapshot(org.apache.hadoop.metrics2.MetricsRecordBuilder metricsRecordBuilder,
                     boolean all)
Overrides:
snapshot in class MetricMutableHistogram

updateSnapshotRangeMetrics

public void updateSnapshotRangeMetrics(org.apache.hadoop.metrics2.MetricsRecordBuilder metricsRecordBuilder)


Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.