You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2019/08/23 21:35:38 UTC
[GitHub] [hbase] busbey commented on a change in pull request #529:
HBASE-22904 NPE occurs when RS send space quota usage report during HMaster
init
busbey commented on a change in pull request #529: HBASE-22904 NPE occurs when RS send space quota usage report during HMaster init
URL: https://github.com/apache/hbase/pull/529#discussion_r317309614
##########
File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/MasterRpcServices.java
##########
@@ -2227,10 +2227,12 @@ public RegionSpaceUseReportResponse reportRegionSpaceUse(RpcController controlle
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);
+ }
Review comment:
log a message that we got a report but were not yet ready and so discarded it. DEBUG level I think?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services