HBASE-3405: Allow HBaseRpcMetrics to register custom interface methods
Review Request #1414 - Created Jan. 5, 2011 and updated
Information | |
---|---|
Gary Helmling | |
old-hbase | |
0.90 | |
HBASE-3405 | |
Reviewers | |
hbase | |
The patch allows alternate HRegionServer subclasses (and in the future coprocessors) to access HBaseRpcMetrics in order to register additional RPC methods into the metrics registry. The changes are: * add getRpcMetrics() to HBaseServer to allow access to the HBaseRpcMetrics instance * add getRpcMetrics() to RegionServerServices (and HRegionServer) to allow for future coprocessor accounting * add HBaseRpcMetrics.createMetrics(Class[], boolean) overload -- if boolean is true, the registered method names will be prefixed with the class name. This should help clarify origin for custom metrics and help prevent collisions.
Created new org.apache.hadoop.hbase.regionserver.TestRpcMetrics test case to verify registration and incrementing of metrics from HRegionServer subclasses.