HBASE-15083 Gets from Multiactions are not counted in metrics for gets
This commit is contained in:
parent
da932ee38d
commit
8ee9158b54
|
@ -699,12 +699,20 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (action.hasGet()) {
|
if (action.hasGet()) {
|
||||||
|
long before = EnvironmentEdgeManager.currentTime();
|
||||||
|
try {
|
||||||
Get get = ProtobufUtil.toGet(action.getGet());
|
Get get = ProtobufUtil.toGet(action.getGet());
|
||||||
if (context != null) {
|
if (context != null) {
|
||||||
r = get(get, ((HRegion) region), closeCallBack, context);
|
r = get(get, ((HRegion) region), closeCallBack, context);
|
||||||
} else {
|
} else {
|
||||||
r = region.get(get);
|
r = region.get(get);
|
||||||
}
|
}
|
||||||
|
} finally {
|
||||||
|
if (regionServer.metricsRegionServer != null) {
|
||||||
|
regionServer.metricsRegionServer.updateGet(
|
||||||
|
EnvironmentEdgeManager.currentTime() - before);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if (action.hasServiceCall()) {
|
} else if (action.hasServiceCall()) {
|
||||||
resultOrExceptionBuilder = ResultOrException.newBuilder();
|
resultOrExceptionBuilder = ResultOrException.newBuilder();
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue