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/24 16:20:01 UTC

[GitHub] [hbase] pankaj72981 commented on a change in pull request #529: HBASE-22904 NPE occurs when RS send space quota usage report during HMaster init

pankaj72981 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_r317366757
 
 

 ##########
 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:
   yeah, DEBUG message would be nice.

----------------------------------------------------------------
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