Repository: storm Updated Branches: refs/heads/1.1.x-branch 080d9ddce -> 1daaaefbd
Merge branch 'STORM-2706-1.x' of https://github.com/srdo/storm into STORM-2706 STORM-2706: Upgrade to Curator 4.0.0 (1.x) This closes #2384 Project: http://git-wip-us.apache.org/repos/asf/storm/repo Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/1daaaefb Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/1daaaefb Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/1daaaefb Branch: refs/heads/1.1.x-branch Commit: 1daaaefbd6c738ed3dc8a9ae20145956ca7a1a93 Parents: 080d9dd Author: Robert Evans <[email protected]> Authored: Wed Oct 25 13:21:12 2017 -0500 Committer: Robert Evans <[email protected]> Committed: Wed Oct 25 16:13:31 2017 -0500 ---------------------------------------------------------------------- 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/1daaaefb/external/storm-eventhubs/pom.xml ---------------------------------------------------------------------- diff --git a/external/storm-eventhubs/pom.xml b/external/storm-eventhubs/pom.xml index 1be88e9..9ce5e2d 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/1daaaefb/external/storm-kafka-monitor/pom.xml ---------------------------------------------------------------------- diff --git a/external/storm-kafka-monitor/pom.xml b/external/storm-kafka-monitor/pom.xml index e3fb8c3..475e073 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/1daaaefb/external/storm-kafka/pom.xml ---------------------------------------------------------------------- diff --git a/external/storm-kafka/pom.xml b/external/storm-kafka/pom.xml index a841efc..28ec77c 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/1daaaefb/external/storm-kinesis/pom.xml ---------------------------------------------------------------------- diff --git a/external/storm-kinesis/pom.xml b/external/storm-kinesis/pom.xml index 2b997e5..013a6ef 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/1daaaefb/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index c979a33..fd61e85 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> @@ -701,10 +702,6 @@ <version>${curator.version}</version> <exclusions> <exclusion> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </exclusion> - <exclusion> <groupId>org.jboss.netty</groupId> <artifactId>netty</artifactId> </exclusion> @@ -714,16 +711,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> @@ -733,7 +720,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/1daaaefb/storm-core/pom.xml ---------------------------------------------------------------------- diff --git a/storm-core/pom.xml b/storm-core/pom.xml index 737ec20..f20b829 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/1daaaefb/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/1daaaefb/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/1daaaefb/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
