Index: src/main/java/org/apache/hadoop/hbase/LocalHBaseCluster.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/LocalHBaseCluster.java (revision 1307062) +++ src/main/java/org/apache/hadoop/hbase/LocalHBaseCluster.java (working copy) @@ -430,8 +430,8 @@ * @return True if a 'local' address in hbase.master value. */ public static boolean isLocal(final Configuration c) { - final String mode = c.get(HConstants.CLUSTER_DISTRIBUTED); - return mode == null || mode.equals(HConstants.CLUSTER_IS_LOCAL); + boolean mode = c.getBoolean(HConstants.CLUSTER_DISTRIBUTED, HConstants.DEFAULT_CLUSTER_DISTRIBUTED); + return(mode == HConstants.CLUSTER_IS_LOCAL); } /** @@ -449,4 +449,4 @@ admin.createTable(htd); cluster.shutdown(); } -} \ No newline at end of file +} Index: src/main/java/org/apache/hadoop/hbase/HConstants.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/HConstants.java (revision 1307062) +++ src/main/java/org/apache/hadoop/hbase/HConstants.java (working copy) @@ -73,11 +73,14 @@ public static final String HBASE_MASTER_LOADBALANCER_CLASS = "hbase.master.loadbalancer.class"; /** Cluster is standalone or pseudo-distributed */ - public static final String CLUSTER_IS_LOCAL = "false"; + public static final boolean CLUSTER_IS_LOCAL = false; /** Cluster is fully-distributed */ - public static final String CLUSTER_IS_DISTRIBUTED = "true"; + public static final boolean CLUSTER_IS_DISTRIBUTED = true; + /** Default value for cluster distributed mode */ + public static final boolean DEFAULT_CLUSTER_DISTRIBUTED = CLUSTER_IS_LOCAL; + /** default host address */ public static final String DEFAULT_HOST = "0.0.0.0"; Index: src/main/java/org/apache/hadoop/hbase/zookeeper/ZKConfig.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/zookeeper/ZKConfig.java (revision 1307062) +++ src/main/java/org/apache/hadoop/hbase/zookeeper/ZKConfig.java (working copy) @@ -163,8 +163,8 @@ } // Special case for 'hbase.cluster.distributed' property being 'true' if (key.startsWith("server.")) { - if (conf.get(HConstants.CLUSTER_DISTRIBUTED).equals(HConstants.CLUSTER_IS_DISTRIBUTED) - && value.startsWith("localhost")) { + boolean mode = conf.getBoolean(HConstants.CLUSTER_DISTRIBUTED, HConstants.DEFAULT_CLUSTER_DISTRIBUTED); + if (mode == HConstants.CLUSTER_IS_DISTRIBUTED && value.startsWith("localhost")) { String msg = "The server in zoo.cfg cannot be set to localhost " + "in a fully-distributed setup because it won't be reachable. " + "See \"Getting Started\" for more information.";