Revert "HBASE-18511 Default no regions on master"
This reverts commit a8e0267c00
.
This commit is contained in:
parent
b653d1bf05
commit
03390684cc
|
@ -1111,8 +1111,12 @@ public abstract class BaseLoadBalancer implements LoadBalancer {
|
|||
private static final Random RANDOM = new Random(System.currentTimeMillis());
|
||||
private static final Log LOG = LogFactory.getLog(BaseLoadBalancer.class);
|
||||
|
||||
// Master carries no regions by default.
|
||||
private static final String[] DEFAULT_TABLES_ON_MASTER = new String[] {};
|
||||
// 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()};
|
||||
|
||||
public static final String TABLES_ON_MASTER =
|
||||
"hbase.balancer.tablesOnMaster";
|
||||
|
||||
|
@ -1123,18 +1127,18 @@ public abstract class BaseLoadBalancer implements LoadBalancer {
|
|||
protected MasterServices services;
|
||||
|
||||
/**
|
||||
* 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()
|
||||
* 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".
|
||||
*/
|
||||
protected static String[] getTablesOnMaster(Configuration conf) {
|
||||
String valueString = conf.get(TABLES_ON_MASTER);
|
||||
if (valueString == null) {
|
||||
return DEFAULT_TABLES_ON_MASTER;
|
||||
}
|
||||
if (valueString == null || valueString.trim().isEmpty()) {
|
||||
valueString = valueString.trim();
|
||||
if (valueString.equalsIgnoreCase("none")) {
|
||||
return null;
|
||||
}
|
||||
return StringUtils.getStrings(valueString);
|
||||
|
|
Loading…
Reference in New Issue