Repository: helix Updated Branches: refs/heads/helix-0.6.x 1798e7935 -> 1dc2aae0d
[Helix-612] Bump up the version of zkClient and zookeeper to avoid NPE Project: http://git-wip-us.apache.org/repos/asf/helix/repo Commit: http://git-wip-us.apache.org/repos/asf/helix/commit/308c2cc6 Tree: http://git-wip-us.apache.org/repos/asf/helix/tree/308c2cc6 Diff: http://git-wip-us.apache.org/repos/asf/helix/diff/308c2cc6 Branch: refs/heads/helix-0.6.x Commit: 308c2cc6f45d9c942d9b4a8f52e4cf534528e2d5 Parents: b72ff29 Author: Congrui Ji <c...@linkedin.com> Authored: Thu Sep 24 10:03:40 2015 -0700 Committer: Congrui Ji <c...@linkedin.com> Committed: Thu Sep 24 10:03:40 2015 -0700 ---------------------------------------------------------------------- helix-core/helix-core-0.6.6-SNAPSHOT.ivy | 4 ++-- helix-core/pom.xml | 6 +++--- .../java/org/apache/helix/manager/zk/ZKHelixManager.java | 4 ++++ .../java/org/apache/helix/manager/zk/ZkCallbackCache.java | 3 +++ .../src/main/java/org/apache/helix/manager/zk/ZkClient.java | 1 - .../src/main/java/org/apache/helix/tools/ZKLogFormatter.java | 5 +---- .../src/test/java/org/apache/helix/TestZkClientWrapper.java | 4 ++++ helix-core/src/test/java/org/apache/helix/ZkTestHelper.java | 8 ++++++++ .../src/test/java/org/apache/helix/ZkUnitTestBase.java | 4 ++++ .../java/org/apache/helix/manager/zk/TestZkFlapping.java | 6 +++++- recipes/rabbitmq-consumer-group/pom.xml | 4 ++-- recipes/rsync-replicated-file-system/pom.xml | 4 ++-- 12 files changed, 38 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/helix/blob/308c2cc6/helix-core/helix-core-0.6.6-SNAPSHOT.ivy ---------------------------------------------------------------------- diff --git a/helix-core/helix-core-0.6.6-SNAPSHOT.ivy b/helix-core/helix-core-0.6.6-SNAPSHOT.ivy index 35fc9af..8143ca0 100644 --- a/helix-core/helix-core-0.6.6-SNAPSHOT.ivy +++ b/helix-core/helix-core-0.6.6-SNAPSHOT.ivy @@ -47,13 +47,13 @@ under the License. <dependencies> <dependency org="log4j" name="log4j" rev="1.2.15" conf="compile->compile(default);runtime->runtime(default);default->default"/> - <dependency org="org.apache.zookeeper" name="zookeeper" rev="3.3.4" conf="compile->compile(default);runtime->runtime(default);default->default"/> + <dependency org="org.apache.zookeeper" name="zookeeper" rev="3.4.6" conf="compile->compile(default);runtime->runtime(default);default->default"/> <dependency org="org.codehaus.jackson" name="jackson-core-asl" rev="1.8.5" conf="compile->compile(default);runtime->runtime(default);default->default"/> <dependency org="org.codehaus.jackson" name="jackson-mapper-asl" rev="1.8.5" conf="compile->compile(default);runtime->runtime(default);default->default"/> <dependency org="commons-io" name="commons-io" rev="1.4" conf="compile->compile(default);runtime->runtime(default);default->default"/> <dependency org="commons-cli" name="commons-cli" rev="1.2" conf="compile->compile(default);runtime->runtime(default);default->default"/> <dependency org="commons-math" name="commons-math" rev="2.1" conf="compile->compile(default);runtime->runtime(default);default->default"/> - <dependency org="com.github.sgroschupf" name="zkclient" rev="0.1" conf="compile->compile(default);runtime->runtime(default);default->default"/> + <dependency org="com.101tec" name="zkclient" rev="0.5" conf="compile->compile(default);runtime->runtime(default);default->default"/> <dependency org="com.google.guava" name="guava" rev="15.0" conf="compile->compile(default);runtime->runtime(default);default->default"/> <dependency org="org.yaml" name="snakeyaml" rev="1.12" conf="compile->compile(default);runtime->runtime(default);default->default"/> <dependency org="commons-logging" name="commons-logging-api" rev="1.1" conf="compile->compile(*),master(*);runtime->runtime(*)"/> http://git-wip-us.apache.org/repos/asf/helix/blob/308c2cc6/helix-core/pom.xml ---------------------------------------------------------------------- diff --git a/helix-core/pom.xml b/helix-core/pom.xml index 3657c6b..0af60ed 100644 --- a/helix-core/pom.xml +++ b/helix-core/pom.xml @@ -80,7 +80,7 @@ under the License. <dependency> <groupId>org.apache.zookeeper</groupId> <artifactId>zookeeper</artifactId> - <version>3.3.4</version> + <version>3.4.6</version> <exclusions> <exclusion> <groupId>junit</groupId> @@ -109,9 +109,9 @@ under the License. <version>1.2</version> </dependency> <dependency> - <groupId>com.github.sgroschupf</groupId> + <groupId>com.101tec</groupId> <artifactId>zkclient</artifactId> - <version>0.1</version> + <version>0.5</version> </dependency> <dependency> <groupId>org.testng</groupId> http://git-wip-us.apache.org/repos/asf/helix/blob/308c2cc6/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java ---------------------------------------------------------------------- diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java b/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java index d6dfe60..8bf8a54 100644 --- a/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java +++ b/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixManager.java @@ -916,4 +916,8 @@ public class ZKHelixManager implements HelixManager, IZkStateListener { checkConnected(); return _participantHealthInfoCollector; } + + @Override + public void handleSessionEstablishmentError(Throwable var1) throws Exception { + } } http://git-wip-us.apache.org/repos/asf/helix/blob/308c2cc6/helix-core/src/main/java/org/apache/helix/manager/zk/ZkCallbackCache.java ---------------------------------------------------------------------- diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/ZkCallbackCache.java b/helix-core/src/main/java/org/apache/helix/manager/zk/ZkCallbackCache.java index d1e3af3..e7884ce 100644 --- a/helix-core/src/main/java/org/apache/helix/manager/zk/ZkCallbackCache.java +++ b/helix-core/src/main/java/org/apache/helix/manager/zk/ZkCallbackCache.java @@ -297,4 +297,7 @@ public class ZkCallbackCache<T> extends Cache<T> implements IZkChildListener, IZ } } + @Override + public void handleSessionEstablishmentError(Throwable var1) throws Exception { + } } http://git-wip-us.apache.org/repos/asf/helix/blob/308c2cc6/helix-core/src/main/java/org/apache/helix/manager/zk/ZkClient.java ---------------------------------------------------------------------- diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/ZkClient.java b/helix-core/src/main/java/org/apache/helix/manager/zk/ZkClient.java index 139fedd..48feacc 100644 --- a/helix-core/src/main/java/org/apache/helix/manager/zk/ZkClient.java +++ b/helix-core/src/main/java/org/apache/helix/manager/zk/ZkClient.java @@ -143,7 +143,6 @@ public class ZkClient extends org.I0Itec.zkclient.ZkClient { */ Thread.interrupted(); _connection.close(); - _connection = null; /** * restore interrupted status of current thread */ http://git-wip-us.apache.org/repos/asf/helix/blob/308c2cc6/helix-core/src/main/java/org/apache/helix/tools/ZKLogFormatter.java ---------------------------------------------------------------------- diff --git a/helix-core/src/main/java/org/apache/helix/tools/ZKLogFormatter.java b/helix-core/src/main/java/org/apache/helix/tools/ZKLogFormatter.java index da63b9e..999c5e9 100644 --- a/helix-core/src/main/java/org/apache/helix/tools/ZKLogFormatter.java +++ b/helix-core/src/main/java/org/apache/helix/tools/ZKLogFormatter.java @@ -22,7 +22,6 @@ package org.apache.helix.tools; import java.beans.Introspector; import java.beans.PropertyDescriptor; import java.io.BufferedWriter; -import java.io.ByteArrayInputStream; import java.io.EOFException; import java.io.File; import java.io.FileInputStream; @@ -40,7 +39,6 @@ import java.util.zip.Checksum; import javax.xml.bind.annotation.adapters.HexBinaryAdapter; import org.apache.jute.BinaryInputArchive; -import org.apache.jute.InputArchive; import org.apache.jute.Record; import org.apache.log4j.Logger; import org.apache.zookeeper.KeeperException.NoNodeException; @@ -250,9 +248,8 @@ public class ZKLogFormatter { if (crcValue != crc.getValue()) { throw new IOException("CRC doesn't match " + crcValue + " vs " + crc.getValue()); } - InputArchive iab = BinaryInputArchive.getArchive(new ByteArrayInputStream(bytes)); TxnHeader hdr = new TxnHeader(); - Record txn = SerializeUtils.deserializeTxn(iab, hdr); + Record txn = SerializeUtils.deserializeTxn(bytes, hdr); if (bw != null) { bw.write(formatTransaction(hdr, txn)); bw.newLine(); http://git-wip-us.apache.org/repos/asf/helix/blob/308c2cc6/helix-core/src/test/java/org/apache/helix/TestZkClientWrapper.java ---------------------------------------------------------------------- diff --git a/helix-core/src/test/java/org/apache/helix/TestZkClientWrapper.java b/helix-core/src/test/java/org/apache/helix/TestZkClientWrapper.java index 0bbfd7f..bc3d266 100644 --- a/helix-core/src/test/java/org/apache/helix/TestZkClientWrapper.java +++ b/helix-core/src/test/java/org/apache/helix/TestZkClientWrapper.java @@ -85,6 +85,10 @@ public class TestZkClientWrapper extends ZkUnitTestBase { public void handleNewSession() throws Exception { System.out.println("In Old connection New session"); } + + @Override + public void handleSessionEstablishmentError(Throwable var1) throws Exception { + } }; _zkClient.subscribeStateChanges(listener); http://git-wip-us.apache.org/repos/asf/helix/blob/308c2cc6/helix-core/src/test/java/org/apache/helix/ZkTestHelper.java ---------------------------------------------------------------------- diff --git a/helix-core/src/test/java/org/apache/helix/ZkTestHelper.java b/helix-core/src/test/java/org/apache/helix/ZkTestHelper.java index d6d0ff3..6318b67 100644 --- a/helix-core/src/test/java/org/apache/helix/ZkTestHelper.java +++ b/helix-core/src/test/java/org/apache/helix/ZkTestHelper.java @@ -95,6 +95,10 @@ public class ZkTestHelper { LOG.info("handleNewSession. sessionId: " + Long.toHexString(curZookeeper.getSessionId())); } + + @Override + public void handleSessionEstablishmentError(Throwable var1) throws Exception { + } }; zkClient.subscribeStateChanges(listener); @@ -146,6 +150,10 @@ public class ZkTestHelper { LOG.info("handleNewSession. sessionId: " + Long.toHexString(curZookeeper.getSessionId())); waitNewSession.countDown(); } + + @Override + public void handleSessionEstablishmentError(Throwable var1) throws Exception { + } }; zkClient.subscribeStateChanges(listener); http://git-wip-us.apache.org/repos/asf/helix/blob/308c2cc6/helix-core/src/test/java/org/apache/helix/ZkUnitTestBase.java ---------------------------------------------------------------------- diff --git a/helix-core/src/test/java/org/apache/helix/ZkUnitTestBase.java b/helix-core/src/test/java/org/apache/helix/ZkUnitTestBase.java index 48312e7..83f3d30 100644 --- a/helix-core/src/test/java/org/apache/helix/ZkUnitTestBase.java +++ b/helix-core/src/test/java/org/apache/helix/ZkUnitTestBase.java @@ -225,6 +225,10 @@ public class ZkUnitTestBase { public void handleNewSession() throws Exception { LOG.info("In Old connection, new session"); } + + @Override + public void handleSessionEstablishmentError(Throwable var1) throws Exception { + } }; zkClient.subscribeStateChanges(listener); ZkConnection connection = ((ZkConnection) zkClient.getConnection()); http://git-wip-us.apache.org/repos/asf/helix/blob/308c2cc6/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkFlapping.java ---------------------------------------------------------------------- diff --git a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkFlapping.java b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkFlapping.java index 370ee05..b567e4a 100644 --- a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkFlapping.java +++ b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkFlapping.java @@ -130,6 +130,10 @@ public class TestZkFlapping extends ZkUnitTestBase { @Override public void handleNewSession() throws Exception { } + + @Override + public void handleSessionEstablishmentError(Throwable var1) throws Exception { + } } @Test @@ -290,4 +294,4 @@ public class TestZkFlapping extends ZkUnitTestBase { System.out.println("END " + clusterName + " at " + new Date(System.currentTimeMillis())); } -} \ No newline at end of file +} http://git-wip-us.apache.org/repos/asf/helix/blob/308c2cc6/recipes/rabbitmq-consumer-group/pom.xml ---------------------------------------------------------------------- diff --git a/recipes/rabbitmq-consumer-group/pom.xml b/recipes/rabbitmq-consumer-group/pom.xml index 071168f..004018e 100644 --- a/recipes/rabbitmq-consumer-group/pom.xml +++ b/recipes/rabbitmq-consumer-group/pom.xml @@ -83,9 +83,9 @@ under the License. </exclusions> </dependency> <dependency> - <groupId>com.github.sgroschupf</groupId> + <groupId>com.101tec</groupId> <artifactId>zkclient</artifactId> - <version>0.1</version> + <version>0.5</version> </dependency> </dependencies> <build> http://git-wip-us.apache.org/repos/asf/helix/blob/308c2cc6/recipes/rsync-replicated-file-system/pom.xml ---------------------------------------------------------------------- diff --git a/recipes/rsync-replicated-file-system/pom.xml b/recipes/rsync-replicated-file-system/pom.xml index 294c112..5bc80a3 100644 --- a/recipes/rsync-replicated-file-system/pom.xml +++ b/recipes/rsync-replicated-file-system/pom.xml @@ -82,9 +82,9 @@ under the License. <version>1.0</version> </dependency> <dependency> - <groupId>com.github.sgroschupf</groupId> + <groupId>com.101tec</groupId> <artifactId>zkclient</artifactId> - <version>0.1</version> + <version>0.5</version> </dependency> </dependencies> <build>