svn commit: r31563 - in /dev/curator: 4.0.1/ 4.1.0/ 4.1.0/apache-curator-4.1.0-source-release.zip 4.1.0/apache-curator-4.1.0-source-release.zip.asc 4.1.0/apache-curator-4.1.0-source-release.zip.sha512
Author: randgalt Date: Mon Dec 17 04:03:47 2018 New Revision: 31563 Log: Apache Curator 4.1.0 Added: dev/curator/4.1.0/ dev/curator/4.1.0/apache-curator-4.1.0-source-release.zip (with props) dev/curator/4.1.0/apache-curator-4.1.0-source-release.zip.asc dev/curator/4.1.0/apache-curator-4.1.0-source-release.zip.sha512 Removed: dev/curator/4.0.1/ Added: dev/curator/4.1.0/apache-curator-4.1.0-source-release.zip == Binary file - no diff available. Propchange: dev/curator/4.1.0/apache-curator-4.1.0-source-release.zip -- svn:mime-type = application/octet-stream Added: dev/curator/4.1.0/apache-curator-4.1.0-source-release.zip.asc == --- dev/curator/4.1.0/apache-curator-4.1.0-source-release.zip.asc (added) +++ dev/curator/4.1.0/apache-curator-4.1.0-source-release.zip.asc Mon Dec 17 04:03:47 2018 @@ -0,0 +1,16 @@ +-BEGIN PGP SIGNATURE- + +iQIzBAABCgAdFiEECax9gPtrD5Q69+YalvCRT4jpJqQFAlwXGc8ACgkQlvCRT4jp +JqRBMRAAqpT0CPfL1XAw/nl97KrQIoXN067zJQOm8WVY2ut16I2cxVkEYRKwbL9F +DNn9HCr8Lday2TXNE7f7hgiHj/sxT518xA+zYppBzC4is5RF4WHKyG2MFidPWL2F +B64slwF68q2vodSLFoaBg8UktB9qQvCQYV6dQ1W86+L8MkvVQIHTFRyXEq0Kwkf8 +9Sygjroam+Xxc/iIN6j4VsuT+c0fhd33fbI+SGhXfYdFTcnogwuEzoREOnEH/dc5 +EWTjvU4AMdMujALgbEMy+OAA1raMVS2zb9Uq9uvECRkIDfnpjnsE/HltBTlwhB7w +qVKHWZX1VK63kcUs27WZfk865HG/rpbr0wyRFYLQ2pyXQuh25pJY/ZFcECwGwSCj +aDxi5Nx4m5XUzyWK+wEZhCoeveCrc2VBLS/E0mSsEt+oiKvZ53QyF+gnf5DChADS +L+J+2BnWE0ClWiEHPRDhGHbbCReddcBSGR4RsLU/5z/0dm1eceonfjA9BSlefi6B +uf2YHhXHn8ZvGIa96iLzgHBryd4GE0fR1W2Pr53s1te1jpJX4tyw2Ku3hKimzyqk +ipP+8vaqOhnot2OqTqLHO5lB4r3izLHV6C0K+JK+Fkr6omTTMLVsGoKqNr6aBuJU +hLIXEdf+GG6Nd7bgJ9DNj0AncIzmZqPwJYMrQk8ngWdVp93CaXw= +=4xmk +-END PGP SIGNATURE- Added: dev/curator/4.1.0/apache-curator-4.1.0-source-release.zip.sha512 == --- dev/curator/4.1.0/apache-curator-4.1.0-source-release.zip.sha512 (added) +++ dev/curator/4.1.0/apache-curator-4.1.0-source-release.zip.sha512 Mon Dec 17 04:03:47 2018 @@ -0,0 +1,3 @@ +/Users/jordanzimmerman/.m2/repository/org/apache/curator/apache-curator/4.1.0/apache-curator-4.1.0-source-release.zip: +C14D5D6D 81CB8101 888AB758 93834E74 DDB924D0 B886567A A24AB583 823C0DF9 2676C48F + 70B381CB 3D2E0F59 A483074F 7735DBB5 96F8E306 571B467D 1D094DEE
[curator] Git Push Summary
Repository: curator Updated Tags: refs/tags/apache-curator-4.0.2 [created] 9c7ac1fee refs/tags/apache-curator-4.0.2-SNAPSHOT [created] 5dac984b3 refs/tags/apache-curator-4.1.0 [created] e2a9a9b68
[2/3] curator git commit: CURATOR-495 - have methods return a CompletableFuture so that callers can check completion, etc.
CURATOR-495 - have methods return a CompletableFuture so that callers can check completion, etc. Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/4fa5c1d4 Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/4fa5c1d4 Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/4fa5c1d4 Branch: refs/heads/master Commit: 4fa5c1d4d2e0d344db21c52c61e305836ea1bde5 Parents: f91adb2 Author: randgalt Authored: Fri Dec 14 14:20:12 2018 -0500 Committer: randgalt Committed: Fri Dec 14 14:20:12 2018 -0500 -- .../apache/curator/framework/CuratorFramework.java| 9 ++--- .../curator/framework/imps/CuratorFrameworkImpl.java | 14 +++--- 2 files changed, 9 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/curator/blob/4fa5c1d4/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java -- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java b/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java index 02c458a..3737faa 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java @@ -34,6 +34,7 @@ import org.apache.curator.utils.EnsurePath; import org.apache.zookeeper.Watcher; import org.apache.zookeeper.server.quorum.flexible.QuorumVerifier; import java.io.Closeable; +import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; /** @@ -335,11 +336,12 @@ public interface CuratorFramework extends Closeable * done from the {@link #runSafe(Runnable)} thread. * * @param monitorHolder object to sync on and notify + * @return a CompletableFuture that can be used to monitor when the call is complete * @since 4.1.0 */ -default void postSafeNotify(Object monitorHolder) +default CompletableFuture postSafeNotify(Object monitorHolder) { -runSafe(() -> { +return runSafe(() -> { synchronized(monitorHolder) { monitorHolder.notifyAll(); } @@ -351,7 +353,8 @@ public interface CuratorFramework extends Closeable * and other blocking calls that might normally block ZooKeeper's event thread. * @param runnable proc to call from a safe internal thread + * @return a CompletableFuture that can be used to monitor when the call is complete * @since 4.1.0 */ -void runSafe(Runnable runnable); +CompletableFuture runSafe(Runnable runnable); } http://git-wip-us.apache.org/repos/asf/curator/blob/4fa5c1d4/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java -- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java b/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java index 34002a0..736b737 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java @@ -58,15 +58,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.Callable; -import java.util.concurrent.DelayQueue; -import java.util.concurrent.Executor; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.ThreadFactory; -import java.util.concurrent.TimeUnit; +import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicLong; import java.util.concurrent.atomic.AtomicReference; @@ -194,9 +186,9 @@ public class CuratorFrameworkImpl implements CuratorFramework } @Override -public void runSafe(Runnable runnable) +public CompletableFuture runSafe(Runnable runnable) { -runSafeService.execute(runnable); +return CompletableFuture.runAsync(runnable, runSafeService); } @Override
[1/3] curator git commit: CURATOR-495
Repository: curator Updated Branches: refs/heads/master 22c028f56 -> 2e802efed CURATOR-495 Fixes race in many Curator recipes whereby a pattern was used that called "notifyAll" in a synchronized block in response to a ZooKeeper watcher callback. This created a race and possible deadlock if the recipe instance was already in a synchronized block. This would result in the ZK event thread getting blocked which would prevent ZK connections from getting repaired. This change adds a new executor (available from CuratorFramework) that can be used to do the sync/notify so that ZK's event thread is not blocked. Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/f91adb22 Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/f91adb22 Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/f91adb22 Branch: refs/heads/master Commit: f91adb22e83d8e47b99ad98f8c13c86251bc4cb3 Parents: 22c028f Author: randgalt Authored: Thu Dec 13 20:34:40 2018 -0500 Committer: randgalt Committed: Thu Dec 13 20:34:40 2018 -0500 -- .../curator/framework/CuratorFramework.java | 35 .../framework/CuratorFrameworkFactory.java | 27 ++- .../framework/imps/CuratorFrameworkImpl.java| 25 ++ .../recipes/barriers/DistributedBarrier.java| 7 +--- .../barriers/DistributedDoubleBarrier.java | 13 .../recipes/locks/InterProcessSemaphoreV2.java | 14 +++- .../framework/recipes/locks/LockInternals.java | 11 ++ 7 files changed, 94 insertions(+), 38 deletions(-) -- http://git-wip-us.apache.org/repos/asf/curator/blob/f91adb22/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java -- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java b/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java index bf6167c..02c458a 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/CuratorFramework.java @@ -25,16 +25,14 @@ import org.apache.curator.framework.api.transaction.CuratorMultiTransaction; import org.apache.curator.framework.api.transaction.CuratorOp; import org.apache.curator.framework.api.transaction.CuratorTransaction; import org.apache.curator.framework.api.transaction.TransactionOp; -import org.apache.curator.framework.imps.CuratorFrameworkImpl; import org.apache.curator.framework.imps.CuratorFrameworkState; import org.apache.curator.framework.listen.Listenable; import org.apache.curator.framework.schema.SchemaSet; -import org.apache.curator.framework.state.ConnectionStateListener; import org.apache.curator.framework.state.ConnectionStateErrorPolicy; +import org.apache.curator.framework.state.ConnectionStateListener; import org.apache.curator.utils.EnsurePath; import org.apache.zookeeper.Watcher; import org.apache.zookeeper.server.quorum.flexible.QuorumVerifier; - import java.io.Closeable; import java.util.concurrent.TimeUnit; @@ -269,7 +267,7 @@ public interface CuratorFramework extends Closeable * Call this method on watchers you are no longer interested in. * * @param watcher the watcher - * + * * @deprecated As of ZooKeeper 3.5 Curators recipes will handle removing watcher references * when they are no longer used. If you write your own recipe, follow the example of Curator * recipes and use {@link #newWatcherRemoveCuratorFramework} calling {@link WatcherRemoveCuratorFramework#removeWatchers()} @@ -277,7 +275,7 @@ public interface CuratorFramework extends Closeable */ @Deprecated public void clearWatcherReferences(Watcher watcher); - + /** * Block until a connection to ZooKeeper is available or the maxWaitTime has been exceeded * @param maxWaitTime The maximum wait time. Specify a value = 0 to wait indefinitely @@ -286,7 +284,7 @@ public interface CuratorFramework extends Closeable * @throws InterruptedException If interrupted while waiting */ public boolean blockUntilConnected(int maxWaitTime, TimeUnit units) throws InterruptedException; - + /** * Block until a connection to ZooKeeper is available. This method will not return until a * connection is available or it is interrupted, in which case an InterruptedException will @@ -331,4 +329,29 @@ public interface CuratorFramework extends Closeable * @return true/false */ boolean isZk34CompatibilityMode(); + +/** + * Calls {@link #notifyAll()} on the given object after first synchronizing on it. This is + * done from the {@link
[3/3] curator git commit: CURATOR-495 runSafeService should return this
CURATOR-495 runSafeService should return this Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/2e802efe Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/2e802efe Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/2e802efe Branch: refs/heads/master Commit: 2e802efeddd28b3cd6c0d96fb0708c0f0a94a35c Parents: 4fa5c1d Author: randgalt Authored: Sun Dec 16 19:59:06 2018 -0500 Committer: randgalt Committed: Sun Dec 16 19:59:06 2018 -0500 -- .../java/org/apache/curator/framework/CuratorFrameworkFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/curator/blob/2e802efe/curator-framework/src/main/java/org/apache/curator/framework/CuratorFrameworkFactory.java -- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/CuratorFrameworkFactory.java b/curator-framework/src/main/java/org/apache/curator/framework/CuratorFrameworkFactory.java index 86fbfce..395df71 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/CuratorFrameworkFactory.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/CuratorFrameworkFactory.java @@ -491,7 +491,7 @@ public class CuratorFrameworkFactory public Builder runSafeService(Executor runSafeService) { this.runSafeService = runSafeService; -return null; +return this; } public Executor getRunSafeService()
curator git commit: CURATOR-495 runSafeService should return this
Repository: curator Updated Branches: refs/heads/CURATOR-495 4fa5c1d4d -> 2e802efed CURATOR-495 runSafeService should return this Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/2e802efe Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/2e802efe Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/2e802efe Branch: refs/heads/CURATOR-495 Commit: 2e802efeddd28b3cd6c0d96fb0708c0f0a94a35c Parents: 4fa5c1d Author: randgalt Authored: Sun Dec 16 19:59:06 2018 -0500 Committer: randgalt Committed: Sun Dec 16 19:59:06 2018 -0500 -- .../java/org/apache/curator/framework/CuratorFrameworkFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/curator/blob/2e802efe/curator-framework/src/main/java/org/apache/curator/framework/CuratorFrameworkFactory.java -- diff --git a/curator-framework/src/main/java/org/apache/curator/framework/CuratorFrameworkFactory.java b/curator-framework/src/main/java/org/apache/curator/framework/CuratorFrameworkFactory.java index 86fbfce..395df71 100644 --- a/curator-framework/src/main/java/org/apache/curator/framework/CuratorFrameworkFactory.java +++ b/curator-framework/src/main/java/org/apache/curator/framework/CuratorFrameworkFactory.java @@ -491,7 +491,7 @@ public class CuratorFrameworkFactory public Builder runSafeService(Executor runSafeService) { this.runSafeService = runSafeService; -return null; +return this; } public Executor getRunSafeService()