[
https://issues.apache.org/jira/browse/HBASE-3405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12978229#action_12978229
]
HBase Review Board commented on HBASE-3405:
-------------------------------------------
Message from: "Gary Helmling" <[email protected]>
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://review.cloudera.org/r/1414/
-----------------------------------------------------------
Review request for hbase.
Summary
-------
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.
This addresses bug HBASE-3405.
http://issues.apache.org/jira/browse/HBASE-3405
Diffs
-----
src/main/java/org/apache/hadoop/hbase/ipc/HBaseRpcMetrics.java 19dbf2b
src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java 867a059
src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java d7147b5
src/main/java/org/apache/hadoop/hbase/regionserver/RegionServerServices.java
1309f93
src/test/java/org/apache/hadoop/hbase/regionserver/TestRpcMetrics.java
PRE-CREATION
Diff: http://review.cloudera.org/r/1414/diff
Testing
-------
Created new org.apache.hadoop.hbase.regionserver.TestRpcMetrics test case to
verify registration and incrementing of metrics from HRegionServer subclasses.
Thanks,
Gary
> Allow HBaseRpcMetrics to register custom interface methods
> ----------------------------------------------------------
>
> Key: HBASE-3405
> URL: https://issues.apache.org/jira/browse/HBASE-3405
> Project: HBase
> Issue Type: Improvement
> Components: ipc
> Reporter: Gary Helmling
> Priority: Minor
>
> Opened from comments on HBASE-2997. James Kennedy notes:
> {quote}
> HBaseRpcMetrics is now logging a WARN message every time it encounters an
> unregistered RPC method.
> In my case I now get huge log files filled with these warnings because the
> hbase-trx transactional extension of HBase uses a subclass of HRegionServer
> that adds new interface methods.
> It's easy enough to tell log4j to ignore HBaseRpcMetrics output.
> However, it would be nice if the Server/HRegionServer HBaseRpcMetrics
> mechanism was more extensible so I could pass down new interfaces or grab the
> HBaseRpcMetrics object to add interfaces from up top...
> {quote}
> {{HBaseRpcMetrics}} already has a public method {{createMetrics(Class)}} to
> register method counters. We just need a way to expose the metrics class to
> allow the region server subclass to call it -- add a {{getMetrics()}} method
> to {{RpcServer}} and {{HBaseServer}}.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.