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 @@ -2193,10 +2193,15 @@ public RegionSpaceUseReportResponse reportRegionSpaceUse(RpcController controlle
21932193 return RegionSpaceUseReportResponse .newBuilder ().build ();
21942194 }
21952195 MasterQuotaManager quotaManager = this .master .getMasterQuotaManager ();
2196- final long now = EnvironmentEdgeManager .currentTime ();
2197- for (RegionSpaceUse report : request .getSpaceUseList ()) {
2198- quotaManager .addRegionSize (ProtobufUtil .toRegionInfo (
2199- report .getRegionInfo ()), report .getRegionSize (), now );
2196+ if (quotaManager != null ) {
2197+ final long now = EnvironmentEdgeManager .currentTime ();
2198+ for (RegionSpaceUse report : request .getSpaceUseList ()) {
2199+ quotaManager .addRegionSize (ProtobufUtil .toRegionInfo (report .getRegionInfo ()),
2200+ report .getRegionSize (), now );
2201+ }
2202+ } else {
2203+ LOG .debug (
2204+ "Received region space usage report but HMaster is not ready to process it, skipping" );
22002205 }
22012206 return RegionSpaceUseReportResponse .newBuilder ().build ();
22022207 } catch (Exception e ) {
@@ -2231,6 +2236,9 @@ public GetSpaceQuotaRegionSizesResponse getSpaceQuotaRegionSizes(
22312236 .setSize (tableSize .getValue ()).build ());
22322237 }
22332238 return builder .build ();
2239+ } else {
2240+ LOG .debug (
2241+ "Received space quota region size report but HMaster is not ready to process it, skipping" );
22342242 }
22352243 return builder .build ();
22362244 } catch (Exception e ) {
You can’t perform that action at this time.
0 commit comments