hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1304925 - in /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase: HConstants.java zookeeper/ZKConfig.java
Date Sat, 24 Mar 2012 21:16:15 GMT
Author: stack
Date: Sat Mar 24 21:16:15 2012
New Revision: 1304925

URL: http://svn.apache.org/viewvc?rev=1304925&view=rev
Log:
HBASE-5633 NPE reading ZK config in HBase

Modified:
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/HConstants.java
    hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKConfig.java

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/HConstants.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/HConstants.java?rev=1304925&r1=1304924&r2=1304925&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/HConstants.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/HConstants.java Sat Mar 24 21:16:15
2012
@@ -78,6 +78,9 @@ public final class HConstants {
   /** Cluster is fully-distributed */
   public static final String CLUSTER_IS_DISTRIBUTED = "true";
 
+  /** Default value for cluster distributed mode */  
+  public static final String DEFAULT_CLUSTER_DISTRIBUTED = CLUSTER_IS_LOCAL;
+
   /** default host address */
   public static final String DEFAULT_HOST = "0.0.0.0";
 

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKConfig.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKConfig.java?rev=1304925&r1=1304924&r2=1304925&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKConfig.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKConfig.java Sat
Mar 24 21:16:15 2012
@@ -159,7 +159,8 @@ public class ZKConfig {
       }
       // Special case for 'hbase.cluster.distributed' property being 'true'
       if (key.startsWith("server.")) {
-        if (conf.get(HConstants.CLUSTER_DISTRIBUTED).equals(HConstants.CLUSTER_IS_DISTRIBUTED)
+        if (conf.get(HConstants.CLUSTER_DISTRIBUTED, HConstants.DEFAULT_CLUSTER_DISTRIBUTED).
+              equals(HConstants.CLUSTER_IS_DISTRIBUTED)
             && value.startsWith(HConstants.LOCALHOST)) {
           String msg = "The server in zoo.cfg cannot be set to localhost " +
               "in a fully-distributed setup because it won't be reachable. " +



Mime
View raw message