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

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

public class OperationMetrics
extends Object

This class provides a simplified interface to expose time varying metrics about GET/DELETE/PUT/ICV operations on a region and on Column Families. All metrics are stored in RegionMetricsStorage and exposed to hadoop metrics through RegionServerDynamicMetrics.


Constructor Summary
OperationMetrics()
          This is used in creating a testing HRegion where the regionInfo is unknown
OperationMetrics(org.apache.hadoop.conf.Configuration conf, HRegionInfo regionInfo)
          Create a new OperationMetrics
 
Method Summary
 void closeMetrics()
          This deletes all old metrics this instance has ever created or updated.
 void updateAppendMetrics(Set<byte[]> columnFamilies, long value)
          Update the metrics associated with an Append
 void updateDeleteMetrics(Set<byte[]> columnFamilies, long value)
          update metrics associated with a Delete
 void updateGetMetrics(Set<byte[]> columnFamilies, long value)
          Update the metrics associated with a Get
 void updateIncrementColumnValueMetrics(byte[] columnFamily, long value)
          Update the metrics associated with HTable.incrementColumnValue(byte[], byte[], byte[], long)
 void updateIncrementMetrics(Set<byte[]> columnFamilies, long value)
          Update metrics associated with an Increment
 void updateMultiDeleteMetrics(Set<byte[]> columnFamilies, long value)
          Update the stats associated with HTable.delete(java.util.List).
 void updateMultiPutMetrics(Set<byte[]> columnFamilies, long value)
          Update the stats associated with HTable.put(java.util.List).
 void updatePutMetrics(Set<byte[]> columnFamilies, long value)
          update metrics associated with a Put
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationMetrics

public OperationMetrics(org.apache.hadoop.conf.Configuration conf,
                        HRegionInfo regionInfo)
Create a new OperationMetrics

Parameters:
conf - The Configuration of the HRegion reporting operations coming in.
regionInfo - The region info

OperationMetrics

public OperationMetrics()
This is used in creating a testing HRegion where the regionInfo is unknown

Parameters:
conf -
Method Detail

updateMultiPutMetrics

public void updateMultiPutMetrics(Set<byte[]> columnFamilies,
                                  long value)
Update the stats associated with HTable.put(java.util.List).

Parameters:
columnFamilies - Set of CF's this multiput is associated with
value - the time

updateMultiDeleteMetrics

public void updateMultiDeleteMetrics(Set<byte[]> columnFamilies,
                                     long value)
Update the stats associated with HTable.delete(java.util.List).

Parameters:
columnFamilies - Set of CF's this multidelete is associated with
value - the time

updateGetMetrics

public void updateGetMetrics(Set<byte[]> columnFamilies,
                             long value)
Update the metrics associated with a Get

Parameters:
columnFamilies - Set of Column Families in this get.
value - the time

updateIncrementMetrics

public void updateIncrementMetrics(Set<byte[]> columnFamilies,
                                   long value)
Update metrics associated with an Increment

Parameters:
columnFamilies -
value -

updateAppendMetrics

public void updateAppendMetrics(Set<byte[]> columnFamilies,
                                long value)
Update the metrics associated with an Append

Parameters:
columnFamilies -
value -

updateIncrementColumnValueMetrics

public void updateIncrementColumnValueMetrics(byte[] columnFamily,
                                              long value)
Update the metrics associated with HTable.incrementColumnValue(byte[], byte[], byte[], long)

Parameters:
columnFamily - The single column family associated with an ICV
value - the time

updatePutMetrics

public void updatePutMetrics(Set<byte[]> columnFamilies,
                             long value)
update metrics associated with a Put

Parameters:
columnFamilies - Set of column families involved.
value - the time.

updateDeleteMetrics

public void updateDeleteMetrics(Set<byte[]> columnFamilies,
                                long value)
update metrics associated with a Delete

Parameters:
columnFamilies -
value - the time.

closeMetrics

public void closeMetrics()
This deletes all old metrics this instance has ever created or updated.



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