hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject [22/27] hbase git commit: HBASE-18511 Default no regions on master
Date Wed, 09 Aug 2017 05:51:38 GMT
HBASE-18511 Default no regions on master


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/a8e0267c
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/a8e0267c
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/a8e0267c

Branch: refs/heads/HBASE-18467
Commit: a8e0267c00409da7e3e03cfb34168787873ef075
Parents: 4376233
Author: Michael Stack <stack@apache.org>
Authored: Sat Aug 5 15:28:40 2017 +0800
Committer: Michael Stack <stack@apache.org>
Committed: Tue Aug 8 12:11:02 2017 +0800

----------------------------------------------------------------------
 .../hbase/master/balancer/BaseLoadBalancer.java | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/a8e0267c/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
index 8f5b6f5..445f80f 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
@@ -1111,12 +1111,8 @@ public abstract class BaseLoadBalancer implements LoadBalancer {
   private static final Random RANDOM = new Random(System.currentTimeMillis());
   private static final Log LOG = LogFactory.getLog(BaseLoadBalancer.class);
 
-  // Regions of these tables are put on the master by default.
-  private static final String[] DEFAULT_TABLES_ON_MASTER =
-    new String[] {AccessControlLists.ACL_TABLE_NAME.getNameAsString(),
-      TableName.NAMESPACE_TABLE_NAME.getNameAsString(),
-      TableName.META_TABLE_NAME.getNameAsString()};
-
+  // Master carries no regions by default.
+  private static final String[] DEFAULT_TABLES_ON_MASTER = new String[] {};
   public static final String TABLES_ON_MASTER =
     "hbase.balancer.tablesOnMaster";
 
@@ -1127,18 +1123,18 @@ public abstract class BaseLoadBalancer implements LoadBalancer {
   protected MasterServices services;
 
   /**
-   * By default, regions of some small system tables such as meta,
-   * namespace, and acl are assigned to the active master. If you don't
-   * want to assign any region to the active master, you need to
-   * configure "hbase.balancer.tablesOnMaster" to "none".
+   * By default, master carries no regions. This method returns null.
+   * If you want master to carry system tables say, then set
+   * TABLES_ON_MASTER to AccessControlLists.ACL_TABLE_NAME.getNameAsString(),
+   * TableName.NAMESPACE_TABLE_NAME.getNameAsString(),
+   * TableName.META_TABLE_NAME.getNameAsString()
    */
   protected static String[] getTablesOnMaster(Configuration conf) {
     String valueString = conf.get(TABLES_ON_MASTER);
     if (valueString == null) {
       return DEFAULT_TABLES_ON_MASTER;
     }
-    valueString = valueString.trim();
-    if (valueString.equalsIgnoreCase("none")) {
+    if (valueString == null || valueString.trim().isEmpty()) {
       return null;
     }
     return StringUtils.getStrings(valueString);


Mime
View raw message