You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ra...@apache.org on 2017/10/05 14:15:25 UTC

[1/3] curator git commit: Need to set value of root to empty, not null

Repository: curator
Updated Branches:
  refs/heads/persistent-watch d7bf1a246 -> 79de36d56


Need to set value of root to empty, not null


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

Branch: refs/heads/persistent-watch
Commit: 9cfc9d9c0fd3f7bda49c798f5bde365583a14bf9
Parents: d7bf1a2
Author: randgalt <ra...@apache.org>
Authored: Thu Oct 5 10:24:14 2017 +0200
Committer: randgalt <ra...@apache.org>
Committed: Thu Oct 5 10:24:14 2017 +0200

----------------------------------------------------------------------
 .../recipes/cache/TestTreeCacheBridgeWrapperRandomTree.java        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/9cfc9d9c/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestTreeCacheBridgeWrapperRandomTree.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestTreeCacheBridgeWrapperRandomTree.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestTreeCacheBridgeWrapperRandomTree.java
index 03d0999..ba3e36a 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestTreeCacheBridgeWrapperRandomTree.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestTreeCacheBridgeWrapperRandomTree.java
@@ -65,7 +65,7 @@ public class TestTreeCacheBridgeWrapperRandomTree extends BaseTestTreeCache<Cura
 
     @Test
     public void testGiantRandomDeepTree() throws Exception {
-        client.create().forPath("/tree", null);
+        client.create().forPath("/tree", new byte[0]);
         CuratorFramework cl = client.usingNamespace("tree");
         cache = newCacheWithListeners(cl, "/");
         cache.start();


[2/3] curator git commit: Oops - forgot to uncomment line of code

Posted by ra...@apache.org.
Oops - forgot to uncomment line of code


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

Branch: refs/heads/persistent-watch
Commit: b1e2b5cc12a35092a0280ff5d383085f2f79be30
Parents: 9cfc9d9
Author: randgalt <ra...@apache.org>
Authored: Thu Oct 5 10:34:14 2017 +0200
Committer: randgalt <ra...@apache.org>
Committed: Thu Oct 5 10:34:14 2017 +0200

----------------------------------------------------------------------
 .../org/apache/curator/framework/imps/ReconfigBuilderImpl.java     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/b1e2b5cc/curator-framework/src/main/java/org/apache/curator/framework/imps/ReconfigBuilderImpl.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/ReconfigBuilderImpl.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/ReconfigBuilderImpl.java
index 321e060..e70c11b 100644
--- a/curator-framework/src/main/java/org/apache/curator/framework/imps/ReconfigBuilderImpl.java
+++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/ReconfigBuilderImpl.java
@@ -287,7 +287,7 @@ public class ReconfigBuilderImpl implements ReconfigBuilder, BackgroundOperation
                     @Override
                     public byte[] call() throws Exception
                     {
-                        return null;//client.getZooKeeper().reconfig(joining, leaving, newMembers, fromConfig, responseStat);
+                        return client.getZooKeeper().reconfig(joining, leaving, newMembers, fromConfig, responseStat);
                     }
                 }
             );


[3/3] curator git commit: Oops - forgot to uncomment line of code

Posted by ra...@apache.org.
Oops - forgot to uncomment line of code


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

Branch: refs/heads/persistent-watch
Commit: 79de36d56ac945e35094f4c8c9d1471c289dfb49
Parents: b1e2b5c
Author: randgalt <ra...@apache.org>
Authored: Thu Oct 5 16:15:18 2017 +0200
Committer: randgalt <ra...@apache.org>
Committed: Thu Oct 5 16:15:18 2017 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/curator/RetryLoop.java    |  6 ++++--
 .../curator/framework/imps/ReconfigBuilderImpl.java    |  2 +-
 .../recipes/locks/TestInterProcessMutexBase.java       | 13 +++++++++++--
 3 files changed, 16 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/79de36d5/curator-client/src/main/java/org/apache/curator/RetryLoop.java
----------------------------------------------------------------------
diff --git a/curator-client/src/main/java/org/apache/curator/RetryLoop.java b/curator-client/src/main/java/org/apache/curator/RetryLoop.java
index 51df662..7b6bff2 100644
--- a/curator-client/src/main/java/org/apache/curator/RetryLoop.java
+++ b/curator-client/src/main/java/org/apache/curator/RetryLoop.java
@@ -18,6 +18,7 @@
  */
 package org.apache.curator;
 
+import com.google.common.base.Throwables;
 import org.apache.curator.drivers.EventTrace;
 import org.apache.curator.drivers.TracerDriver;
 import org.apache.curator.utils.DebugUtils;
@@ -147,9 +148,10 @@ public class RetryLoop
      */
     public static boolean      isRetryException(Throwable exception)
     {
-        if ( exception instanceof KeeperException )
+        Throwable rootCause = Throwables.getRootCause(exception);
+        if ( rootCause instanceof KeeperException )
         {
-            KeeperException     keeperException = (KeeperException)exception;
+            KeeperException keeperException = (KeeperException)rootCause;
             return shouldRetry(keeperException.code().intValue());
         }
         return false;

http://git-wip-us.apache.org/repos/asf/curator/blob/79de36d5/curator-framework/src/main/java/org/apache/curator/framework/imps/ReconfigBuilderImpl.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/ReconfigBuilderImpl.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/ReconfigBuilderImpl.java
index e70c11b..97be59a 100644
--- a/curator-framework/src/main/java/org/apache/curator/framework/imps/ReconfigBuilderImpl.java
+++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/ReconfigBuilderImpl.java
@@ -268,7 +268,7 @@ public class ReconfigBuilderImpl implements ReconfigBuilder, BackgroundOperation
                     client.processBackgroundOperation(data, event);
                 }
             };
-            //client.getZooKeeper().reconfig(joining, leaving, newMembers, fromConfig, callback, backgrounding.getContext());
+            client.getZooKeeper().reconfig(joining, leaving, newMembers, fromConfig, callback, backgrounding.getContext());
         }
         catch ( Throwable e )
         {

http://git-wip-us.apache.org/repos/asf/curator/blob/79de36d5/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessMutexBase.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessMutexBase.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessMutexBase.java
index cf44daf..1662dd4 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessMutexBase.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/locks/TestInterProcessMutexBase.java
@@ -19,6 +19,7 @@
 
 package org.apache.curator.framework.recipes.locks;
 
+import com.google.common.base.Throwables;
 import com.google.common.collect.Lists;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
@@ -133,9 +134,17 @@ public abstract class TestInterProcessMutexBase extends BaseClassForTests
                                 {
                                     lock.release();
                                 }
-                                catch ( KeeperException.SessionExpiredException dummy )
+                                catch ( Exception e )
                                 {
-                                    // happens sometimes with a few tests - ignore
+                                    //noinspection StatementWithEmptyBody
+                                    if ( Throwables.getRootCause(e) instanceof KeeperException.SessionExpiredException )
+                                    {
+                                        // happens sometimes with a few tests - ignore
+                                    }
+                                    else
+                                    {
+                                        throw e;
+                                    }
                                 }
                             }
                             return result;