HBASE-22904 NPE occurs when RS send space quota usage report during HMaster init (#529)
* NPE occurs when RS send space quota usage report during HMaster init * Added the debug log Signed-off-by: Sakthi <sakthi@apache.org> Signed-off-by: stack <stack@apache.org>
This commit is contained in:
parent
ae107bdb96
commit
00581ac911
|
@ -2227,10 +2227,15 @@ public class MasterRpcServices extends RSRpcServices
|
|||
return RegionSpaceUseReportResponse.newBuilder().build();
|
||||
}
|
||||
MasterQuotaManager quotaManager = this.master.getMasterQuotaManager();
|
||||
final long now = EnvironmentEdgeManager.currentTime();
|
||||
for (RegionSpaceUse report : request.getSpaceUseList()) {
|
||||
quotaManager.addRegionSize(ProtobufUtil.toRegionInfo(
|
||||
report.getRegionInfo()), report.getRegionSize(), now);
|
||||
if (quotaManager != null) {
|
||||
final long now = EnvironmentEdgeManager.currentTime();
|
||||
for (RegionSpaceUse report : request.getSpaceUseList()) {
|
||||
quotaManager.addRegionSize(ProtobufUtil.toRegionInfo(report.getRegionInfo()),
|
||||
report.getRegionSize(), now);
|
||||
}
|
||||
} else {
|
||||
LOG.debug(
|
||||
"Received region space usage report but HMaster is not ready to process it, skipping");
|
||||
}
|
||||
return RegionSpaceUseReportResponse.newBuilder().build();
|
||||
} catch (Exception e) {
|
||||
|
@ -2265,6 +2270,9 @@ public class MasterRpcServices extends RSRpcServices
|
|||
.setSize(tableSize.getValue()).build());
|
||||
}
|
||||
return builder.build();
|
||||
} else {
|
||||
LOG.debug(
|
||||
"Received space quota region size report but HMaster is not ready to process it, skipping");
|
||||
}
|
||||
return builder.build();
|
||||
} catch (Exception e) {
|
||||
|
|
Loading…
Reference in New Issue