HBASE-5437 HRegionThriftServer does not start because of a bug in HbaseHandlerMetricsProxy (Scott Chen)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1293013 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2b41fc22b4
commit
b0d4403059
|
@ -46,7 +46,7 @@ public class HbaseHandlerMetricsProxy implements InvocationHandler {
|
|||
Configuration conf) {
|
||||
return (Hbase.Iface) Proxy.newProxyInstance(
|
||||
handler.getClass().getClassLoader(),
|
||||
handler.getClass().getInterfaces(),
|
||||
new Class[]{Hbase.Iface.class},
|
||||
new HbaseHandlerMetricsProxy(handler, metrics, conf));
|
||||
}
|
||||
|
||||
|
|
|
@ -115,6 +115,7 @@ public class ThriftMetrics implements Updater {
|
|||
}
|
||||
|
||||
private void createMetricsForMethods(Class<?> iface) {
|
||||
LOG.debug("Creating metrics for interface " + iface.toString());
|
||||
for (Method m : iface.getDeclaredMethods()) {
|
||||
if (getMethodTimeMetrics(m.getName()) == null)
|
||||
LOG.debug("Creating metrics for method:" + m.getName());
|
||||
|
|
|
@ -81,7 +81,7 @@ public class ThriftHBaseServiceHandler implements THBaseService.Iface {
|
|||
THBaseService.Iface handler = new ThriftHBaseServiceHandler(conf);
|
||||
return (THBaseService.Iface) Proxy.newProxyInstance(
|
||||
handler.getClass().getClassLoader(),
|
||||
handler.getClass().getInterfaces(),
|
||||
new Class[]{THBaseService.Iface.class},
|
||||
new THBaseServiceMetricsProxy(handler, metrics));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue