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 2015/08/21 20:31:34 UTC
[1/3] curator git commit: Added some better logging to
testRetryAfterFailure_Curator56()
Repository: curator
Updated Branches:
refs/heads/CURATOR-3.0 23710fe06 -> 2fc9e37f6
Added some better logging to testRetryAfterFailure_Curator56()
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/25f51498
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/25f51498
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/25f51498
Branch: refs/heads/CURATOR-3.0
Commit: 25f51498df05c50c7d6406d558a35dd8b54eb749
Parents: 2a39a45
Author: randgalt <ra...@apache.org>
Authored: Fri Aug 21 13:07:12 2015 -0500
Committer: randgalt <ra...@apache.org>
Committed: Fri Aug 21 13:07:12 2015 -0500
----------------------------------------------------------------------
.../curator/framework/recipes/queue/TestDistributedQueue.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/25f51498/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedQueue.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedQueue.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedQueue.java
index 80509bc..a191166 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedQueue.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/queue/TestDistributedQueue.java
@@ -109,7 +109,7 @@ public class TestDistributedQueue extends BaseClassForTests
retryCounter.await(10, TimeUnit.SECONDS);
Assert.assertEquals(retryCounter.getCount(), 0, "Queue item was not consumed. Retry counter is " + retryCounter.getCount());
Assert.assertEquals(names.size(), 2);
- Assert.assertEquals(names.get(0).length(), names.get(1).length());
+ Assert.assertEquals(names.get(0).length(), names.get(1).length(), "name1: " + names.get(0) + " - " + "name2: " + names.get(1));
}
finally
{
[3/3] curator git commit: Merge branch 'master' into CURATOR-3.0
Posted by ra...@apache.org.
Merge branch 'master' into CURATOR-3.0
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/2fc9e37f
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/2fc9e37f
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/2fc9e37f
Branch: refs/heads/CURATOR-3.0
Commit: 2fc9e37f63ef80cbd113474a977002843418ce8a
Parents: 23710fe 2266ca1
Author: randgalt <ra...@apache.org>
Authored: Fri Aug 21 13:31:25 2015 -0500
Committer: randgalt <ra...@apache.org>
Committed: Fri Aug 21 13:31:25 2015 -0500
----------------------------------------------------------------------
.../framework/recipes/queue/DistributedIdQueue.java | 13 ++++++++++++-
.../framework/recipes/queue/DistributedQueue.java | 7 ++++++-
.../framework/recipes/queue/TestDistributedQueue.java | 2 +-
3 files changed, 19 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
[2/3] curator git commit: CURATOR-224 broke the fix for CURATOR-56.
Introduced a new method, makeRequeueItemPath(),
so that items can be requeued in a way that's compatible with all the queue
types
Posted by ra...@apache.org.
CURATOR-224 broke the fix for CURATOR-56. Introduced a new method, makeRequeueItemPath(), so that items can be requeued in a way that's compatible with all the queue types
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/2266ca1f
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/2266ca1f
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/2266ca1f
Branch: refs/heads/CURATOR-3.0
Commit: 2266ca1fb1414bc8306fb1d6c4ac632a841f36ec
Parents: 25f5149
Author: randgalt <ra...@apache.org>
Authored: Fri Aug 21 13:30:48 2015 -0500
Committer: randgalt <ra...@apache.org>
Committed: Fri Aug 21 13:30:48 2015 -0500
----------------------------------------------------------------------
.../framework/recipes/queue/DistributedIdQueue.java | 13 ++++++++++++-
.../framework/recipes/queue/DistributedQueue.java | 7 ++++++-
2 files changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/2266ca1f/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedIdQueue.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedIdQueue.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedIdQueue.java
index dbd8e6e..15045aa 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedIdQueue.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedIdQueue.java
@@ -78,6 +78,12 @@ public class DistributedIdQueue<T> implements QueueBase<T>
{
internalSortChildren(children);
}
+
+ @Override
+ protected String makeRequeueItemPath(String itemPath)
+ {
+ return makeIdPath(parseId(itemPath).id);
+ }
};
if ( queue.makeItemPath().contains(Character.toString(SEPARATOR)) )
@@ -153,7 +159,7 @@ public class DistributedIdQueue<T> implements QueueBase<T>
queue.checkState();
- return queue.internalPut(item, null, queue.makeItemPath() + SEPARATOR + fixId(itemId) + SEPARATOR, maxWait, unit);
+ return queue.internalPut(item, null, makeIdPath(itemId), maxWait, unit);
}
/**
@@ -198,6 +204,11 @@ public class DistributedIdQueue<T> implements QueueBase<T>
return false;
}
+ private String makeIdPath(String itemId)
+ {
+ return queue.makeItemPath() + SEPARATOR + fixId(itemId) + SEPARATOR;
+ }
+
private void internalSortChildren(List<String> children)
{
Collections.sort
http://git-wip-us.apache.org/repos/asf/curator/blob/2266ca1f/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedQueue.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedQueue.java b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedQueue.java
index 3ed3218..3b63956 100644
--- a/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedQueue.java
+++ b/curator-recipes/src/main/java/org/apache/curator/framework/recipes/queue/DistributedQueue.java
@@ -756,7 +756,7 @@ public class DistributedQueue<T> implements QueueBase<T>
client.inTransaction()
.delete().forPath(itemPath)
.and()
- .create().withMode(CreateMode.PERSISTENT_SEQUENTIAL).forPath(itemPath, bytes)
+ .create().withMode(CreateMode.PERSISTENT_SEQUENTIAL).forPath(makeRequeueItemPath(itemPath), bytes)
.and()
.commit();
}
@@ -789,4 +789,9 @@ public class DistributedQueue<T> implements QueueBase<T>
return false;
}
+
+ protected String makeRequeueItemPath(String itemPath)
+ {
+ return makeItemPath();
+ }
}