HBASE-20139 NPE in RSRpcServices.get() when getRegion throws an exception
This commit is contained in:
parent
ac6af9f43a
commit
41ff229a16
|
@ -2328,9 +2328,12 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
|
|||
} catch (IOException ie) {
|
||||
throw new ServiceException(ie);
|
||||
} finally {
|
||||
if (regionServer.metricsRegionServer != null && region != null) {
|
||||
regionServer.metricsRegionServer.updateGet(
|
||||
region.getTableDesc().getTableName(), EnvironmentEdgeManager.currentTime() - before);
|
||||
MetricsRegionServer mrs = regionServer.metricsRegionServer;
|
||||
if (mrs != null) {
|
||||
HTableDescriptor td = region != null ? region.getTableDesc() : null;
|
||||
if (td != null) {
|
||||
mrs.updateGet(td.getTableName(), EnvironmentEdgeManager.currentTime() - before);
|
||||
}
|
||||
}
|
||||
if (quota != null) {
|
||||
quota.close();
|
||||
|
|
Loading…
Reference in New Issue