hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject svn commit: r990387 - in /hadoop/zookeeper/trunk: CHANGES.txt src/contrib/bookkeeper/src/java/org/apache/bookkeeper/util/LocalBookKeeper.java src/contrib/bookkeeper/test/org/apache/bookkeeper/test/BaseTestCase.java
Date Sat, 28 Aug 2010 16:10:27 GMT
Author: mahadev
Date: Sat Aug 28 16:10:27 2010
New Revision: 990387

URL: http://svn.apache.org/viewvc?rev=990387&view=rev
Log:
ZOOKEEPER-854. BookKeeper does not compile due to changes in the ZooKeeper code (Flavio via
mahadev)

Modified:
    hadoop/zookeeper/trunk/CHANGES.txt
    hadoop/zookeeper/trunk/src/contrib/bookkeeper/src/java/org/apache/bookkeeper/util/LocalBookKeeper.java
    hadoop/zookeeper/trunk/src/contrib/bookkeeper/test/org/apache/bookkeeper/test/BaseTestCase.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=990387&r1=990386&r2=990387&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Sat Aug 28 16:10:27 2010
@@ -80,6 +80,9 @@ BUGFIXES: 
 
   ZOOKEEPER-792. zkpython memory leak (Lei Zhang via henryr)
 
+  ZOOKEEPER-854. BookKeeper does not compile due to changes in the ZooKeeper 
+  code (Flavio via mahadev)
+
 IMPROVEMENTS:
   ZOOKEEPER-724. Improve junit test integration - log harness information 
   (phunt via mahadev)

Modified: hadoop/zookeeper/trunk/src/contrib/bookkeeper/src/java/org/apache/bookkeeper/util/LocalBookKeeper.java
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/bookkeeper/src/java/org/apache/bookkeeper/util/LocalBookKeeper.java?rev=990387&r1=990386&r2=990387&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/contrib/bookkeeper/src/java/org/apache/bookkeeper/util/LocalBookKeeper.java
(original)
+++ hadoop/zookeeper/trunk/src/contrib/bookkeeper/src/java/org/apache/bookkeeper/util/LocalBookKeeper.java
Sat Aug 28 16:10:27 2010
@@ -38,7 +38,7 @@ import org.apache.zookeeper.WatchedEvent
 import org.apache.zookeeper.Watcher;
 import org.apache.zookeeper.ZooKeeper;
 import org.apache.zookeeper.ZooDefs.Ids;
-import org.apache.zookeeper.server.NIOServerCnxn;
+import org.apache.zookeeper.server.NIOServerCnxnFactory;
 import org.apache.zookeeper.server.ZooKeeperServer;
 
 public class LocalBookKeeper {
@@ -62,7 +62,7 @@ public class LocalBookKeeper {
 	}
 	
 	private final String HOSTPORT = "127.0.0.1:2181";
-	NIOServerCnxn.Factory serverFactory;
+	NIOServerCnxnFactory serverFactory;
 	ZooKeeperServer zks;
 	ZooKeeper zkc;
 	int ZooKeeperDefaultPort = 2181;
@@ -77,7 +77,7 @@ public class LocalBookKeeper {
 	 * @param args
 	 */
 	
-	private void runZookeeper() throws IOException{
+	private void runZookeeper(int maxCC) throws IOException{
 		// create a ZooKeeper server(dataDir, dataLogDir, port)
 		LOG.info("Starting ZK server");
 		//ServerStats.registerAsConcrete();
@@ -88,7 +88,8 @@ public class LocalBookKeeper {
 		    
 		try {
 			zks = new ZooKeeperServer(ZkTmpDir, ZkTmpDir, ZooKeeperDefaultPort);
-			serverFactory =  new NIOServerCnxn.Factory(new InetSocketAddress(ZooKeeperDefaultPort));
+			serverFactory =  new NIOServerCnxnFactory();
+			serverFactory.configure(new InetSocketAddress(ZooKeeperDefaultPort), maxCC);
 			serverFactory.startup(zks);
 		} catch (Exception e) {
 			// TODO Auto-generated catch block
@@ -143,7 +144,7 @@ public class LocalBookKeeper {
 			System.exit(-1);
 		}
 		LocalBookKeeper lb = new LocalBookKeeper(Integer.parseInt(args[0]));
-		lb.runZookeeper();
+		lb.runZookeeper(1000);
 		lb.initializeZookeper();
 		lb.runBookies();
 		while (true){

Modified: hadoop/zookeeper/trunk/src/contrib/bookkeeper/test/org/apache/bookkeeper/test/BaseTestCase.java
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/bookkeeper/test/org/apache/bookkeeper/test/BaseTestCase.java?rev=990387&r1=990386&r2=990387&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/contrib/bookkeeper/test/org/apache/bookkeeper/test/BaseTestCase.java
(original)
+++ hadoop/zookeeper/trunk/src/contrib/bookkeeper/test/org/apache/bookkeeper/test/BaseTestCase.java
Sat Aug 28 16:10:27 2010
@@ -37,7 +37,7 @@ import org.apache.zookeeper.WatchedEvent
 import org.apache.zookeeper.Watcher;
 import org.apache.zookeeper.ZooKeeper;
 import org.apache.zookeeper.ZooDefs.Ids;
-import org.apache.zookeeper.server.NIOServerCnxn;
+import org.apache.zookeeper.server.NIOServerCnxnFactory;
 import org.apache.zookeeper.server.ZooKeeperServer;
 import org.apache.zookeeper.test.ClientBase;
 import org.junit.After;
@@ -56,7 +56,7 @@ public abstract class BaseTestCase exten
     static Integer ZooKeeperDefaultPort = 2181;
     ZooKeeperServer zks;
     ZooKeeper zkc; // zookeeper client
-    NIOServerCnxn.Factory serverFactory;
+    NIOServerCnxnFactory serverFactory;
     File ZkTmpDir;
 
     // BookKeeper
@@ -89,7 +89,8 @@ public abstract class BaseTestCase exten
         ZkTmpDir.mkdir();
 
         zks = new ZooKeeperServer(ZkTmpDir, ZkTmpDir, ZooKeeperDefaultPort);
-        serverFactory = new NIOServerCnxn.Factory(new InetSocketAddress(ZooKeeperDefaultPort));
+        serverFactory = new NIOServerCnxnFactory();
+        serverFactory.configure(new InetSocketAddress(ZooKeeperDefaultPort), 100);
         serverFactory.startup(zks);
 
         boolean b = ClientBase.waitForServerUp(HOSTPORT, ClientBase.CONNECTION_TIMEOUT);



Mime
View raw message