HBASE-15083 Gets from Multiactions are not counted in metrics for gets

This commit is contained in:
chenheng 2016-01-12 14:32:55 +08:00
parent bb5026c6a4
commit 417e3c4a73
1 changed files with 10 additions and 2 deletions

View File

@ -623,8 +623,16 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
continue;
}
if (action.hasGet()) {
Get get = ProtobufUtil.toGet(action.getGet());
r = region.get(get);
long before = EnvironmentEdgeManager.currentTime();
try {
Get get = ProtobufUtil.toGet(action.getGet());
r = region.get(get);
} finally {
if (regionServer.metricsRegionServer != null) {
regionServer.metricsRegionServer.updateGet(
EnvironmentEdgeManager.currentTime() - before);
}
}
} else if (action.hasServiceCall()) {
resultOrExceptionBuilder = ResultOrException.newBuilder();
try {