incubator-hama-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edwardy...@apache.org
Subject svn commit: r1137594 - in /incubator/hama/trunk/src: java/org/apache/hama/Constants.java java/org/apache/hama/bsp/BSPPeer.java java/org/apache/hama/zookeeper/QuorumPeer.java test/org/apache/hama/zookeeper/TestZKTools.java
Date Mon, 20 Jun 2011 11:12:27 GMT
Author: edwardyoon
Date: Mon Jun 20 11:12:26 2011
New Revision: 1137594

URL: http://svn.apache.org/viewvc?rev=1137594&view=rev
Log:
Trivial typos.

Modified:
    incubator/hama/trunk/src/java/org/apache/hama/Constants.java
    incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPPeer.java
    incubator/hama/trunk/src/java/org/apache/hama/zookeeper/QuorumPeer.java
    incubator/hama/trunk/src/test/org/apache/hama/zookeeper/TestZKTools.java

Modified: incubator/hama/trunk/src/java/org/apache/hama/Constants.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/Constants.java?rev=1137594&r1=1137593&r2=1137594&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/Constants.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/Constants.java Mon Jun 20 11:12:26 2011
@@ -76,8 +76,9 @@ public interface Constants {
   public static final int DEFAULT_ZOOKEEPER_PAUSE = 2 * 1000;
   
   static final String ZOOKEEPER_CONFIG_NAME = "zoo.cfg";
-  static final String ZOOKEPER_CLIENT_PORT = "hama.zookeeper.property.clientPort";
-  static final int DEFAULT_ZOOKEPER_CLIENT_PORT = 21810;
+  static final String ZOOKEEPER_CLIENT_PORT = "hama.zookeeper.property.clientPort";
+  static final String ZOOKEEPER_SESSION_TIMEOUT = "hama.zookeeper.session.timeout";
+  static final int DEFAULT_ZOOKEEPER_CLIENT_PORT = 21810;
   static final String ZOOKEEPER_QUORUM = "hama.zookeeper.quorum";
   /** Cluster is in distributed mode or not */
   static final String CLUSTER_DISTRIBUTED = "hama.cluster.distributed";

Modified: incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPPeer.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPPeer.java?rev=1137594&r1=1137593&r2=1137594&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPPeer.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/bsp/BSPPeer.java Mon Jun 20 11:12:26 2011
@@ -105,7 +105,8 @@ public class BSPPeer implements Watcher,
     }
 
     try {
-      zk = new ZooKeeper(quorumServers, 3000, this);
+      zk = new ZooKeeper(quorumServers, conf.getInt(
+          Constants.ZOOKEEPER_SESSION_TIMEOUT, 1200000), this);
     } catch (IOException e) {
       LOG.error("Exception during reinitialization!", e);
     }

Modified: incubator/hama/trunk/src/java/org/apache/hama/zookeeper/QuorumPeer.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/java/org/apache/hama/zookeeper/QuorumPeer.java?rev=1137594&r1=1137593&r2=1137594&view=diff
==============================================================================
--- incubator/hama/trunk/src/java/org/apache/hama/zookeeper/QuorumPeer.java (original)
+++ incubator/hama/trunk/src/java/org/apache/hama/zookeeper/QuorumPeer.java Mon Jun 20 11:12:26
2011
@@ -179,7 +179,7 @@ public class QuorumPeer implements Const
 
     // Set the max session timeout from the provided client-side timeout
     zkProperties.setProperty("maxSessionTimeout",
-        conf.get("hama.zookeeper.session.timeout", "1200000"));
+        conf.get(Constants.ZOOKEEPER_SESSION_TIMEOUT, "1200000"));
     
     // Directly map all of the hama.zookeeper.property.KEY properties.
     for (Entry<String, String> entry : conf) {
@@ -196,8 +196,8 @@ public class QuorumPeer implements Const
     }
 
     // If clientPort is not set, assign the default
-    if (zkProperties.getProperty(ZOOKEPER_CLIENT_PORT) == null) {
-      zkProperties.put(ZOOKEPER_CLIENT_PORT, DEFAULT_ZOOKEPER_CLIENT_PORT);
+    if (zkProperties.getProperty(ZOOKEEPER_CLIENT_PORT) == null) {
+      zkProperties.put(ZOOKEEPER_CLIENT_PORT, DEFAULT_ZOOKEEPER_CLIENT_PORT);
     }
 
     // Create the server.X properties.

Modified: incubator/hama/trunk/src/test/org/apache/hama/zookeeper/TestZKTools.java
URL: http://svn.apache.org/viewvc/incubator/hama/trunk/src/test/org/apache/hama/zookeeper/TestZKTools.java?rev=1137594&r1=1137593&r2=1137594&view=diff
==============================================================================
--- incubator/hama/trunk/src/test/org/apache/hama/zookeeper/TestZKTools.java (original)
+++ incubator/hama/trunk/src/test/org/apache/hama/zookeeper/TestZKTools.java Mon Jun 20 11:12:26
2011
@@ -27,7 +27,7 @@ public class TestZKTools extends TestCas
   public void testZKProps() {
     HamaConfiguration conf = new HamaConfiguration();
     conf.set(Constants.ZOOKEEPER_QUORUM, "test.com:123");
-    conf.set(Constants.ZOOKEPER_CLIENT_PORT, "2222");
+    conf.set(Constants.ZOOKEEPER_CLIENT_PORT, "2222");
 
     assertEquals("test.com:2222", QuorumPeer.getZKQuorumServersString(conf));
   }



Mime
View raw message