Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
import org.apache.hadoop.hbase.master.procedure.MasterProcedureUtil;
import org.apache.hadoop.hbase.procedure2.ProcedureMetrics;
import org.apache.hadoop.hbase.procedure2.ProcedureStateSerializer;
import org.apache.hadoop.hbase.quotas.MasterQuotaManager;
import org.apache.hadoop.hbase.quotas.QuotaExceededException;
import org.apache.hadoop.hbase.regionserver.HRegionFileSystem;
import org.apache.hadoop.hbase.regionserver.HStoreFile;
Expand Down Expand Up @@ -540,7 +541,10 @@ private void preMergeRegions(final MasterProcedureEnv env) throws IOException {
}
// TODO: Clean up split and merge. Currently all over the place.
try {
env.getMasterServices().getMasterQuotaManager().onRegionMerged(this.mergedRegion);
MasterQuotaManager masterQuotaManager = env.getMasterServices().getMasterQuotaManager();
if (masterQuotaManager != null) {
masterQuotaManager.onRegionMerged(this.mergedRegion);
}
} catch (QuotaExceededException e) {
// TODO: why is this here? merge requests can be submitted by actors other than the normalizer
env.getMasterServices().getRegionNormalizerManager()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
import org.apache.hadoop.hbase.master.procedure.MasterProcedureUtil;
import org.apache.hadoop.hbase.procedure2.ProcedureMetrics;
import org.apache.hadoop.hbase.procedure2.ProcedureStateSerializer;
import org.apache.hadoop.hbase.quotas.MasterQuotaManager;
import org.apache.hadoop.hbase.quotas.QuotaExceededException;
import org.apache.hadoop.hbase.regionserver.HRegionFileSystem;
import org.apache.hadoop.hbase.regionserver.HStore;
Expand Down Expand Up @@ -601,7 +602,10 @@ private void preSplitRegion(final MasterProcedureEnv env)
// TODO: Clean up split and merge. Currently all over the place.
// Notify QuotaManager and RegionNormalizer
try {
env.getMasterServices().getMasterQuotaManager().onRegionSplit(this.getParentRegion());
MasterQuotaManager masterQuotaManager = env.getMasterServices().getMasterQuotaManager();
if (masterQuotaManager != null) {
masterQuotaManager.onRegionSplit(this.getParentRegion());
}
} catch (QuotaExceededException e) {
// TODO: why is this here? split requests can be submitted by actors other than the normalizer
env.getMasterServices().getRegionNormalizerManager()
Expand Down