File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
hbase-server/src/main/java/org/apache/hadoop/hbase/master/assignment Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 5151import org .apache .hadoop .hbase .master .procedure .MasterProcedureUtil ;
5252import org .apache .hadoop .hbase .procedure2 .ProcedureMetrics ;
5353import org .apache .hadoop .hbase .procedure2 .ProcedureStateSerializer ;
54+ import org .apache .hadoop .hbase .quotas .MasterQuotaManager ;
5455import org .apache .hadoop .hbase .quotas .QuotaExceededException ;
5556import org .apache .hadoop .hbase .regionserver .HRegionFileSystem ;
5657import org .apache .hadoop .hbase .regionserver .HStoreFile ;
@@ -539,7 +540,10 @@ private void preMergeRegions(final MasterProcedureEnv env) throws IOException {
539540 }
540541 // TODO: Clean up split and merge. Currently all over the place.
541542 try {
542- env .getMasterServices ().getMasterQuotaManager ().onRegionMerged (this .mergedRegion );
543+ MasterQuotaManager masterQuotaManager = env .getMasterServices ().getMasterQuotaManager ();
544+ if (masterQuotaManager != null ) {
545+ masterQuotaManager .onRegionMerged (this .mergedRegion );
546+ }
543547 } catch (QuotaExceededException e ) {
544548 // TODO: why is this here? merge requests can be submitted by actors other than the normalizer
545549 env .getMasterServices ().getRegionNormalizerManager ()
Original file line number Diff line number Diff line change 5757import org .apache .hadoop .hbase .master .procedure .MasterProcedureUtil ;
5858import org .apache .hadoop .hbase .procedure2 .ProcedureMetrics ;
5959import org .apache .hadoop .hbase .procedure2 .ProcedureStateSerializer ;
60+ import org .apache .hadoop .hbase .quotas .MasterQuotaManager ;
6061import org .apache .hadoop .hbase .quotas .QuotaExceededException ;
6162import org .apache .hadoop .hbase .regionserver .HRegionFileSystem ;
6263import org .apache .hadoop .hbase .regionserver .HStore ;
@@ -598,7 +599,10 @@ private void preSplitRegion(final MasterProcedureEnv env)
598599 // TODO: Clean up split and merge. Currently all over the place.
599600 // Notify QuotaManager and RegionNormalizer
600601 try {
601- env .getMasterServices ().getMasterQuotaManager ().onRegionSplit (this .getParentRegion ());
602+ MasterQuotaManager masterQuotaManager = env .getMasterServices ().getMasterQuotaManager ();
603+ if (masterQuotaManager != null ) {
604+ masterQuotaManager .onRegionSplit (this .getParentRegion ());
605+ }
602606 } catch (QuotaExceededException e ) {
603607 // TODO: why is this here? split requests can be submitted by actors other than the normalizer
604608 env .getMasterServices ().getRegionNormalizerManager ()
You can’t perform that action at this time.
0 commit comments