File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
hbase-server/src/main/java/org/apache/hadoop/hbase/master Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -2302,10 +2302,15 @@ public RegionSpaceUseReportResponse reportRegionSpaceUse(RpcController controlle
23022302 return RegionSpaceUseReportResponse .newBuilder ().build ();
23032303 }
23042304 MasterQuotaManager quotaManager = this .master .getMasterQuotaManager ();
2305- final long now = EnvironmentEdgeManager .currentTime ();
2306- for (RegionSpaceUse report : request .getSpaceUseList ()) {
2307- quotaManager .addRegionSize (ProtobufUtil .toRegionInfo (
2308- report .getRegionInfo ()), report .getRegionSize (), now );
2305+ if (quotaManager != null ) {
2306+ final long now = EnvironmentEdgeManager .currentTime ();
2307+ for (RegionSpaceUse report : request .getSpaceUseList ()) {
2308+ quotaManager .addRegionSize (ProtobufUtil .toRegionInfo (report .getRegionInfo ()),
2309+ report .getRegionSize (), now );
2310+ }
2311+ } else {
2312+ LOG .debug (
2313+ "Received region space usage report but HMaster is not ready to process it, skipping" );
23092314 }
23102315 return RegionSpaceUseReportResponse .newBuilder ().build ();
23112316 } catch (Exception e ) {
@@ -2340,6 +2345,9 @@ public GetSpaceQuotaRegionSizesResponse getSpaceQuotaRegionSizes(
23402345 .setSize (tableSize .getValue ()).build ());
23412346 }
23422347 return builder .build ();
2348+ } else {
2349+ LOG .debug (
2350+ "Received space quota region size report but HMaster is not ready to process it, skipping" );
23432351 }
23442352 return builder .build ();
23452353 } catch (Exception e ) {
You can’t perform that action at this time.
0 commit comments