org.apache.hadoop.hbase.regionserver.metrics
Class RegionMetricsStorage

java.lang.Object
  extended by org.apache.hadoop.hbase.regionserver.metrics.RegionMetricsStorage

public class RegionMetricsStorage
extends Object

This class if for maintaining the maps used to power metrics for hfiles, regions, and regionservers. It has methods to mutate and get state of metrics numbers. These numbers are exposed to Hadoop metrics through RegionServerDynamicMetrics.


Constructor Summary
RegionMetricsStorage()
           
 
Method Summary
static void clear(String regionEncodedName)
          Clear the timevarying and numeric metrics for all regions in this region server Clear the numericPersistentMerics for only the region being closed.
static long getNumericMetric(String key)
           
static Map<String,AtomicLong> getNumericMetrics()
           
static long getNumericPersistentMetric(String key)
           
static Map<String,AtomicLong> getNumericPersistentMetrics()
           
static Pair<Long,Integer> getTimeVaryingMetric(String key)
           
static Map<String,Pair<AtomicLong,AtomicInteger>> getTimeVaryingMetrics()
           
static void incrNumericMetric(String key, long amount)
           
static void incrNumericPersistentMetric(String key, long amount)
           
static void incrTimeVaryingMetric(String key, long amount)
           
static void setNumericMetric(String key, long amount)
           
static void setNumericPersistentMetric(String key, long amount)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegionMetricsStorage

public RegionMetricsStorage()
Method Detail

getNumericMetrics

public static Map<String,AtomicLong> getNumericMetrics()

getNumericPersistentMetrics

public static Map<String,AtomicLong> getNumericPersistentMetrics()

getTimeVaryingMetrics

public static Map<String,Pair<AtomicLong,AtomicInteger>> getTimeVaryingMetrics()

incrNumericMetric

public static void incrNumericMetric(String key,
                                     long amount)

incrTimeVaryingMetric

public static void incrTimeVaryingMetric(String key,
                                         long amount)

setNumericPersistentMetric

public static void setNumericPersistentMetric(String key,
                                              long amount)

incrNumericPersistentMetric

public static void incrNumericPersistentMetric(String key,
                                               long amount)

setNumericMetric

public static void setNumericMetric(String key,
                                    long amount)

getNumericMetric

public static long getNumericMetric(String key)

getTimeVaryingMetric

public static Pair<Long,Integer> getTimeVaryingMetric(String key)

getNumericPersistentMetric

public static long getNumericPersistentMetric(String key)

clear

public static void clear(String regionEncodedName)
Clear the timevarying and numeric metrics for all regions in this region server Clear the numericPersistentMerics for only the region being closed.



Copyright © 2014 The Apache Software Foundation. All Rights Reserved.