From ba80103a8c998cc05a1601d716932512f0d2b265 Mon Sep 17 00:00:00 2001 From: d-c-manning <67607031+d-c-manning@users.noreply.github.com> Date: Mon, 8 Mar 2021 22:13:10 -0800 Subject: [PATCH] HBASE-25648 Fix normalizer and TestSimpleRegionNormalizerOnCluster in branch-1 (#3038) Signed-off-by: Viraj Jasani --- .../main/java/org/apache/hadoop/hbase/master/HMaster.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java index bf9ce36703f..e2fe330667e 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java @@ -1678,7 +1678,7 @@ public class HMaster extends HRegionServer implements MasterServices, Server { return false; } - if (isNormalizerOn()) { + if (!isNormalizerOn()) { LOG.debug("Region normalization is disabled, don't run region normalizer."); return false; } @@ -1693,11 +1693,7 @@ public class HMaster extends HRegionServer implements MasterServices, Server { for (TableName table : allEnabledTables) { final NamespaceAuditor namespaceQuotaManager = quotaManager.getNamespaceQuotaManager(); - if(namespaceQuotaManager == null) { - LOG.debug("Skipping normalizing since namespace quota is null"); - return false; - } - if (namespaceQuotaManager.getState(table.getNamespaceAsString()) != null) { + if (namespaceQuotaManager != null && namespaceQuotaManager.getState(table.getNamespaceAsString()) != null) { LOG.debug("Skipping normalizing " + table + " since its namespace has quota"); continue; }