aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wfar...@apache.org
Subject aurora git commit: Upgrade ZooKeeper dep to 3.4.2
Date Mon, 04 Jan 2016 04:55:23 GMT
Repository: aurora
Updated Branches:
  refs/heads/master 9ed81a7db -> 8706a7819


Upgrade ZooKeeper dep to 3.4.2

Reviewed at https://reviews.apache.org/r/41762/


Project: http://git-wip-us.apache.org/repos/asf/aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/8706a781
Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/8706a781
Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/8706a781

Branch: refs/heads/master
Commit: 8706a781968912c68688284d9d3813d34ce45bf7
Parents: 9ed81a7
Author: Bill Farner <wfarner@apache.org>
Authored: Sun Jan 3 20:55:19 2016 -0800
Committer: Bill Farner <wfarner@apache.org>
Committed: Sun Jan 3 20:55:19 2016 -0800

----------------------------------------------------------------------
 NEWS                                                |  1 +
 build.gradle                                        |  3 ++-
 .../zookeeper/testing/ZooKeeperTestServer.java      | 16 +++++++++++-----
 3 files changed, 14 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/8706a781/NEWS
----------------------------------------------------------------------
diff --git a/NEWS b/NEWS
index 965fbf4..c0c454d 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,7 @@
     `-enable_cors_for`.
   - `-deduplicate_snapshots` and `-deflate_snapshots`.  These features are good to always
enable.
   - `-enable_job_updates` and `-enable_job_creation`
+- Upgraded the scheduler ZooKeeper client from 3.3.4 to 3.4.2.
 
 0.11.0
 ------

http://git-wip-us.apache.org/repos/asf/aurora/blob/8706a781/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 6f89958..c1bbb08 100644
--- a/build.gradle
+++ b/build.gradle
@@ -93,7 +93,8 @@ For more details, please see https://issues.apache.org/jira/browse/AURORA-1169
   ext.slf4jRev = '1.7.12'
   ext.stringTemplateRev = '3.2.1'
   ext.thriftRev = '0.9.1'
-  ext.zookeeperRev = '3.3.4'
+  // Note: changes in >=3.4.3 trigger a failure in Kerberos5ShiroRealmModuleTest on our
end.
+  ext.zookeeperRev = '3.4.2'
 
   configurations {
     compile {

http://git-wip-us.apache.org/repos/asf/aurora/blob/8706a781/commons/src/main/java/org/apache/aurora/common/zookeeper/testing/ZooKeeperTestServer.java
----------------------------------------------------------------------
diff --git a/commons/src/main/java/org/apache/aurora/common/zookeeper/testing/ZooKeeperTestServer.java
b/commons/src/main/java/org/apache/aurora/common/zookeeper/testing/ZooKeeperTestServer.java
index 03d47c3..54b0a09 100644
--- a/commons/src/main/java/org/apache/aurora/common/zookeeper/testing/ZooKeeperTestServer.java
+++ b/commons/src/main/java/org/apache/aurora/common/zookeeper/testing/ZooKeeperTestServer.java
@@ -26,7 +26,8 @@ import com.google.common.collect.Lists;
 import org.apache.aurora.common.quantity.Amount;
 import org.apache.aurora.common.quantity.Time;
 import org.apache.aurora.common.zookeeper.ZooKeeperClient;
-import org.apache.zookeeper.server.NIOServerCnxn;
+import org.apache.zookeeper.server.NIOServerCnxnFactory;
+import org.apache.zookeeper.server.ServerCnxnFactory;
 import org.apache.zookeeper.server.ZooKeeperServer;
 import org.apache.zookeeper.server.ZooKeeperServer.BasicDataTreeBuilder;
 import org.apache.zookeeper.server.persistence.FileTxnSnapLog;
@@ -42,7 +43,7 @@ public class ZooKeeperTestServer {
       Amount.of(100, Time.MILLISECONDS);
 
   protected final ZooKeeperServer zooKeeperServer;
-  private NIOServerCnxn.Factory connectionFactory;
+  private ServerCnxnFactory connectionFactory;
   private int port;
   private final Amount<Integer, Time> defaultSessionTimeout;
   private final LinkedList<Runnable> cleanupActions = Lists.newLinkedList();
@@ -76,7 +77,11 @@ public class ZooKeeperTestServer {
    * Starts zookeeper up on an ephemeral port.
    */
   public void startNetwork() throws IOException, InterruptedException {
-    connectionFactory = new NIOServerCnxn.Factory(new InetSocketAddress(port));
+    connectionFactory = new NIOServerCnxnFactory();
+    connectionFactory.configure(
+        new InetSocketAddress(port),
+        60 /*  Semi-arbitrary, max 60 connections is the default used by NIOServerCnxnFactory
*/);
+
     connectionFactory.startup(zooKeeperServer);
     cleanupActions.addFirst((this::shutdownNetwork));
     port = zooKeeperServer.getClientPort();
@@ -97,7 +102,7 @@ public class ZooKeeperTestServer {
    */
   public final void restartNetwork() throws IOException, InterruptedException {
     checkEphemeralPortAssigned();
-    Preconditions.checkState(!connectionFactory.isAlive());
+    Preconditions.checkState(connectionFactory == null);
     startNetwork();
   }
 
@@ -105,8 +110,9 @@ public class ZooKeeperTestServer {
    * Shuts down the in-process zookeeper network server.
    */
   public final void shutdownNetwork() {
-    if (connectionFactory != null && connectionFactory.isAlive()) {
+    if (connectionFactory != null) {
       connectionFactory.shutdown();
+      connectionFactory = null;
     }
   }
 


Mime
View raw message