Repository: storm
Updated Branches:
  refs/heads/1.x-branch 9aff9f91b -> 38e308e3a


STORM-2706: Upgrade to Curator 4.0.0


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

Branch: refs/heads/1.x-branch
Commit: ef6fa09c948d5a22bc27318794214ea5b89ed70d
Parents: 9aff9f9
Author: Stig Rohde Døssing <[email protected]>
Authored: Tue Oct 17 23:10:52 2017 +0200
Committer: Stig Rohde Døssing <[email protected]>
Committed: Mon Oct 23 20:27:29 2017 +0200

----------------------------------------------------------------------
 external/storm-eventhubs/pom.xml                | 11 -------
 external/storm-kafka-monitor/pom.xml            |  6 ----
 external/storm-kafka/pom.xml                    | 29 -------------------
 external/storm-kinesis/pom.xml                  | 11 -------
 pom.xml                                         | 22 ++++----------
 storm-core/pom.xml                              | 30 --------------------
 .../clj/org/apache/storm/transactional_test.clj |  4 +--
 .../clj/org/apache/storm/trident/state_test.clj |  4 +--
 .../storm/blobstore/BlobSynchronizerTest.java   | 23 +++++++--------
 9 files changed, 21 insertions(+), 119 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/ef6fa09c/external/storm-eventhubs/pom.xml
----------------------------------------------------------------------
diff --git a/external/storm-eventhubs/pom.xml b/external/storm-eventhubs/pom.xml
index 0809b6e..e13f305 100755
--- a/external/storm-eventhubs/pom.xml
+++ b/external/storm-eventhubs/pom.xml
@@ -67,17 +67,6 @@
         <dependency>
             <groupId>org.apache.curator</groupId>
             <artifactId>curator-framework</artifactId>
-            <version>${curator.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-log4j12</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.apache.qpid</groupId>

http://git-wip-us.apache.org/repos/asf/storm/blob/ef6fa09c/external/storm-kafka-monitor/pom.xml
----------------------------------------------------------------------
diff --git a/external/storm-kafka-monitor/pom.xml 
b/external/storm-kafka-monitor/pom.xml
index c66e701..76e7c87 100644
--- a/external/storm-kafka-monitor/pom.xml
+++ b/external/storm-kafka-monitor/pom.xml
@@ -57,12 +57,6 @@
         <dependency>
             <groupId>org.apache.curator</groupId>
             <artifactId>curator-framework</artifactId>
-            <exclusions>
-               <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-log4j12</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
         <dependency>
             <groupId>com.googlecode.json-simple</groupId>

http://git-wip-us.apache.org/repos/asf/storm/blob/ef6fa09c/external/storm-kafka/pom.xml
----------------------------------------------------------------------
diff --git a/external/storm-kafka/pom.xml b/external/storm-kafka/pom.xml
index f9cd57e..3fa532c 100644
--- a/external/storm-kafka/pom.xml
+++ b/external/storm-kafka/pom.xml
@@ -77,44 +77,15 @@
         <dependency>
             <groupId>org.apache.curator</groupId>
             <artifactId>curator-framework</artifactId>
-            <version>${curator.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-log4j12</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.apache.curator</groupId>
             <artifactId>curator-recipes</artifactId>
-            <version>${curator.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
-                </exclusion>
-            </exclusions>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.curator</groupId>
             <artifactId>curator-test</artifactId>
-            <version>${curator.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.testng</groupId>
-                    <artifactId>testng</artifactId>
-                </exclusion>
-            </exclusions>
             <scope>test</scope>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/storm/blob/ef6fa09c/external/storm-kinesis/pom.xml
----------------------------------------------------------------------
diff --git a/external/storm-kinesis/pom.xml b/external/storm-kinesis/pom.xml
index f97a3a3..88c67d2 100644
--- a/external/storm-kinesis/pom.xml
+++ b/external/storm-kinesis/pom.xml
@@ -45,17 +45,6 @@
         <dependency>
             <groupId>org.apache.curator</groupId>
             <artifactId>curator-framework</artifactId>
-            <version>${curator.version}</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-log4j12</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
         <dependency>
             <groupId>com.googlecode.json-simple</groupId>

http://git-wip-us.apache.org/repos/asf/storm/blob/ef6fa09c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 21ec2bc..3b0d39b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -229,7 +229,8 @@
         <commons-codec.version>1.6</commons-codec.version>
         <commons-cli.version>1.3.1</commons-cli.version>
         <clj-time.version>0.8.0</clj-time.version>
-        <curator.version>2.12.0</curator.version>
+        <curator.version>4.0.0</curator.version>
+        <curator-test.version>2.12.0</curator-test.version>
         <json-simple.version>1.1</json-simple.version>
         <ring.version>1.3.1</ring.version>
         <ring-json.version>0.3.1</ring-json.version>
@@ -702,10 +703,6 @@
                 <version>${curator.version}</version>
                 <exclusions>
                     <exclusion>
-                        <groupId>log4j</groupId>
-                        <artifactId>log4j</artifactId>
-                    </exclusion>
-                    <exclusion>
                         <groupId>org.jboss.netty</groupId>
                         <artifactId>netty</artifactId>
                     </exclusion>
@@ -715,16 +712,6 @@
                 <groupId>org.apache.curator</groupId>
                 <artifactId>curator-recipes</artifactId>
                 <version>${curator.version}</version>
-                <exclusions>
-                    <exclusion>
-                        <groupId>log4j</groupId>
-                        <artifactId>log4j</artifactId>
-                    </exclusion>
-                    <exclusion>
-                        <groupId>org.slf4j</groupId>
-                        <artifactId>slf4j-log4j12</artifactId>
-                    </exclusion>
-                </exclusions>
             </dependency>
             <dependency>
                 <groupId>org.apache.curator</groupId>
@@ -734,7 +721,10 @@
             <dependency>
                 <groupId>org.apache.curator</groupId>
                 <artifactId>curator-test</artifactId>
-                <version>${curator.version}</version>
+                <!-- curator-test is not compatible with Zookeeper 3.4.x.
+                Curator works around this by using an older curator-test jar.
+                See 
https://github.com/apache/curator/tree/6ba4de36d4e8b2b65d45c005a6a92dd85c3c497f/curator-test-zk34-->
+                <version>${curator-test.version}</version>
                 <scope>test</scope>
             </dependency>
             <dependency>

http://git-wip-us.apache.org/repos/asf/storm/blob/ef6fa09c/storm-core/pom.xml
----------------------------------------------------------------------
diff --git a/storm-core/pom.xml b/storm-core/pom.xml
index 0497bdc..3d714c0 100644
--- a/storm-core/pom.xml
+++ b/storm-core/pom.xml
@@ -188,44 +188,14 @@
             <groupId>org.apache.curator</groupId>
             <artifactId>curator-framework</artifactId>
             <scope>compile</scope>
-            <exclusions>
-                <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-log4j12</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.apache.curator</groupId>
             <artifactId>curator-recipes</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-log4j12</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.apache.curator</groupId>
             <artifactId>curator-test</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>log4j</groupId>
-                    <artifactId>log4j</artifactId>
-                </exclusion>
-                <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-log4j12</artifactId>
-                </exclusion>
-            </exclusions>
         </dependency>
         <dependency>
             <groupId>com.googlecode.json-simple</groupId>

http://git-wip-us.apache.org/repos/asf/storm/blob/ef6fa09c/storm-core/test/clj/org/apache/storm/transactional_test.clj
----------------------------------------------------------------------
diff --git a/storm-core/test/clj/org/apache/storm/transactional_test.clj 
b/storm-core/test/clj/org/apache/storm/transactional_test.clj
index 2920ea5..68d009a 100644
--- a/storm-core/test/clj/org/apache/storm/transactional_test.clj
+++ b/storm-core/test/clj/org/apache/storm/transactional_test.clj
@@ -31,7 +31,7 @@
             IdentityBolt CountingCommitBolt OpaqueMemoryTransactionalSpout])
   (:import [org.apache.storm.utils ZookeeperAuthInfo])
   (:import [org.apache.curator.framework CuratorFramework])
-  (:import [org.apache.curator.framework.api CreateBuilder 
ProtectACLCreateModePathAndBytesable])
+  (:import [org.apache.curator.framework.api CreateBuilder 
ProtectACLCreateModeStatPathAndBytesable])
   (:import [org.apache.zookeeper CreateMode ZooDefs ZooDefs$Ids])
   (:import [org.mockito Matchers Mockito])
   (:import [org.mockito.exceptions.base MockitoAssertionError])
@@ -722,7 +722,7 @@
   (testing "Creates ZooKeeper nodes with the correct ACLs"
     (let [curator (Mockito/mock CuratorFramework)
           builder0 (Mockito/mock CreateBuilder)
-          builder1 (Mockito/mock ProtectACLCreateModePathAndBytesable)
+          builder1 (Mockito/mock ProtectACLCreateModeStatPathAndBytesable)
           expectedAcls ZooDefs$Ids/CREATOR_ALL_ACL]
       (. (Mockito/when (.create curator)) (thenReturn builder0))
       (. (Mockito/when (.creatingParentsIfNeeded builder0)) (thenReturn 
builder1))

http://git-wip-us.apache.org/repos/asf/storm/blob/ef6fa09c/storm-core/test/clj/org/apache/storm/trident/state_test.clj
----------------------------------------------------------------------
diff --git a/storm-core/test/clj/org/apache/storm/trident/state_test.clj 
b/storm-core/test/clj/org/apache/storm/trident/state_test.clj
index 58a0cb8..2aba02c 100644
--- a/storm-core/test/clj/org/apache/storm/trident/state_test.clj
+++ b/storm-core/test/clj/org/apache/storm/trident/state_test.clj
@@ -24,7 +24,7 @@
   (:import [org.apache.storm.trident.testing MemoryBackingMap MemoryMapState])
   (:import [org.apache.storm.utils ZookeeperAuthInfo])
   (:import [org.apache.curator.framework CuratorFramework])
-  (:import [org.apache.curator.framework.api CreateBuilder 
ProtectACLCreateModePathAndBytesable])
+  (:import [org.apache.curator.framework.api CreateBuilder 
ProtectACLCreateModeStatPathAndBytesable])
   (:import [org.apache.zookeeper CreateMode ZooDefs ZooDefs$Ids])
   (:import [org.mockito Matchers Mockito])
   (:import [org.mockito.exceptions.base MockitoAssertionError])
@@ -114,7 +114,7 @@
   (testing "Creates ZooKeeper nodes with the correct ACLs"
     (let [curator (Mockito/mock CuratorFramework)
           builder0 (Mockito/mock CreateBuilder)
-          builder1 (Mockito/mock ProtectACLCreateModePathAndBytesable)
+          builder1 (Mockito/mock ProtectACLCreateModeStatPathAndBytesable)
           expectedAcls ZooDefs$Ids/CREATOR_ALL_ACL]
       (. (Mockito/when (.create curator)) (thenReturn builder0))
       (. (Mockito/when (.creatingParentsIfNeeded builder0)) (thenReturn 
builder1))

http://git-wip-us.apache.org/repos/asf/storm/blob/ef6fa09c/storm-core/test/jvm/org/apache/storm/blobstore/BlobSynchronizerTest.java
----------------------------------------------------------------------
diff --git 
a/storm-core/test/jvm/org/apache/storm/blobstore/BlobSynchronizerTest.java 
b/storm-core/test/jvm/org/apache/storm/blobstore/BlobSynchronizerTest.java
index 40201a8..5392b73 100644
--- a/storm-core/test/jvm/org/apache/storm/blobstore/BlobSynchronizerTest.java
+++ b/storm-core/test/jvm/org/apache/storm/blobstore/BlobSynchronizerTest.java
@@ -111,18 +111,17 @@ public class BlobSynchronizerTest {
 
   @Test
   public void testNimbodesWithLatestVersionOfBlob() throws Exception {
-    TestingServer server = new TestingServer();
-    CuratorFramework zkClient = 
CuratorFrameworkFactory.newClient(server.getConnectString(), new 
ExponentialBackoffRetry(1000, 3));
-    zkClient.start();
-    // Creating nimbus hosts containing latest version of blob
-    
zkClient.create().creatingParentContainersIfNeeded().forPath("/blobstore/key1/nimbus1:7800-1");
-    
zkClient.create().creatingParentContainersIfNeeded().forPath("/blobstore/key1/nimbus2:7800-2");
-    Set<NimbusInfo> set = 
BlobStoreUtils.getNimbodesWithLatestSequenceNumberOfBlob(zkClient, "key1");
-    assertEquals("Failed to get the correct nimbus hosts with latest blob 
version", (set.iterator().next()).getHost(),"nimbus2");
-    
zkClient.delete().deletingChildrenIfNeeded().forPath("/blobstore/key1/nimbus1:7800-1");
-    
zkClient.delete().deletingChildrenIfNeeded().forPath("/blobstore/key1/nimbus2:7800-2");
-    zkClient.close();
-    server.close();
+        try (TestingServer server = new TestingServer();
+            CuratorFramework zkClient = 
CuratorFrameworkFactory.newClient(server.getConnectString(), new 
ExponentialBackoffRetry(1000, 3));) {
+            zkClient.start();
+            // Creating nimbus hosts containing latest version of blob
+            
zkClient.create().creatingParentContainersIfNeeded().forPath("/blobstore/key1/nimbus1:7800-1");
+            
zkClient.create().creatingParentContainersIfNeeded().forPath("/blobstore/key1/nimbus2:7800-2");
+            Set<NimbusInfo> set = 
BlobStoreUtils.getNimbodesWithLatestSequenceNumberOfBlob(zkClient, "key1");
+            assertEquals("Failed to get the correct nimbus hosts with latest 
blob version", (set.iterator().next()).getHost(), "nimbus2");
+            
zkClient.delete().deletingChildrenIfNeeded().forPath("/blobstore/key1/nimbus1:7800-1");
+            
zkClient.delete().deletingChildrenIfNeeded().forPath("/blobstore/key1/nimbus2:7800-2");
+        }
   }
 
   @Test

Reply via email to