hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r923370 - in /hadoop/hbase/branches/0.20: CHANGES.txt src/java/org/apache/hadoop/hbase/HConstants.java src/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java
Date Mon, 15 Mar 2010 18:15:22 GMT
Author: stack
Date: Mon Mar 15 18:15:22 2010
New Revision: 923370

URL: http://svn.apache.org/viewvc?rev=923370&view=rev
Log:
HBASE-2305 Client port for ZK has no default

Modified:
    hadoop/hbase/branches/0.20/CHANGES.txt
    hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/HConstants.java
    hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java

Modified: hadoop/hbase/branches/0.20/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/CHANGES.txt?rev=923370&r1=923369&r2=923370&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.20/CHANGES.txt Mon Mar 15 18:15:22 2010
@@ -42,6 +42,7 @@ Release 0.20.4 - Unreleased
    HBASE-2311  Not having assertions enabled causes index contrib tests to fail
    HBASE-2034  Client sync block can cause 1 thread of a multi-threaded client
                to block all others (Karthik Ranganathan via Stack)
+   HBASE-2305  Client port for ZK has no default (Suraj Varma via Stack)
 
   IMPROVEMENTS
    HBASE-2180  Bad read performance from synchronizing hfile.fddatainputstream

Modified: hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/HConstants.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/HConstants.java?rev=923370&r1=923369&r2=923370&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/HConstants.java (original)
+++ hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/HConstants.java Mon Mar 15
18:15:22 2010
@@ -93,6 +93,9 @@ public interface HConstants {
   /** Default ZooKeeper pause value. In milliseconds. */
   static final int DEFAULT_ZOOKEEPER_PAUSE = 2 * 1000;
 
+  /** default client port that the zookeeper listens on */
+  static final int DEFAULT_ZOOKEPER_CLIENT_PORT = 2181;
+
   /** Parameter name for port region server listens on. */
   static final String REGIONSERVER_PORT = "hbase.regionserver.port";
 

Modified: hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java?rev=923370&r1=923369&r2=923370&view=diff
==============================================================================
--- hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java
(original)
+++ hadoop/hbase/branches/0.20/src/java/org/apache/hadoop/hbase/zookeeper/HQuorumPeer.java
Mon Mar 15 18:15:22 2010
@@ -60,6 +60,8 @@ public class HQuorumPeer implements HCon
 
   private static final String ZK_CFG_PROPERTY = "hbase.zookeeper.property.";
   private static final int ZK_CFG_PROPERTY_SIZE = ZK_CFG_PROPERTY.length();
+  private static final String ZK_CLIENT_PORT_KEY = ZK_CFG_PROPERTY
+      + "clientPort";
 
   /**
    * Parse ZooKeeper configuration from HBase XML config and run a QuorumPeer.
@@ -195,6 +197,11 @@ public class HQuorumPeer implements HCon
       }
     }
 
+    // If clientPort is not set, assign the default
+    if (zkProperties.getProperty(ZK_CLIENT_PORT_KEY) == null) {
+      zkProperties.put(ZK_CLIENT_PORT_KEY, DEFAULT_ZOOKEPER_CLIENT_PORT);
+    }
+
     // Create the server.X properties.
     int peerPort = conf.getInt("hbase.zookeeper.peerport", 2888);
     int leaderPort = conf.getInt("hbase.zookeeper.leaderport", 3888);



Mime
View raw message