Repository: storm Updated Branches: refs/heads/master 7b940aed6 -> d0c5457c0
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/7f6d7063 Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/7f6d7063 Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/7f6d7063 Branch: refs/heads/master Commit: 7f6d7063df1690f267399a6d581fd2b782712e04 Parents: 914abe5 Author: Stig Rohde Døssing <[email protected]> Authored: Tue Oct 17 23:10:52 2017 +0200 Committer: Stig Rohde Døssing <[email protected]> Committed: Wed Oct 18 22:18:34 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-server/pom.xml | 10 ------- .../storm/blobstore/BlobSynchronizerTest.java | 22 +++++++------- 10 files changed, 20 insertions(+), 129 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/storm/blob/7f6d7063/external/storm-eventhubs/pom.xml ---------------------------------------------------------------------- diff --git a/external/storm-eventhubs/pom.xml b/external/storm-eventhubs/pom.xml index e709b13..99ac4f3 100755 --- a/external/storm-eventhubs/pom.xml +++ b/external/storm-eventhubs/pom.xml @@ -75,17 +75,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> </dependencies> </project> http://git-wip-us.apache.org/repos/asf/storm/blob/7f6d7063/external/storm-kafka-monitor/pom.xml ---------------------------------------------------------------------- diff --git a/external/storm-kafka-monitor/pom.xml b/external/storm-kafka-monitor/pom.xml index 089a4c6..f74e178 100644 --- a/external/storm-kafka-monitor/pom.xml +++ b/external/storm-kafka-monitor/pom.xml @@ -60,12 +60,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/7f6d7063/external/storm-kafka/pom.xml ---------------------------------------------------------------------- diff --git a/external/storm-kafka/pom.xml b/external/storm-kafka/pom.xml index aa0454b..7129318 100644 --- a/external/storm-kafka/pom.xml +++ b/external/storm-kafka/pom.xml @@ -81,44 +81,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/7f6d7063/external/storm-kinesis/pom.xml ---------------------------------------------------------------------- diff --git a/external/storm-kinesis/pom.xml b/external/storm-kinesis/pom.xml index 0f6f16c..9b7d0dd 100644 --- a/external/storm-kinesis/pom.xml +++ b/external/storm-kinesis/pom.xml @@ -47,17 +47,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/7f6d7063/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index d61f021..8b84873 100644 --- a/pom.xml +++ b/pom.xml @@ -247,7 +247,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> @@ -764,10 +765,6 @@ <version>${curator.version}</version> <exclusions> <exclusion> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </exclusion> - <exclusion> <groupId>org.jboss.netty</groupId> <artifactId>netty</artifactId> </exclusion> @@ -777,16 +774,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> @@ -796,7 +783,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/7f6d7063/storm-core/pom.xml ---------------------------------------------------------------------- diff --git a/storm-core/pom.xml b/storm-core/pom.xml index 727631d..7f5b6f2 100644 --- a/storm-core/pom.xml +++ b/storm-core/pom.xml @@ -192,44 +192,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/7f6d7063/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 e84efbc..0c07066 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 Utils]) (: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]) @@ -692,7 +692,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/7f6d7063/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 9ed348c..d172bee 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 @@ -23,7 +23,7 @@ (:import [org.apache.storm.trident.testing MemoryBackingMap MemoryMapState]) (:import [org.apache.storm.utils ZookeeperAuthInfo Utils]) (: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]) @@ -112,7 +112,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/7f6d7063/storm-server/pom.xml ---------------------------------------------------------------------- diff --git a/storm-server/pom.xml b/storm-server/pom.xml index 2e803d0..02104be 100644 --- a/storm-server/pom.xml +++ b/storm-server/pom.xml @@ -70,16 +70,6 @@ <groupId>org.apache.curator</groupId> <artifactId>curator-test</artifactId> <scope>test</scope> - <exclusions> - <exclusion> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </exclusion> - <exclusion> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - </exclusion> - </exclusions> </dependency> <dependency> http://git-wip-us.apache.org/repos/asf/storm/blob/7f6d7063/storm-server/src/test/java/org/apache/storm/blobstore/BlobSynchronizerTest.java ---------------------------------------------------------------------- diff --git a/storm-server/src/test/java/org/apache/storm/blobstore/BlobSynchronizerTest.java b/storm-server/src/test/java/org/apache/storm/blobstore/BlobSynchronizerTest.java index c9f2825..ea12204 100644 --- a/storm-server/src/test/java/org/apache/storm/blobstore/BlobSynchronizerTest.java +++ b/storm-server/src/test/java/org/apache/storm/blobstore/BlobSynchronizerTest.java @@ -111,18 +111,16 @@ 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
