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:
Zhihong Yu 2012-02-23 22:58:42 +00:00
parent 2b41fc22b4
commit b0d4403059
3 changed files with 3 additions and 2 deletions

View File

@ -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));
}

View File

@ -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());

View File

@ -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));
}