public class OperationMetrics extends Object
RegionMetricsStorage
and exposed to hadoop
metrics through RegionServerDynamicMetrics
.Constructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
void |
closeMetrics(String regionEncodedName)
This deletes all old non-persistent metrics this instance has ever created or updated.
|
void |
setReadRequestCountMetrics(long value) |
void |
setWriteRequestCountMetrics(long value) |
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 |
public OperationMetrics(org.apache.hadoop.conf.Configuration conf, HRegionInfo regionInfo)
conf
- The Configuration of the HRegion reporting operations coming in.regionInfo
- The region infopublic OperationMetrics()
conf
- public void setReadRequestCountMetrics(long value)
public void setWriteRequestCountMetrics(long value)
public void updateMultiPutMetrics(Set<byte[]> columnFamilies, long value)
HTable.put(java.util.List)
.columnFamilies
- Set of CF's this multiput is associated withvalue
- the timepublic void updateMultiDeleteMetrics(Set<byte[]> columnFamilies, long value)
HTable.delete(java.util.List)
.columnFamilies
- Set of CF's this multidelete is associated withvalue
- the timepublic void updateGetMetrics(Set<byte[]> columnFamilies, long value)
Get
columnFamilies
- Set of Column Families in this get.value
- the timepublic void updateIncrementMetrics(Set<byte[]> columnFamilies, long value)
Increment
columnFamilies
- value
- public void updateAppendMetrics(Set<byte[]> columnFamilies, long value)
Append
columnFamilies
- value
- public void updateIncrementColumnValueMetrics(byte[] columnFamily, long value)
HTable.incrementColumnValue(byte[], byte[], byte[], long)
columnFamily
- The single column family associated with an ICVvalue
- the timepublic void updatePutMetrics(Set<byte[]> columnFamilies, long value)
Put
columnFamilies
- Set of column families involved.value
- the time.public void updateDeleteMetrics(Set<byte[]> columnFamilies, long value)
Delete
columnFamilies
- value
- the time.public void closeMetrics(String regionEncodedName)
regionEncodedName
- the region that is to be closedCopyright © 2014 The Apache Software Foundation. All Rights Reserved.