[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-04-09 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=419371&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-419371
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 09/Apr/20 12:18
Start Date: 09/Apr/20 12:18
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #336: [CURATOR-549] 
Bridge facade for ModeledCache and ServiceCache, etc.
URL: https://github.com/apache/curator/pull/336
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 419371)
Time Spent: 20h 10m  (was: 20h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 20h 10m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-04-08 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=419101&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-419101
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 09/Apr/20 03:17
Start Date: 09/Apr/20 03:17
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #356: [CURATOR-549] 
- TreeCacheIterator needed by upcoming CuratorCacheBridge
URL: https://github.com/apache/curator/pull/356
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 419101)
Time Spent: 20h  (was: 19h 50m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 20h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-04-08 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=419100&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-419100
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 09/Apr/20 03:15
Start Date: 09/Apr/20 03:15
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #336: [CURATOR-549] 
Bridge facade for ModeledCache and ServiceCache, etc.
URL: https://github.com/apache/curator/pull/336#discussion_r405932562
 
 

 ##
 File path: 
curator-x-async/src/main/java/org/apache/curator/x/async/modeled/details/ModeledCacheImpl.java
 ##
 @@ -148,38 +165,32 @@ public void childEvent(CuratorFramework client, 
TreeCacheEvent event)
 }
 }
 
-private void internalChildEvent(TreeCacheEvent event) throws Exception
+private void internalChildEvent(TreeCacheEvent event)
 
 Review comment:
   > but in case of CuratorCache, it can be called only on the event thread
   
   No, it isn't. Listeners are called via `client.runSafe(() -> 
listenerManager.forEach(proc));`
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 419100)
Time Spent: 19h 50m  (was: 19h 40m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 19h 50m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-04-08 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=419099&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-419099
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 09/Apr/20 03:13
Start Date: 09/Apr/20 03:13
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #336: [CURATOR-549] 
Bridge facade for ModeledCache and ServiceCache, etc.
URL: https://github.com/apache/curator/pull/336#discussion_r405932166
 
 

 ##
 File path: 
curator-x-async/src/main/java/org/apache/curator/x/async/modeled/details/ModeledCacheImpl.java
 ##
 @@ -42,11 +46,12 @@
 
 class ModeledCacheImpl implements TreeCacheListener, ModeledCache
 {
-private final TreeCache cache;
+private final CuratorCacheBridge cache;
 private final Map> entries = new ConcurrentHashMap<>();
 private final ModelSerializer serializer;
 private final StandardListenerManager> 
listenerContainer = StandardListenerManager.standard();
 private final ZPath basePath;
+private final EnsureContainers ensureContainers;
 
 Review comment:
   I think it was copying PathChildrenCache. With PersistentWatchers it's not 
necessary to have the ZNodes exist as the watcher is independent. So, it's not 
needed with CuratorCache.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 419099)
Time Spent: 19h 40m  (was: 19.5h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 19h 40m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-04-08 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=419098&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-419098
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 09/Apr/20 03:13
Start Date: 09/Apr/20 03:13
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #336: [CURATOR-549] 
Bridge facade for ModeledCache and ServiceCache, etc.
URL: https://github.com/apache/curator/pull/336#discussion_r405932004
 
 

 ##
 File path: 
curator-recipes/src/test/java/org/apache/curator/framework/recipes/nodes/TestGroupMember.java
 ##
 @@ -25,11 +25,13 @@
 import org.apache.curator.retry.RetryOneTime;
 import org.apache.curator.test.BaseClassForTests;
 import org.apache.curator.test.Timing;
+import org.apache.curator.test.compatibility.CuratorTestBase;
 import org.apache.curator.utils.CloseableUtils;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 import java.util.Map;
 
+@Test(groups = CuratorTestBase.zk35TestCompatibilityGroup)
 
 Review comment:
   We now have a (new) curator-test-zk35 module that tests ZooKeeper 3.5.x 
compatibility. This release will use ZooKeeper 3.6.x as the base.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 419098)
Time Spent: 19.5h  (was: 19h 20m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 19.5h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-04-08 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=419097&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-419097
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 09/Apr/20 03:12
Start Date: 09/Apr/20 03:12
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #336: [CURATOR-549] 
Bridge facade for ModeledCache and ServiceCache, etc.
URL: https://github.com/apache/curator/pull/336#discussion_r405931835
 
 

 ##
 File path: 
curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestCuratorCacheBridge.java
 ##
 @@ -0,0 +1,65 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.curator.framework.recipes.cache;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.CuratorFrameworkFactory;
+import org.apache.curator.retry.RetryOneTime;
+import org.apache.curator.test.compatibility.CuratorTestBase;
+import org.apache.curator.utils.Compatibility;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class TestCuratorCacheBridge extends CuratorTestBase
+{
+public void testImplementationSelection()
 
 Review comment:
   Good catch
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 419097)
Time Spent: 19h 20m  (was: 19h 10m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 19h 20m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-04-08 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=419096&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-419096
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 09/Apr/20 03:10
Start Date: 09/Apr/20 03:10
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #336: [CURATOR-549] 
Bridge facade for ModeledCache and ServiceCache, etc.
URL: https://github.com/apache/curator/pull/336#discussion_r405931390
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheBridge.java
 ##
 @@ -0,0 +1,36 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+/**
+ * A facade that uses {@link 
org.apache.curator.framework.recipes.cache.CuratorCache} if
+ * persistent watches are available or a {@link 
org.apache.curator.framework.recipes.cache.TreeCache}
+ * otherwise
+ */
+@SuppressWarnings("deprecation")
+public interface CuratorCacheBridge extends CuratorCache
+{
+/**
+ * Returns true if the underlying cache is {@link 
org.apache.curator.framework.recipes.cache.CuratorCache} (i.e. ZooKeeper 3.6+).
+ * Otherwise it is {@link 
org.apache.curator.framework.recipes.cache.TreeCache} (i.e. ZooKeeper 3.5.x)
+ *
+ * @return true/false
+ */
+boolean isCuratorCache();
 
 Review comment:
   Technically, no. TBH this class will mostly be used internally.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 419096)
Time Spent: 19h 10m  (was: 19h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 19h 10m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-04-04 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=416064&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-416064
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 04/Apr/20 22:23
Start Date: 04/Apr/20 22:23
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #336: [CURATOR-549] 
Bridge facade for ModeledCache and ServiceCache, etc.
URL: https://github.com/apache/curator/pull/336#discussion_r403543136
 
 

 ##
 File path: 
curator-x-async/src/main/java/org/apache/curator/x/async/modeled/details/ModeledCacheImpl.java
 ##
 @@ -148,38 +165,32 @@ public void childEvent(CuratorFramework client, 
TreeCacheEvent event)
 }
 }
 
-private void internalChildEvent(TreeCacheEvent event) throws Exception
+private void internalChildEvent(TreeCacheEvent event)
 
 Review comment:
   In case of `TreeCache`, this code can called from `Executor`, but in case of 
`CuratorCache`, it can be called only on the event thread. No way it can be an 
issue? 
   It could add itself as listener also using `addListener(T listener, Executor 
executor)` (in case `Executor` was given)
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 416064)
Time Spent: 19h  (was: 18h 50m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 19h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-04-04 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=416063&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-416063
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 04/Apr/20 22:22
Start Date: 04/Apr/20 22:22
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #336: [CURATOR-549] 
Bridge facade for ModeledCache and ServiceCache, etc.
URL: https://github.com/apache/curator/pull/336#discussion_r403543136
 
 

 ##
 File path: 
curator-x-async/src/main/java/org/apache/curator/x/async/modeled/details/ModeledCacheImpl.java
 ##
 @@ -148,38 +165,32 @@ public void childEvent(CuratorFramework client, 
TreeCacheEvent event)
 }
 }
 
-private void internalChildEvent(TreeCacheEvent event) throws Exception
+private void internalChildEvent(TreeCacheEvent event)
 
 Review comment:
   In case of `TreeCache`, this code can called from `Executor`, but in case of 
`CuratorCache`, it can be called only on the event thread. No way it can be an 
issue? 
   It could add itself as listener also using `addListener(T listener, Executor 
executor)`
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 416063)
Time Spent: 18h 50m  (was: 18h 40m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 18h 50m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-04-04 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=416033&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-416033
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 04/Apr/20 22:06
Start Date: 04/Apr/20 22:06
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #336: [CURATOR-549] 
Bridge facade for ModeledCache and ServiceCache, etc.
URL: https://github.com/apache/curator/pull/336#discussion_r403535987
 
 

 ##
 File path: 
curator-x-async/src/main/java/org/apache/curator/x/async/modeled/details/ModeledCacheImpl.java
 ##
 @@ -42,11 +46,12 @@
 
 class ModeledCacheImpl implements TreeCacheListener, ModeledCache
 {
-private final TreeCache cache;
+private final CuratorCacheBridge cache;
 private final Map> entries = new ConcurrentHashMap<>();
 private final ModelSerializer serializer;
 private final StandardListenerManager> 
listenerContainer = StandardListenerManager.standard();
 private final ZPath basePath;
+private final EnsureContainers ensureContainers;
 
 Review comment:
   This is more question for the previous review, but why `TreeCache` support 
creating the parent nodes of the path (as containers) and `CuratorCache` isn't?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 416033)
Time Spent: 18h 40m  (was: 18.5h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 18h 40m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-04-04 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=416023&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-416023
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 04/Apr/20 21:37
Start Date: 04/Apr/20 21:37
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #336: [CURATOR-549] 
Bridge facade for ModeledCache and ServiceCache, etc.
URL: https://github.com/apache/curator/pull/336#discussion_r403524822
 
 

 ##
 File path: 
curator-recipes/src/test/java/org/apache/curator/framework/recipes/nodes/TestGroupMember.java
 ##
 @@ -25,11 +25,13 @@
 import org.apache.curator.retry.RetryOneTime;
 import org.apache.curator.test.BaseClassForTests;
 import org.apache.curator.test.Timing;
+import org.apache.curator.test.compatibility.CuratorTestBase;
 import org.apache.curator.utils.CloseableUtils;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 import java.util.Map;
 
+@Test(groups = CuratorTestBase.zk35TestCompatibilityGroup)
 
 Review comment:
   Can you remind why do we need it now? It will make the test run if this env 
has 3.5 and up?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 416023)
Time Spent: 18.5h  (was: 18h 20m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 18.5h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-04-04 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=416021&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-416021
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 04/Apr/20 21:29
Start Date: 04/Apr/20 21:29
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #336: [CURATOR-549] 
Bridge facade for ModeledCache and ServiceCache, etc.
URL: https://github.com/apache/curator/pull/336#discussion_r403523558
 
 

 ##
 File path: 
curator-recipes/src/test/java/org/apache/curator/framework/recipes/cache/TestCuratorCacheBridge.java
 ##
 @@ -0,0 +1,65 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.curator.framework.recipes.cache;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.CuratorFrameworkFactory;
+import org.apache.curator.retry.RetryOneTime;
+import org.apache.curator.test.compatibility.CuratorTestBase;
+import org.apache.curator.utils.Compatibility;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class TestCuratorCacheBridge extends CuratorTestBase
+{
+public void testImplementationSelection()
 
 Review comment:
   Did you forget to add `@Test`? 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 416021)
Time Spent: 18h 20m  (was: 18h 10m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 18h 20m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-04-04 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=416018&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-416018
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 04/Apr/20 21:18
Start Date: 04/Apr/20 21:18
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #336: [CURATOR-549] 
Bridge facade for ModeledCache and ServiceCache, etc.
URL: https://github.com/apache/curator/pull/336#discussion_r403517576
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/GroupMember.java
 ##
 @@ -121,8 +128,11 @@ public void close()
 {
 ImmutableMap.Builder builder = ImmutableMap.builder();
 boolean thisIdAdded = false;
-for ( ChildData data : cache.getCurrentData() )
+
+Iterator iterator = 
cache.stream().filter(parentPathFilter(membershipPath)).iterator();
 
 Review comment:
   Not sure if it is better, just want to mention you could stay with the more 
pleasant for-each syntax by relying on `Iterable` like that:
   ```
   Iterable iterable = getChildDataIterable();
   for (ChildData data: iterable)
   ```
   While `getChildDataIterable` is:
   ```
   private Iterable getChildDataIterable() {
   Stream onlyMembers = 
cache.stream().filter(parentPathFilter(membershipPath));
   return onlyMembers::iterator;
   }
   ```
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 416018)
Time Spent: 18h 10m  (was: 18h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 18h 10m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-04-04 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=416016&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-416016
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 04/Apr/20 21:15
Start Date: 04/Apr/20 21:15
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #336: [CURATOR-549] 
Bridge facade for ModeledCache and ServiceCache, etc.
URL: https://github.com/apache/curator/pull/336#discussion_r403517576
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/GroupMember.java
 ##
 @@ -121,8 +128,11 @@ public void close()
 {
 ImmutableMap.Builder builder = ImmutableMap.builder();
 boolean thisIdAdded = false;
-for ( ChildData data : cache.getCurrentData() )
+
+Iterator iterator = 
cache.stream().filter(parentPathFilter(membershipPath)).iterator();
 
 Review comment:
   Not sure if it is better, just want to mention you could stay with the more 
pleasant for each syntax by relying on `Iterable` like that:
   Iterable iterable = getChildDataIterable();
   for (ChildData data: iterable)
   While `getChildDataIterable` is:
   ```
   private Iterable getChildDataIterable() {
   Stream onlyMembers = 
cache.stream().filter(parentPathFilter(membershipPath));
   return onlyMembers::iterator;
   }
   ```
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 416016)
Time Spent: 17h 50m  (was: 17h 40m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 17h 50m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-04-04 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=416017&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-416017
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 04/Apr/20 21:15
Start Date: 04/Apr/20 21:15
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #336: [CURATOR-549] 
Bridge facade for ModeledCache and ServiceCache, etc.
URL: https://github.com/apache/curator/pull/336#discussion_r403517576
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/nodes/GroupMember.java
 ##
 @@ -121,8 +128,11 @@ public void close()
 {
 ImmutableMap.Builder builder = ImmutableMap.builder();
 boolean thisIdAdded = false;
-for ( ChildData data : cache.getCurrentData() )
+
+Iterator iterator = 
cache.stream().filter(parentPathFilter(membershipPath)).iterator();
 
 Review comment:
   Not sure if it is better, just want to mention you could stay with the more 
pleasant for each syntax by relying on `Iterable` like that:
   ```
   Iterable iterable = getChildDataIterable();
   for (ChildData data: iterable)
   ```
   While `getChildDataIterable` is:
   ```
   private Iterable getChildDataIterable() {
   Stream onlyMembers = 
cache.stream().filter(parentPathFilter(membershipPath));
   return onlyMembers::iterator;
   }
   ```
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 416017)
Time Spent: 18h  (was: 17h 50m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 18h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-04-04 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=416001&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-416001
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 04/Apr/20 20:35
Start Date: 04/Apr/20 20:35
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #336: [CURATOR-549] 
Bridge facade for ModeledCache and ServiceCache, etc.
URL: https://github.com/apache/curator/pull/336#discussion_r403513983
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheBridgeBuilderImpl.java
 ##
 @@ -0,0 +1,77 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.curator.framework.recipes.cache;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.utils.Compatibility;
+import org.slf4j.LoggerFactory;
+import java.util.concurrent.ExecutorService;
+
+class CuratorCacheBridgeBuilderImpl implements CuratorCacheBridgeBuilder
+{
+private final CuratorFramework client;
+private final String path;
+private CuratorCache.Options[] options;
+private boolean cacheData = true;
+private ExecutorService executorService = null;
+private final boolean forceTreeCache = 
Boolean.getBoolean("curator-cache-bridge-force-tree-cache");
+
+CuratorCacheBridgeBuilderImpl(CuratorFramework client, String path)
+{
+this.client = client;
+this.path = path;
+}
+
+@Override
+public CuratorCacheBridgeBuilder withOptions(CuratorCache.Options... 
options)
+{
+this.options = options;
+return this;
+}
+
+@Override
+public CuratorCacheBridgeBuilder withDataNotCached()
+{
+cacheData = false;
+return this;
+}
+
+@Override
+public CuratorCacheBridgeBuilder withExecutorService(ExecutorService 
executorService)
+{
+this.executorService = executorService;
+return this;
+}
+
+@Override
+public CuratorCacheBridge build()
+{
+if ( !forceTreeCache && Compatibility.hasPersistentWatchers() )
+{
+if ( executorService != null )
+{
+LoggerFactory.getLogger(getClass()).warn("CuratorCache does 
not support custom ExecutorService");
 
 Review comment:
   Consider advising in the warning that custom executors can be used through 
`Listenable.addListener(T listener, Executor executor);`
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 416001)
Time Spent: 17h 40m  (was: 17.5h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 17h 40m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recip

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-04-04 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=415997&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-415997
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 04/Apr/20 20:02
Start Date: 04/Apr/20 20:02
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #336: [CURATOR-549] 
Bridge facade for ModeledCache and ServiceCache, etc.
URL: https://github.com/apache/curator/pull/336#discussion_r403510878
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheBridge.java
 ##
 @@ -0,0 +1,36 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+/**
+ * A facade that uses {@link 
org.apache.curator.framework.recipes.cache.CuratorCache} if
+ * persistent watches are available or a {@link 
org.apache.curator.framework.recipes.cache.TreeCache}
+ * otherwise
+ */
+@SuppressWarnings("deprecation")
+public interface CuratorCacheBridge extends CuratorCache
+{
+/**
+ * Returns true if the underlying cache is {@link 
org.apache.curator.framework.recipes.cache.CuratorCache} (i.e. ZooKeeper 3.6+).
+ * Otherwise it is {@link 
org.apache.curator.framework.recipes.cache.TreeCache} (i.e. ZooKeeper 3.5.x)
+ *
+ * @return true/false
+ */
+boolean isCuratorCache();
 
 Review comment:
   I don't see why this method is necessary? Why would users need to know that? 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 415997)
Time Spent: 17.5h  (was: 17h 20m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 17.5h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-04-01 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=414394&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-414394
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 02/Apr/20 00:33
Start Date: 02/Apr/20 00:33
Worklog Time Spent: 10m 
  Work Description: cammckenzie commented on pull request #336: 
[CURATOR-549] Bridge facade for ModeledCache and ServiceCache, etc.
URL: https://github.com/apache/curator/pull/336#discussion_r401987572
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheBridgeBuilder.java
 ##
 @@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.curator.framework.recipes.cache;
+
+import java.util.concurrent.ExecutorService;
+
+public interface CuratorCacheBridgeBuilder
+{
+/**
+ * @param options any options
+ * @return this
+ */
+CuratorCacheBridgeBuilder withOptions(CuratorCache.Options... options);
+
+/**
+ * The bridge cache will not retain the data bytes. i.e. ChildData objects
+ * returned by the cache will always return {@code null} for {@link 
ChildData#getData()}
+ *
+ * @return this
+ */
+CuratorCacheBridgeBuilder withBytesNotCached();
 
 Review comment:
   I just noticed that it is named that all through the CuratorCache 
implementation as well. Maybe it's not worth bothering with. Having 
withDataNotCached, may be a confusing name anyway.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 414394)
Time Spent: 17h 20m  (was: 17h 10m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 17h 20m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-04-01 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=414383&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-414383
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 01/Apr/20 23:38
Start Date: 01/Apr/20 23:38
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #336: [CURATOR-549] 
Bridge facade for ModeledCache and ServiceCache, etc.
URL: https://github.com/apache/curator/pull/336#discussion_r401971510
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheBridgeBuilder.java
 ##
 @@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.curator.framework.recipes.cache;
+
+import java.util.concurrent.ExecutorService;
+
+public interface CuratorCacheBridgeBuilder
+{
+/**
+ * @param options any options
+ * @return this
+ */
+CuratorCacheBridgeBuilder withOptions(CuratorCache.Options... options);
+
+/**
+ * The bridge cache will not retain the data bytes. i.e. ChildData objects
+ * returned by the cache will always return {@code null} for {@link 
ChildData#getData()}
+ *
+ * @return this
+ */
+CuratorCacheBridgeBuilder withBytesNotCached();
 
 Review comment:
   Yeah - sure I can rename it.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 414383)
Time Spent: 17h 10m  (was: 17h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 17h 10m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-04-01 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=414313&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-414313
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 01/Apr/20 22:05
Start Date: 01/Apr/20 22:05
Worklog Time Spent: 10m 
  Work Description: cammckenzie commented on pull request #336: 
[CURATOR-549] Bridge facade for ModeledCache and ServiceCache, etc.
URL: https://github.com/apache/curator/pull/336#discussion_r401898432
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheBridgeBuilder.java
 ##
 @@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.curator.framework.recipes.cache;
+
+import java.util.concurrent.ExecutorService;
+
+public interface CuratorCacheBridgeBuilder
+{
+/**
+ * @param options any options
+ * @return this
+ */
+CuratorCacheBridgeBuilder withOptions(CuratorCache.Options... options);
+
+/**
+ * The bridge cache will not retain the data bytes. i.e. ChildData objects
+ * returned by the cache will always return {@code null} for {@link 
ChildData#getData()}
+ *
+ * @return this
+ */
+CuratorCacheBridgeBuilder withBytesNotCached();
 
 Review comment:
   Any reason this is withBytesNotCached instead of withDataNotCached? Isn't 
the content of a child node referred to as data elsewhere in Curator?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 414313)
Time Spent: 17h  (was: 16h 50m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 17h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-04-01 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=414026&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-414026
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 01/Apr/20 12:33
Start Date: 01/Apr/20 12:33
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on issue #336: [CURATOR-549] Bridge 
facade for ModeledCache and ServiceCache, etc.
URL: https://github.com/apache/curator/pull/336#issuecomment-607222308
 
 
   attn: @cammckenzie @shayshim @TisonKun @eolivelli 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 414026)
Time Spent: 16h 50m  (was: 16h 40m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 16h 50m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-31 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=413732&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-413732
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 01/Apr/20 03:52
Start Date: 01/Apr/20 03:52
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 413732)
Time Spent: 16h 40m  (was: 16.5h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 16h 40m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-29 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=412009&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-412009
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 29/Mar/20 20:35
Start Date: 29/Mar/20 20:35
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #356: [CURATOR-549] 
- TreeCacheIterator needed by upcoming CuratorCacheBridge
URL: https://github.com/apache/curator/pull/356
 
 
   The next phase of this issue will implement a bridge cache that bridges 
TreeCache for pre 3.6 SK and CuratorCache for ZK 3.6+. That bridge will need 
this TreeCache iterator.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 412009)
Time Spent: 16.5h  (was: 16h 20m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 16.5h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411798&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411798
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 20:33
Start Date: 28/Mar/20 20:33
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399706291
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheListenerBuilder.java
 ##
 @@ -0,0 +1,129 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.curator.framework.recipes.cache;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type;
+import java.util.function.Consumer;
+
+public interface CuratorCacheListenerBuilder
+{
+/**
+ * Add a standard listener
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forAll(CuratorCacheListener listener);
+
+/**
+ * Add a listener only for {@link Type#NODE_CREATED}
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forCreates(Consumer listener);
+
+@FunctionalInterface
+interface ChangeListener
+{
+void event(ChildData oldNode, ChildData node);
+}
+
+/**
+ * Add a listener only for {@link Type#NODE_CHANGED}
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forChanges(ChangeListener listener);
+
+/**
+ * Add a listener only both {@link Type#NODE_CREATED} and {@link 
Type#NODE_CHANGED}
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forCreatesAndChanges(ChangeListener listener);
 
 Review comment:
   No, I take it back. Didn't understand fully your builder until now. We Don't 
need this interface and adapter.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411798)
Time Spent: 16h 20m  (was: 16h 10m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 16h 20m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411796&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411796
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 20:32
Start Date: 28/Mar/20 20:32
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399706291
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheListenerBuilder.java
 ##
 @@ -0,0 +1,129 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.curator.framework.recipes.cache;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type;
+import java.util.function.Consumer;
+
+public interface CuratorCacheListenerBuilder
+{
+/**
+ * Add a standard listener
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forAll(CuratorCacheListener listener);
+
+/**
+ * Add a listener only for {@link Type#NODE_CREATED}
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forCreates(Consumer listener);
+
+@FunctionalInterface
+interface ChangeListener
+{
+void event(ChildData oldNode, ChildData node);
+}
+
+/**
+ * Add a listener only for {@link Type#NODE_CHANGED}
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forChanges(ChangeListener listener);
+
+/**
+ * Add a listener only both {@link Type#NODE_CREATED} and {@link 
Type#NODE_CHANGED}
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forCreatesAndChanges(ChangeListener listener);
 
 Review comment:
   No, I take it back. Didn't understand fully your builder until now.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411796)
Time Spent: 16h 10m  (was: 16h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 16h 10m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411793&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411793
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 20:26
Start Date: 28/Mar/20 20:26
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399705735
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheListenerBuilder.java
 ##
 @@ -0,0 +1,129 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.curator.framework.recipes.cache;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type;
+import java.util.function.Consumer;
+
+public interface CuratorCacheListenerBuilder
+{
+/**
+ * Add a standard listener
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forAll(CuratorCacheListener listener);
+
+/**
+ * Add a listener only for {@link Type#NODE_CREATED}
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forCreates(Consumer listener);
+
+@FunctionalInterface
+interface ChangeListener
+{
+void event(ChildData oldNode, ChildData node);
+}
+
+/**
+ * Add a listener only for {@link Type#NODE_CHANGED}
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forChanges(ChangeListener listener);
+
+/**
+ * Add a listener only both {@link Type#NODE_CREATED} and {@link 
Type#NODE_CHANGED}
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forCreatesAndChanges(ChangeListener listener);
 
 Review comment:
   The adaptor would look like this. Should I add this? Is it gilding the 
Lilly? https://gist.github.com/Randgalt/cbe38cb3cdf1825f73dd165d997a2248
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411793)
Time Spent: 16h  (was: 15h 50m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 16h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411792&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411792
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 20:20
Start Date: 28/Mar/20 20:20
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399705260
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheListenerBuilder.java
 ##
 @@ -0,0 +1,129 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.curator.framework.recipes.cache;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type;
+import java.util.function.Consumer;
+
+public interface CuratorCacheListenerBuilder
+{
+/**
+ * Add a standard listener
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forAll(CuratorCacheListener listener);
+
+/**
+ * Add a listener only for {@link Type#NODE_CREATED}
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forCreates(Consumer listener);
+
+@FunctionalInterface
+interface ChangeListener
+{
+void event(ChildData oldNode, ChildData node);
+}
+
+/**
+ * Add a listener only for {@link Type#NODE_CHANGED}
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forChanges(ChangeListener listener);
+
+/**
+ * Add a listener only both {@link Type#NODE_CREATED} and {@link 
Type#NODE_CHANGED}
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forCreatesAndChanges(ChangeListener listener);
 
 Review comment:
   We could have both actually. We can add a `CacheListenerAdaptor` that looks 
like what you have. However, since Java 8, haven't most devs moved to the 
neo-functional style? The benefit of how I did the listener builder is that you 
don't have to use cumbersome anonymous classes. i.e. you can do:
   
   ```java
   CuratorCacheListener.builder()
   .forDeletes(node -> handleDelete(node))
   .forInitialized(() -> handleInitialized())
   ... etc ...
   ```
   
   This is superior to anonymous inner classes.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411792)
Time Spent: 15h 50m  (was: 15h 40m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 15h 50m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411791&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411791
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 20:14
Start Date: 28/Mar/20 20:14
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399703987
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheListenerBuilder.java
 ##
 @@ -0,0 +1,129 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.curator.framework.recipes.cache;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type;
+import java.util.function.Consumer;
+
+public interface CuratorCacheListenerBuilder
+{
+/**
+ * Add a standard listener
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forAll(CuratorCacheListener listener);
+
+/**
+ * Add a listener only for {@link Type#NODE_CREATED}
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forCreates(Consumer listener);
+
+@FunctionalInterface
+interface ChangeListener
+{
+void event(ChildData oldNode, ChildData node);
+}
+
+/**
+ * Add a listener only for {@link Type#NODE_CHANGED}
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forChanges(ChangeListener listener);
+
+/**
+ * Add a listener only both {@link Type#NODE_CREATED} and {@link 
Type#NODE_CHANGED}
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forCreatesAndChanges(ChangeListener listener);
 
 Review comment:
   Instead of having these multiple combinations (and the user will still need 
to check type for each event e.g. `type == NODE_CHANGED`) you could introduce 
interface that allows the user implement only the methods that are interesting 
for him/her, and have the burden of type -> action mapping specified in one 
location for all users:
   ```
   public interface CacheListener { 
 void onCacheInitialized();
 void onNodeCreate(ChildData data);
 void onNodeChanged(ChildData oldData, ChildData data);
 void onNodeDeleted(ChildData data);
   }
   
   ```
   (you could introduce empty implementation for this interface for 
convenience).
   It is approach that doesn't embrace lambdas, but in this case of multiple 
event types it might be more comfortable for users. 
   Note that you could do `CuratorCacheListener` -> this listener mapping as 
implementation of `CuratorCacheListener` (user gives you impl of this interface 
and you build around it `CuratorCacheListener` wrapper that does the mapping). 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411791)
Time Spent: 15h 40m  (was: 15.5h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 15h 40m

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411788&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411788
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 20:07
Start Date: 28/Mar/20 20:07
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399703987
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheListenerBuilder.java
 ##
 @@ -0,0 +1,129 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.curator.framework.recipes.cache;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type;
+import java.util.function.Consumer;
+
+public interface CuratorCacheListenerBuilder
+{
+/**
+ * Add a standard listener
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forAll(CuratorCacheListener listener);
+
+/**
+ * Add a listener only for {@link Type#NODE_CREATED}
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forCreates(Consumer listener);
+
+@FunctionalInterface
+interface ChangeListener
+{
+void event(ChildData oldNode, ChildData node);
+}
+
+/**
+ * Add a listener only for {@link Type#NODE_CHANGED}
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forChanges(ChangeListener listener);
+
+/**
+ * Add a listener only both {@link Type#NODE_CREATED} and {@link 
Type#NODE_CHANGED}
+ *
+ * @param listener listener to add
+ * @return this
+ */
+CuratorCacheListenerBuilder forCreatesAndChanges(ChangeListener listener);
 
 Review comment:
   Instead of having these multiple combinations (and the user will still need 
to check type for each event e.g. `type == NODE_CHANGED`) you could introduce 
interface that allows the user implement only the methods that are interesting 
for him/her, and have the burden of type -> action mapping specified in one 
location for all users:
   `public interface CacheListener { 
 void onCacheInitialized();
 void onNodeCreate(ChildData data);
 void onNodeChanged(ChildData oldData, ChildData data);
 void onNodeDeleted(ChildData data);
   }`
   (you could introduce empty implementation for this interface for 
convenience).
   It is approach that doesn't embrace lambdas, but in this case of multiple 
event types it might be more comfortable for users. 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411788)
Time Spent: 15.5h  (was: 15h 20m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 15.5h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curato

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411778&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411778
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 19:07
Start Date: 28/Mar/20 19:07
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399697774
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java
 ##
 @@ -0,0 +1,301 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.api.BackgroundCallback;
+import org.apache.curator.framework.api.CuratorEvent;
+import org.apache.curator.framework.listen.Listenable;
+import org.apache.curator.framework.listen.StandardListenerManager;
+import org.apache.curator.framework.recipes.watch.PersistentWatcher;
+import org.apache.curator.utils.ThreadUtils;
+import org.apache.curator.utils.ZKPaths;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.data.Stat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Collections;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
+import java.util.stream.Stream;
+
+import static 
org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.*;
+import static org.apache.zookeeper.KeeperException.Code.NONODE;
+import static org.apache.zookeeper.KeeperException.Code.OK;
+
+class CuratorCacheImpl implements CuratorCache
 
 Review comment:
   Yeah, it is kind of limitation of the Persistent Watcher itself - not be 
able to be Persistent only for immediate children of the node. Potentially for 
client that needs only immediate children, it can make both ZK server and 
client work harder for potentially many/large not-interesting sub-trees events. 
But maybe in real life it is not useful enough.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411778)
Time Spent: 15h 20m  (was: 15h 10m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 15h 20m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache r

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411777&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411777
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 18:53
Start Date: 28/Mar/20 18:53
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399696350
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java
 ##
 @@ -0,0 +1,301 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.api.BackgroundCallback;
+import org.apache.curator.framework.api.CuratorEvent;
+import org.apache.curator.framework.listen.Listenable;
+import org.apache.curator.framework.listen.StandardListenerManager;
+import org.apache.curator.framework.recipes.watch.PersistentWatcher;
+import org.apache.curator.utils.ThreadUtils;
+import org.apache.curator.utils.ZKPaths;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.data.Stat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Collections;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
+import java.util.stream.Stream;
+
+import static 
org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.*;
+import static org.apache.zookeeper.KeeperException.Code.NONODE;
+import static org.apache.zookeeper.KeeperException.Code.OK;
+
+class CuratorCacheImpl implements CuratorCache
 
 Review comment:
   Also - the new CuratorCache uses a Persistent watcher internally (which I 
added to ZK for 3.6). Those watchers only have 2 modes - single node watch or 
entire tree watch. So, the new CuratorCache matches this.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411777)
Time Spent: 15h 10m  (was: 15h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 15h 10m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411775&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411775
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 18:29
Start Date: 28/Mar/20 18:29
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399693930
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java
 ##
 @@ -0,0 +1,301 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.api.BackgroundCallback;
+import org.apache.curator.framework.api.CuratorEvent;
+import org.apache.curator.framework.listen.Listenable;
+import org.apache.curator.framework.listen.StandardListenerManager;
+import org.apache.curator.framework.recipes.watch.PersistentWatcher;
+import org.apache.curator.utils.ThreadUtils;
+import org.apache.curator.utils.ZKPaths;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.data.Stat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Collections;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
+import java.util.stream.Stream;
+
+import static 
org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.*;
+import static org.apache.zookeeper.KeeperException.Code.NONODE;
+import static org.apache.zookeeper.KeeperException.Code.OK;
+
+class CuratorCacheImpl implements CuratorCache
+{
+private final Logger log = LoggerFactory.getLogger(getClass());
+private final AtomicReference state = new 
AtomicReference<>(State.LATENT);
+private final PersistentWatcher persistentWatcher;
+private final CuratorFramework client;
+private final CuratorCacheStorage storage;
+private final String path;
+private final boolean recursive;
+private final boolean compressedData;
+private final boolean clearOnClose;
+private final StandardListenerManager 
listenerManager = StandardListenerManager.standard();
+private final Consumer exceptionHandler;
+private final OutstandingOps outstandingOps = new OutstandingOps(() -> 
callListeners(CuratorCacheListener::initialized));
+
+private enum State
+{
+LATENT,
+STARTED,
+CLOSED
+}
+
+CuratorCacheImpl(CuratorFramework client, CuratorCacheStorage storage, 
String path, Options[] optionsArg, Consumer exceptionHandler)
+{
+Set options = (optionsArg != null) ? 
Sets.newHashSet(optionsArg) : Collections.emptySet();
+this.client = client;
+this.storage = (storage != null) ? storage : 
CuratorCacheStorage.standard();
+this.path = path;
+recursive = !options.contains(Options.SINGLE_NODE_CACHE);
+compressedData = options.contains(Options.COMPRESSED_DATA);
+clearOnClose = !options.contains(Options.DO_NOT_CLEAR_ON_CLOSE);
+persistentWatcher = new PersistentWatcher(client, path, recursive);
+persistentWatcher.getListenable().addListener(this::processEvent);
+persistentWatcher.getResetListenable().addListener(this::rebuild);
+this.exceptionHandler = (exceptionHandler != null) ? exceptionHandler 
: e -> log.error("CuratorCache error", e);
+}
+
+@Override
+public void start()
+{
+Preconditions.checkState(state.compareAndSet(State.LATENT, 
State.STARTED), "Already started");
+persistentWatcher.start();
+}
+
+@Override
+public void close()
+{
+if ( state.compareAndSet(State.STARTED, State.CLOSED) )
+   

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411755&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411755
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 16:46
Start Date: 28/Mar/20 16:46
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399683120
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java
 ##
 @@ -0,0 +1,301 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.api.BackgroundCallback;
+import org.apache.curator.framework.api.CuratorEvent;
+import org.apache.curator.framework.listen.Listenable;
+import org.apache.curator.framework.listen.StandardListenerManager;
+import org.apache.curator.framework.recipes.watch.PersistentWatcher;
+import org.apache.curator.utils.ThreadUtils;
+import org.apache.curator.utils.ZKPaths;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.data.Stat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Collections;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
+import java.util.stream.Stream;
+
+import static 
org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.*;
+import static org.apache.zookeeper.KeeperException.Code.NONODE;
+import static org.apache.zookeeper.KeeperException.Code.OK;
+
+class CuratorCacheImpl implements CuratorCache
+{
+private final Logger log = LoggerFactory.getLogger(getClass());
+private final AtomicReference state = new 
AtomicReference<>(State.LATENT);
+private final PersistentWatcher persistentWatcher;
+private final CuratorFramework client;
+private final CuratorCacheStorage storage;
+private final String path;
+private final boolean recursive;
+private final boolean compressedData;
+private final boolean clearOnClose;
+private final StandardListenerManager 
listenerManager = StandardListenerManager.standard();
+private final Consumer exceptionHandler;
+private final OutstandingOps outstandingOps = new OutstandingOps(() -> 
callListeners(CuratorCacheListener::initialized));
+
+private enum State
+{
+LATENT,
+STARTED,
+CLOSED
+}
+
+CuratorCacheImpl(CuratorFramework client, CuratorCacheStorage storage, 
String path, Options[] optionsArg, Consumer exceptionHandler)
+{
+Set options = (optionsArg != null) ? 
Sets.newHashSet(optionsArg) : Collections.emptySet();
+this.client = client;
+this.storage = (storage != null) ? storage : 
CuratorCacheStorage.standard();
+this.path = path;
+recursive = !options.contains(Options.SINGLE_NODE_CACHE);
+compressedData = options.contains(Options.COMPRESSED_DATA);
+clearOnClose = !options.contains(Options.DO_NOT_CLEAR_ON_CLOSE);
+persistentWatcher = new PersistentWatcher(client, path, recursive);
+persistentWatcher.getListenable().addListener(this::processEvent);
+persistentWatcher.getResetListenable().addListener(this::rebuild);
+this.exceptionHandler = (exceptionHandler != null) ? exceptionHandler 
: e -> log.error("CuratorCache error", e);
+}
+
+@Override
+public void start()
+{
+Preconditions.checkState(state.compareAndSet(State.LATENT, 
State.STARTED), "Already started");
+persistentWatcher.start();
+}
+
+@Override
+public void close()
+{
+if ( state.compareAndSet(State.STARTED, State.CLOSED) )
 
 Revie

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411741&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411741
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 15:49
Start Date: 28/Mar/20 15:49
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on issue #335: [CURATOR-549] Recipes 
based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#issuecomment-605465330
 
 
   @shayshim I reworked the doc for `CuratorCache`. Please re-review.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411741)
Time Spent: 14h 40m  (was: 14.5h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 14h 40m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411721&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411721
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 14:03
Start Date: 28/Mar/20 14:03
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on issue #335: [CURATOR-549] Recipes 
based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#issuecomment-605451547
 
 
   > The patch is so huge.
   > I don't feel I can give a real +1
   > 
   > I like this work.
   > 
   > I would suggest to create little patches for the future. this way reviews 
can be narrower.
   
   This is already a broken up patch. There was a PR that preceded it. There 
will be another PR after this. So, this is as small as I could get this 
portion. Though, I guess I could have done just the PersistentWatcher class and 
then this. 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411721)
Time Spent: 14.5h  (was: 14h 20m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 14.5h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411719&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411719
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 13:56
Start Date: 28/Mar/20 13:56
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399665263
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java
 ##
 @@ -0,0 +1,301 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.api.BackgroundCallback;
+import org.apache.curator.framework.api.CuratorEvent;
+import org.apache.curator.framework.listen.Listenable;
+import org.apache.curator.framework.listen.StandardListenerManager;
+import org.apache.curator.framework.recipes.watch.PersistentWatcher;
+import org.apache.curator.utils.ThreadUtils;
+import org.apache.curator.utils.ZKPaths;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.data.Stat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Collections;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
+import java.util.stream.Stream;
+
+import static 
org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.*;
+import static org.apache.zookeeper.KeeperException.Code.NONODE;
+import static org.apache.zookeeper.KeeperException.Code.OK;
+
+class CuratorCacheImpl implements CuratorCache
+{
+private final Logger log = LoggerFactory.getLogger(getClass());
+private final AtomicReference state = new 
AtomicReference<>(State.LATENT);
+private final PersistentWatcher persistentWatcher;
+private final CuratorFramework client;
+private final CuratorCacheStorage storage;
+private final String path;
+private final boolean recursive;
+private final boolean compressedData;
+private final boolean clearOnClose;
+private final StandardListenerManager 
listenerManager = StandardListenerManager.standard();
+private final Consumer exceptionHandler;
+private final OutstandingOps outstandingOps = new OutstandingOps(() -> 
callListeners(CuratorCacheListener::initialized));
+
+private enum State
+{
+LATENT,
+STARTED,
+CLOSED
+}
+
+CuratorCacheImpl(CuratorFramework client, CuratorCacheStorage storage, 
String path, Options[] optionsArg, Consumer exceptionHandler)
+{
+Set options = (optionsArg != null) ? 
Sets.newHashSet(optionsArg) : Collections.emptySet();
+this.client = client;
+this.storage = (storage != null) ? storage : 
CuratorCacheStorage.standard();
+this.path = path;
+recursive = !options.contains(Options.SINGLE_NODE_CACHE);
+compressedData = options.contains(Options.COMPRESSED_DATA);
+clearOnClose = !options.contains(Options.DO_NOT_CLEAR_ON_CLOSE);
+persistentWatcher = new PersistentWatcher(client, path, recursive);
+persistentWatcher.getListenable().addListener(this::processEvent);
+persistentWatcher.getResetListenable().addListener(this::rebuild);
+this.exceptionHandler = (exceptionHandler != null) ? exceptionHandler 
: e -> log.error("CuratorCache error", e);
+}
+
+@Override
+public void start()
+{
+Preconditions.checkState(state.compareAndSet(State.LATENT, 
State.STARTED), "Already started");
+persistentWatcher.start();
+}
+
+@Override
+public void close()
+{
+if ( state.compareAndSet(State.STARTED, State.CLOSED) )
 
 Revie

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411718&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411718
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 13:55
Start Date: 28/Mar/20 13:55
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399665185
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java
 ##
 @@ -0,0 +1,301 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.api.BackgroundCallback;
+import org.apache.curator.framework.api.CuratorEvent;
+import org.apache.curator.framework.listen.Listenable;
+import org.apache.curator.framework.listen.StandardListenerManager;
+import org.apache.curator.framework.recipes.watch.PersistentWatcher;
+import org.apache.curator.utils.ThreadUtils;
+import org.apache.curator.utils.ZKPaths;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.data.Stat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Collections;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
+import java.util.stream.Stream;
+
+import static 
org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.*;
+import static org.apache.zookeeper.KeeperException.Code.NONODE;
+import static org.apache.zookeeper.KeeperException.Code.OK;
+
+class CuratorCacheImpl implements CuratorCache
+{
+private final Logger log = LoggerFactory.getLogger(getClass());
+private final AtomicReference state = new 
AtomicReference<>(State.LATENT);
+private final PersistentWatcher persistentWatcher;
+private final CuratorFramework client;
+private final CuratorCacheStorage storage;
+private final String path;
+private final boolean recursive;
+private final boolean compressedData;
+private final boolean clearOnClose;
+private final StandardListenerManager 
listenerManager = StandardListenerManager.standard();
+private final Consumer exceptionHandler;
+private final OutstandingOps outstandingOps = new OutstandingOps(() -> 
callListeners(CuratorCacheListener::initialized));
+
+private enum State
+{
+LATENT,
+STARTED,
+CLOSED
+}
+
+CuratorCacheImpl(CuratorFramework client, CuratorCacheStorage storage, 
String path, Options[] optionsArg, Consumer exceptionHandler)
+{
+Set options = (optionsArg != null) ? 
Sets.newHashSet(optionsArg) : Collections.emptySet();
+this.client = client;
+this.storage = (storage != null) ? storage : 
CuratorCacheStorage.standard();
+this.path = path;
+recursive = !options.contains(Options.SINGLE_NODE_CACHE);
+compressedData = options.contains(Options.COMPRESSED_DATA);
+clearOnClose = !options.contains(Options.DO_NOT_CLEAR_ON_CLOSE);
+persistentWatcher = new PersistentWatcher(client, path, recursive);
+persistentWatcher.getListenable().addListener(this::processEvent);
+persistentWatcher.getResetListenable().addListener(this::rebuild);
+this.exceptionHandler = (exceptionHandler != null) ? exceptionHandler 
: e -> log.error("CuratorCache error", e);
+}
+
+@Override
+public void start()
+{
+Preconditions.checkState(state.compareAndSet(State.LATENT, 
State.STARTED), "Already started");
+persistentWatcher.start();
+}
+
+@Override
+public void close()
+{
+if ( state.compareAndSet(State.STARTED, State.CLOSED) )
+   

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411717&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411717
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 13:51
Start Date: 28/Mar/20 13:51
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399664766
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java
 ##
 @@ -0,0 +1,301 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.api.BackgroundCallback;
+import org.apache.curator.framework.api.CuratorEvent;
+import org.apache.curator.framework.listen.Listenable;
+import org.apache.curator.framework.listen.StandardListenerManager;
+import org.apache.curator.framework.recipes.watch.PersistentWatcher;
+import org.apache.curator.utils.ThreadUtils;
+import org.apache.curator.utils.ZKPaths;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.data.Stat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Collections;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
+import java.util.stream.Stream;
+
+import static 
org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.*;
+import static org.apache.zookeeper.KeeperException.Code.NONODE;
+import static org.apache.zookeeper.KeeperException.Code.OK;
+
+class CuratorCacheImpl implements CuratorCache
+{
+private final Logger log = LoggerFactory.getLogger(getClass());
+private final AtomicReference state = new 
AtomicReference<>(State.LATENT);
+private final PersistentWatcher persistentWatcher;
+private final CuratorFramework client;
+private final CuratorCacheStorage storage;
+private final String path;
+private final boolean recursive;
+private final boolean compressedData;
+private final boolean clearOnClose;
+private final StandardListenerManager 
listenerManager = StandardListenerManager.standard();
+private final Consumer exceptionHandler;
+private final OutstandingOps outstandingOps = new OutstandingOps(() -> 
callListeners(CuratorCacheListener::initialized));
+
+private enum State
+{
+LATENT,
+STARTED,
+CLOSED
+}
+
+CuratorCacheImpl(CuratorFramework client, CuratorCacheStorage storage, 
String path, Options[] optionsArg, Consumer exceptionHandler)
+{
+Set options = (optionsArg != null) ? 
Sets.newHashSet(optionsArg) : Collections.emptySet();
+this.client = client;
+this.storage = (storage != null) ? storage : 
CuratorCacheStorage.standard();
+this.path = path;
+recursive = !options.contains(Options.SINGLE_NODE_CACHE);
+compressedData = options.contains(Options.COMPRESSED_DATA);
+clearOnClose = !options.contains(Options.DO_NOT_CLEAR_ON_CLOSE);
+persistentWatcher = new PersistentWatcher(client, path, recursive);
+persistentWatcher.getListenable().addListener(this::processEvent);
+persistentWatcher.getResetListenable().addListener(this::rebuild);
+this.exceptionHandler = (exceptionHandler != null) ? exceptionHandler 
: e -> log.error("CuratorCache error", e);
+}
+
+@Override
+public void start()
+{
+Preconditions.checkState(state.compareAndSet(State.LATENT, 
State.STARTED), "Already started");
+persistentWatcher.start();
+}
+
+@Override
+public void close()
+{
+if ( state.compareAndSet(State.STARTED, State.CLOSED) )
+   

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411716&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411716
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 13:50
Start Date: 28/Mar/20 13:50
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399664685
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java
 ##
 @@ -0,0 +1,301 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.api.BackgroundCallback;
+import org.apache.curator.framework.api.CuratorEvent;
+import org.apache.curator.framework.listen.Listenable;
+import org.apache.curator.framework.listen.StandardListenerManager;
+import org.apache.curator.framework.recipes.watch.PersistentWatcher;
+import org.apache.curator.utils.ThreadUtils;
+import org.apache.curator.utils.ZKPaths;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.data.Stat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Collections;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
+import java.util.stream.Stream;
+
+import static 
org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.*;
+import static org.apache.zookeeper.KeeperException.Code.NONODE;
+import static org.apache.zookeeper.KeeperException.Code.OK;
+
+class CuratorCacheImpl implements CuratorCache
 
 Review comment:
   If someone really needs to emulate PathChildrenCache it could be done with a 
custom implementation of `CuratorCacheStorage`. I thought it added too much 
weight to have APIs that only cache 1 level. 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411716)
Time Spent: 13h 50m  (was: 13h 40m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 13h 50m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411715&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411715
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 13:48
Start Date: 28/Mar/20 13:48
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399664477
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java
 ##
 @@ -0,0 +1,301 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.api.BackgroundCallback;
+import org.apache.curator.framework.api.CuratorEvent;
+import org.apache.curator.framework.listen.Listenable;
+import org.apache.curator.framework.listen.StandardListenerManager;
+import org.apache.curator.framework.recipes.watch.PersistentWatcher;
+import org.apache.curator.utils.ThreadUtils;
+import org.apache.curator.utils.ZKPaths;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.data.Stat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Collections;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
+import java.util.stream.Stream;
+
+import static 
org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.*;
+import static org.apache.zookeeper.KeeperException.Code.NONODE;
+import static org.apache.zookeeper.KeeperException.Code.OK;
+
+class CuratorCacheImpl implements CuratorCache
+{
+private final Logger log = LoggerFactory.getLogger(getClass());
+private final AtomicReference state = new 
AtomicReference<>(State.LATENT);
+private final PersistentWatcher persistentWatcher;
+private final CuratorFramework client;
+private final CuratorCacheStorage storage;
+private final String path;
+private final boolean recursive;
+private final boolean compressedData;
+private final boolean clearOnClose;
+private final StandardListenerManager 
listenerManager = StandardListenerManager.standard();
+private final Consumer exceptionHandler;
+private final OutstandingOps outstandingOps = new OutstandingOps(() -> 
callListeners(CuratorCacheListener::initialized));
+
+private enum State
+{
+LATENT,
+STARTED,
+CLOSED
+}
+
+CuratorCacheImpl(CuratorFramework client, CuratorCacheStorage storage, 
String path, Options[] optionsArg, Consumer exceptionHandler)
+{
+Set options = (optionsArg != null) ? 
Sets.newHashSet(optionsArg) : Collections.emptySet();
+this.client = client;
+this.storage = (storage != null) ? storage : 
CuratorCacheStorage.standard();
+this.path = path;
+recursive = !options.contains(Options.SINGLE_NODE_CACHE);
+compressedData = options.contains(Options.COMPRESSED_DATA);
+clearOnClose = !options.contains(Options.DO_NOT_CLEAR_ON_CLOSE);
+persistentWatcher = new PersistentWatcher(client, path, recursive);
+persistentWatcher.getListenable().addListener(this::processEvent);
+persistentWatcher.getResetListenable().addListener(this::rebuild);
+this.exceptionHandler = (exceptionHandler != null) ? exceptionHandler 
: e -> log.error("CuratorCache error", e);
+}
+
+@Override
+public void start()
+{
+Preconditions.checkState(state.compareAndSet(State.LATENT, 
State.STARTED), "Already started");
+persistentWatcher.start();
+}
+
+@Override
+public void close()
+{
+if ( state.compareAndSet(State.STARTED, State.CLOSED) )
+   

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411675&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411675
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 11:16
Start Date: 28/Mar/20 11:16
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399650425
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java
 ##
 @@ -0,0 +1,301 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.api.BackgroundCallback;
+import org.apache.curator.framework.api.CuratorEvent;
+import org.apache.curator.framework.listen.Listenable;
+import org.apache.curator.framework.listen.StandardListenerManager;
+import org.apache.curator.framework.recipes.watch.PersistentWatcher;
+import org.apache.curator.utils.ThreadUtils;
+import org.apache.curator.utils.ZKPaths;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.data.Stat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Collections;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
+import java.util.stream.Stream;
+
+import static 
org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.*;
+import static org.apache.zookeeper.KeeperException.Code.NONODE;
+import static org.apache.zookeeper.KeeperException.Code.OK;
+
+class CuratorCacheImpl implements CuratorCache
+{
+private final Logger log = LoggerFactory.getLogger(getClass());
+private final AtomicReference state = new 
AtomicReference<>(State.LATENT);
+private final PersistentWatcher persistentWatcher;
+private final CuratorFramework client;
+private final CuratorCacheStorage storage;
+private final String path;
+private final boolean recursive;
+private final boolean compressedData;
+private final boolean clearOnClose;
+private final StandardListenerManager 
listenerManager = StandardListenerManager.standard();
+private final Consumer exceptionHandler;
+private final OutstandingOps outstandingOps = new OutstandingOps(() -> 
callListeners(CuratorCacheListener::initialized));
+
+private enum State
+{
+LATENT,
+STARTED,
+CLOSED
+}
+
+CuratorCacheImpl(CuratorFramework client, CuratorCacheStorage storage, 
String path, Options[] optionsArg, Consumer exceptionHandler)
+{
+Set options = (optionsArg != null) ? 
Sets.newHashSet(optionsArg) : Collections.emptySet();
+this.client = client;
+this.storage = (storage != null) ? storage : 
CuratorCacheStorage.standard();
+this.path = path;
+recursive = !options.contains(Options.SINGLE_NODE_CACHE);
+compressedData = options.contains(Options.COMPRESSED_DATA);
+clearOnClose = !options.contains(Options.DO_NOT_CLEAR_ON_CLOSE);
+persistentWatcher = new PersistentWatcher(client, path, recursive);
+persistentWatcher.getListenable().addListener(this::processEvent);
+persistentWatcher.getResetListenable().addListener(this::rebuild);
+this.exceptionHandler = (exceptionHandler != null) ? exceptionHandler 
: e -> log.error("CuratorCache error", e);
+}
+
+@Override
+public void start()
+{
+Preconditions.checkState(state.compareAndSet(State.LATENT, 
State.STARTED), "Already started");
+persistentWatcher.start();
+}
+
+@Override
+public void close()
+{
+if ( state.compareAndSet(State.STARTED, State.CLOSED) )
+   

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411674&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411674
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 11:09
Start Date: 28/Mar/20 11:09
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399649789
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java
 ##
 @@ -0,0 +1,301 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.api.BackgroundCallback;
+import org.apache.curator.framework.api.CuratorEvent;
+import org.apache.curator.framework.listen.Listenable;
+import org.apache.curator.framework.listen.StandardListenerManager;
+import org.apache.curator.framework.recipes.watch.PersistentWatcher;
+import org.apache.curator.utils.ThreadUtils;
+import org.apache.curator.utils.ZKPaths;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.data.Stat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Collections;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
+import java.util.stream.Stream;
+
+import static 
org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.*;
+import static org.apache.zookeeper.KeeperException.Code.NONODE;
+import static org.apache.zookeeper.KeeperException.Code.OK;
+
+class CuratorCacheImpl implements CuratorCache
+{
+private final Logger log = LoggerFactory.getLogger(getClass());
+private final AtomicReference state = new 
AtomicReference<>(State.LATENT);
+private final PersistentWatcher persistentWatcher;
+private final CuratorFramework client;
+private final CuratorCacheStorage storage;
+private final String path;
+private final boolean recursive;
+private final boolean compressedData;
+private final boolean clearOnClose;
+private final StandardListenerManager 
listenerManager = StandardListenerManager.standard();
+private final Consumer exceptionHandler;
+private final OutstandingOps outstandingOps = new OutstandingOps(() -> 
callListeners(CuratorCacheListener::initialized));
+
+private enum State
+{
+LATENT,
+STARTED,
+CLOSED
+}
+
+CuratorCacheImpl(CuratorFramework client, CuratorCacheStorage storage, 
String path, Options[] optionsArg, Consumer exceptionHandler)
+{
+Set options = (optionsArg != null) ? 
Sets.newHashSet(optionsArg) : Collections.emptySet();
+this.client = client;
+this.storage = (storage != null) ? storage : 
CuratorCacheStorage.standard();
+this.path = path;
+recursive = !options.contains(Options.SINGLE_NODE_CACHE);
+compressedData = options.contains(Options.COMPRESSED_DATA);
+clearOnClose = !options.contains(Options.DO_NOT_CLEAR_ON_CLOSE);
+persistentWatcher = new PersistentWatcher(client, path, recursive);
+persistentWatcher.getListenable().addListener(this::processEvent);
+persistentWatcher.getResetListenable().addListener(this::rebuild);
+this.exceptionHandler = (exceptionHandler != null) ? exceptionHandler 
: e -> log.error("CuratorCache error", e);
+}
+
+@Override
+public void start()
+{
+Preconditions.checkState(state.compareAndSet(State.LATENT, 
State.STARTED), "Already started");
+persistentWatcher.start();
+}
+
+@Override
+public void close()
+{
+if ( state.compareAndSet(State.STARTED, State.CLOSED) )
+   

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411672&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411672
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 10:49
Start Date: 28/Mar/20 10:49
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399646772
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java
 ##
 @@ -0,0 +1,301 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.api.BackgroundCallback;
+import org.apache.curator.framework.api.CuratorEvent;
+import org.apache.curator.framework.listen.Listenable;
+import org.apache.curator.framework.listen.StandardListenerManager;
+import org.apache.curator.framework.recipes.watch.PersistentWatcher;
+import org.apache.curator.utils.ThreadUtils;
+import org.apache.curator.utils.ZKPaths;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.data.Stat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Collections;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
+import java.util.stream.Stream;
+
+import static 
org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.*;
+import static org.apache.zookeeper.KeeperException.Code.NONODE;
+import static org.apache.zookeeper.KeeperException.Code.OK;
+
+class CuratorCacheImpl implements CuratorCache
+{
+private final Logger log = LoggerFactory.getLogger(getClass());
+private final AtomicReference state = new 
AtomicReference<>(State.LATENT);
+private final PersistentWatcher persistentWatcher;
+private final CuratorFramework client;
+private final CuratorCacheStorage storage;
+private final String path;
+private final boolean recursive;
+private final boolean compressedData;
+private final boolean clearOnClose;
+private final StandardListenerManager 
listenerManager = StandardListenerManager.standard();
+private final Consumer exceptionHandler;
+private final OutstandingOps outstandingOps = new OutstandingOps(() -> 
callListeners(CuratorCacheListener::initialized));
+
+private enum State
+{
+LATENT,
+STARTED,
+CLOSED
+}
+
+CuratorCacheImpl(CuratorFramework client, CuratorCacheStorage storage, 
String path, Options[] optionsArg, Consumer exceptionHandler)
+{
+Set options = (optionsArg != null) ? 
Sets.newHashSet(optionsArg) : Collections.emptySet();
+this.client = client;
+this.storage = (storage != null) ? storage : 
CuratorCacheStorage.standard();
+this.path = path;
+recursive = !options.contains(Options.SINGLE_NODE_CACHE);
+compressedData = options.contains(Options.COMPRESSED_DATA);
+clearOnClose = !options.contains(Options.DO_NOT_CLEAR_ON_CLOSE);
+persistentWatcher = new PersistentWatcher(client, path, recursive);
+persistentWatcher.getListenable().addListener(this::processEvent);
+persistentWatcher.getResetListenable().addListener(this::rebuild);
+this.exceptionHandler = (exceptionHandler != null) ? exceptionHandler 
: e -> log.error("CuratorCache error", e);
+}
+
+@Override
+public void start()
+{
+Preconditions.checkState(state.compareAndSet(State.LATENT, 
State.STARTED), "Already started");
+persistentWatcher.start();
+}
+
+@Override
+public void close()
+{
+if ( state.compareAndSet(State.STARTED, State.CLOSED) )
+   

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411671&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411671
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 10:49
Start Date: 28/Mar/20 10:49
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399328915
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java
 ##
 @@ -0,0 +1,301 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.api.BackgroundCallback;
+import org.apache.curator.framework.api.CuratorEvent;
+import org.apache.curator.framework.listen.Listenable;
+import org.apache.curator.framework.listen.StandardListenerManager;
+import org.apache.curator.framework.recipes.watch.PersistentWatcher;
+import org.apache.curator.utils.ThreadUtils;
+import org.apache.curator.utils.ZKPaths;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.data.Stat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Collections;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
+import java.util.stream.Stream;
+
+import static 
org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.*;
+import static org.apache.zookeeper.KeeperException.Code.NONODE;
+import static org.apache.zookeeper.KeeperException.Code.OK;
+
+class CuratorCacheImpl implements CuratorCache
+{
+private final Logger log = LoggerFactory.getLogger(getClass());
+private final AtomicReference state = new 
AtomicReference<>(State.LATENT);
+private final PersistentWatcher persistentWatcher;
+private final CuratorFramework client;
+private final CuratorCacheStorage storage;
+private final String path;
+private final boolean recursive;
+private final boolean compressedData;
+private final boolean clearOnClose;
+private final StandardListenerManager 
listenerManager = StandardListenerManager.standard();
+private final Consumer exceptionHandler;
+private final OutstandingOps outstandingOps = new OutstandingOps(() -> 
callListeners(CuratorCacheListener::initialized));
+
+private enum State
+{
+LATENT,
+STARTED,
+CLOSED
+}
+
+CuratorCacheImpl(CuratorFramework client, CuratorCacheStorage storage, 
String path, Options[] optionsArg, Consumer exceptionHandler)
+{
+Set options = (optionsArg != null) ? 
Sets.newHashSet(optionsArg) : Collections.emptySet();
+this.client = client;
+this.storage = (storage != null) ? storage : 
CuratorCacheStorage.standard();
+this.path = path;
+recursive = !options.contains(Options.SINGLE_NODE_CACHE);
+compressedData = options.contains(Options.COMPRESSED_DATA);
+clearOnClose = !options.contains(Options.DO_NOT_CLEAR_ON_CLOSE);
+persistentWatcher = new PersistentWatcher(client, path, recursive);
+persistentWatcher.getListenable().addListener(this::processEvent);
+persistentWatcher.getResetListenable().addListener(this::rebuild);
+this.exceptionHandler = (exceptionHandler != null) ? exceptionHandler 
: e -> log.error("CuratorCache error", e);
+}
+
+@Override
+public void start()
+{
+Preconditions.checkState(state.compareAndSet(State.LATENT, 
State.STARTED), "Already started");
+persistentWatcher.start();
+}
+
+@Override
+public void close()
+{
+if ( state.compareAndSet(State.STARTED, State.CLOSED) )
 
 Revie

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411673&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411673
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 10:49
Start Date: 28/Mar/20 10:49
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399647509
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheImpl.java
 ##
 @@ -0,0 +1,301 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Sets;
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.api.BackgroundCallback;
+import org.apache.curator.framework.api.CuratorEvent;
+import org.apache.curator.framework.listen.Listenable;
+import org.apache.curator.framework.listen.StandardListenerManager;
+import org.apache.curator.framework.recipes.watch.PersistentWatcher;
+import org.apache.curator.utils.ThreadUtils;
+import org.apache.curator.utils.ZKPaths;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.data.Stat;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.util.Collections;
+import java.util.Optional;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Consumer;
+import java.util.stream.Stream;
+
+import static 
org.apache.curator.framework.recipes.cache.CuratorCacheListener.Type.*;
+import static org.apache.zookeeper.KeeperException.Code.NONODE;
+import static org.apache.zookeeper.KeeperException.Code.OK;
+
+class CuratorCacheImpl implements CuratorCache
 
 Review comment:
   This cache does not allow to maintain only the immediate children? I noticed 
`parentPathFilter`, but shouldn't we allow that for efficiancy? (for cases of 
many grandchildren and so deeper that their updates are not interesting in this 
cache context.) Maybe not useful enough to bother, just asking.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411673)
Time Spent: 13h 10m  (was: 13h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 13h 10m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> 

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411670&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411670
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 10:49
Start Date: 28/Mar/20 10:49
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399259021
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCache.java
 ##
 @@ -0,0 +1,127 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.curator.framework.recipes.cache;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.listen.Listenable;
+import java.io.Closeable;
+import java.util.Optional;
+import java.util.stream.Stream;
+
+/**
+ * 
+ * A utility that attempts to keep the data from a node locally cached. 
Optionally the entire
+ * tree of children below the node can also be cached. Will respond to 
update/create/delete events, pull
+ * down the data, etc. You can register listeners that will get notified 
when changes occur.
+ * 
+ *
+ * 
+ * IMPORTANT - it's not possible to stay transactionally in sync. 
Users of this class must
 
 Review comment:
   This comment was never very clear to me, and if it is not only me, maybe it 
is good opportunity to rephrase it or give more details. 
   By "false positive" here do you mean that we might get events that do not 
reflect anymore the latest state of the zknode? 
   These events are still true, just a bit late. Soon there should follow the 
subsequent events until latest state is reflected. This behavior is general in 
ZK clients, not just the cache.
   By "false negative" do you mean that we can miss events because ZK only 
sends the latest event (e.g. while cache might have been disconnected for a 
while, missing some zknode events)? Again, I feel like it is true for any ZK 
client, not just the cache. Though in Persistent Watchers I guess we 
potentially miss less momentarily events, because the Watcher is always there.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411670)
Time Spent: 13h  (was: 12h 50m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 13h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411669&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411669
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 10:47
Start Date: 28/Mar/20 10:47
Worklog Time Spent: 10m 
  Work Description: eolivelli commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399647837
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/OutstandingOps.java
 ##
 @@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicReference;
+
+class OutstandingOps
+{
+private final AtomicReference completionProc;
+private final AtomicLong count = new AtomicLong(0);
+private volatile boolean active = true;
+
+OutstandingOps(Runnable completionProc)
+{
+this.completionProc = new AtomicReference<>(completionProc);
+}
+
+void increment()
+{
+if ( active )
+{
+count.incrementAndGet();
+}
+}
+
+void decrement()
+{
+if ( active && (count.decrementAndGet() == 0) )
 
 Review comment:
   Much better!
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411669)
Time Spent: 12h 50m  (was: 12h 40m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 12h 50m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411620&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411620
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 05:30
Start Date: 28/Mar/20 05:30
Worklog Time Spent: 10m 
  Work Description: TisonKun commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399622593
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/OutstandingOps.java
 ##
 @@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicReference;
+
+class OutstandingOps
 
 Review comment:
   Yes that is the same as things in my mind. Since `OutstandingOps` 
implemented correctly now, we can have a follow-up to see if it's worth we 
replace it with Java builtins and I will share a patch with description there. 
At most it is an "improvement" and should not block this PR to merge :)
   
   For the "how", it seems to me that 
https://github.com/apache/curator/pull/335#discussion_r399591042 is clear.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411620)
Time Spent: 12h 40m  (was: 12.5h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 12h 40m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411608&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411608
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 04:27
Start Date: 28/Mar/20 04:27
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399617779
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/OutstandingOps.java
 ##
 @@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicReference;
+
+class OutstandingOps
 
 Review comment:
   It's the same idea as in TreeCache. When the cache is started each 
outstanding operation increments a counter and when the op completes it 
decrements the counter. It's not exact, but it provides a way to handle the 
"cache is initialized" feature. Once the outstanding ops counter gets back to 0 
it's no longer used.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411608)
Time Spent: 12.5h  (was: 12h 20m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 12.5h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411606&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411606
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 04:23
Start Date: 28/Mar/20 04:23
Worklog Time Spent: 10m 
  Work Description: TisonKun commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399591042
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/OutstandingOps.java
 ##
 @@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicReference;
+
+class OutstandingOps
 
 Review comment:
   An alternative is that `java.util.concurrent.Phaser` which already 
implements semantic like `OutstandingOps`.
   
   ```java
   Runnable r = () -> callListeners(CuratorCacheListener::initialized);
   Phaser p = new Phaser() {
 @Override
   protected boolean onAdvance(int phase, int registeredParties) {
   r.run();
   return true;
   }
   }
   ```
   
   and replace `increment` as `register` while `decrement` as 
`arriveAndDeregister`
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411606)
Time Spent: 12h 20m  (was: 12h 10m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 12h 20m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411605&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411605
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 04:22
Start Date: 28/Mar/20 04:22
Worklog Time Spent: 10m 
  Work Description: TisonKun commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399617406
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/OutstandingOps.java
 ##
 @@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicReference;
+
+class OutstandingOps
 
 Review comment:
   It seems `OutstandingOps` is a one-shot barrier, so that as the code snippet 
above when we have new outstanding op we register a party and terminate the 
phaser at the first time it is advanced. Is it the semantic of `OutstandingOps`?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411605)
Time Spent: 12h 10m  (was: 12h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 12h 10m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411543&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411543
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 00:20
Start Date: 28/Mar/20 00:20
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399592020
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/OutstandingOps.java
 ##
 @@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicReference;
+
+class OutstandingOps
 
 Review comment:
   Phaser looks to be a kind of barrier. How would it be used in this context 
@TisonKun ?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411543)
Time Spent: 12h  (was: 11h 50m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 12h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411542&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411542
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 00:17
Start Date: 28/Mar/20 00:17
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399591493
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/OutstandingOps.java
 ##
 @@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicReference;
+
+class OutstandingOps
 
 Review comment:
   Ooh - TIL - I didn't know about that. Thanks. Looking into it now.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411542)
Time Spent: 11h 50m  (was: 11h 40m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 11h 50m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411539&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411539
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 00:14
Start Date: 28/Mar/20 00:14
Worklog Time Spent: 10m 
  Work Description: TisonKun commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399591042
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/OutstandingOps.java
 ##
 @@ -0,0 +1,55 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicReference;
+
+class OutstandingOps
 
 Review comment:
   An alternative is that `java.util.concurrent.Phaser` which already 
implements semantic like `OutstandingOps`.
   
   ```java
   Runnable r = () -> callListeners(CuratorCacheListener::initialized);
   Phaser p = new Phaser() {
 @Override
   protected boolean onAdvance(int phase, int registeredParties) {
   if (registeredParties > 0) {
   return false;
   }
   r.run();
   return true;
   }
   }
   ```
   
   and replace `increment` as `register` while `decrement` as 
`arriveAndDeregister`
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411539)
Time Spent: 11h 40m  (was: 11.5h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 11h 40m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411529&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411529
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 28/Mar/20 00:08
Start Date: 28/Mar/20 00:08
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399589762
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/OutstandingOps.java
 ##
 @@ -0,0 +1,60 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import java.util.concurrent.atomic.AtomicLong;
+
+class OutstandingOps
+{
+private final Runnable completionProc;
+private volatile AtomicLong count = new AtomicLong(0);
+
+OutstandingOps(Runnable completionProc)
+{
+this.completionProc = completionProc;
+}
+
+void increment()
+{
+AtomicLong localCount = count;
+if ( localCount != null )
+{
+localCount.incrementAndGet();
+}
+}
+
+void decrement()
+{
+AtomicLong localCount = count;
+if ( localCount != null )
+{
+if ( (localCount.decrementAndGet() == 0) )
+{
+count = null;
 
 Review comment:
   @eolivelli I reworked it - please re-check
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411529)
Time Spent: 11.5h  (was: 11h 20m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 11.5h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411522&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411522
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 27/Mar/20 23:46
Start Date: 27/Mar/20 23:46
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399585561
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/OutstandingOps.java
 ##
 @@ -0,0 +1,60 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import java.util.concurrent.atomic.AtomicLong;
+
+class OutstandingOps
+{
+private final Runnable completionProc;
+private volatile AtomicLong count = new AtomicLong(0);
+
+OutstandingOps(Runnable completionProc)
+{
+this.completionProc = completionProc;
+}
+
+void increment()
+{
+AtomicLong localCount = count;
+if ( localCount != null )
+{
+localCount.incrementAndGet();
+}
+}
+
+void decrement()
+{
+AtomicLong localCount = count;
+if ( localCount != null )
+{
+if ( (localCount.decrementAndGet() == 0) )
+{
+count = null;
 
 Review comment:
   Hmm - I think there's a race here - I'm going to address.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411522)
Time Spent: 11h 20m  (was: 11h 10m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 11h 20m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411501&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411501
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 27/Mar/20 23:34
Start Date: 27/Mar/20 23:34
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399583025
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/OutstandingOps.java
 ##
 @@ -0,0 +1,60 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import java.util.concurrent.atomic.AtomicLong;
+
+class OutstandingOps
+{
+private final Runnable completionProc;
+private volatile AtomicLong count = new AtomicLong(0);
 
 Review comment:
   It gets set to null after `completionProc` is called to signal 
decrement/increment are no longer necessary.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411501)
Time Spent: 11h 10m  (was: 11h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 11h 10m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411500&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411500
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 27/Mar/20 23:32
Start Date: 27/Mar/20 23:32
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399582692
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/OutstandingOps.java
 ##
 @@ -0,0 +1,60 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import java.util.concurrent.atomic.AtomicLong;
+
+class OutstandingOps
+{
+private final Runnable completionProc;
+private volatile AtomicLong count = new AtomicLong(0);
+
+OutstandingOps(Runnable completionProc)
+{
+this.completionProc = completionProc;
+}
+
+void increment()
+{
+AtomicLong localCount = count;
+if ( localCount != null )
+{
+localCount.incrementAndGet();
+}
+}
+
+void decrement()
+{
+AtomicLong localCount = count;
+if ( localCount != null )
+{
+if ( (localCount.decrementAndGet() == 0) )
+{
+count = null;
 
 Review comment:
   Look at the next line `if ( localCount.compareAndSet(0, Long.MIN_VALUE) )` - 
that ensures consistency (please review and confirm).
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411500)
Time Spent: 11h  (was: 10h 50m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 11h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411497&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411497
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 27/Mar/20 23:30
Start Date: 27/Mar/20 23:30
Worklog Time Spent: 10m 
  Work Description: eolivelli commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399581395
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/OutstandingOps.java
 ##
 @@ -0,0 +1,60 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import java.util.concurrent.atomic.AtomicLong;
+
+class OutstandingOps
+{
+private final Runnable completionProc;
+private volatile AtomicLong count = new AtomicLong(0);
 
 Review comment:
   What not final?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411497)
Time Spent: 10h 50m  (was: 10h 40m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 10h 50m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=411496&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411496
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 27/Mar/20 23:30
Start Date: 27/Mar/20 23:30
Worklog Time Spent: 10m 
  Work Description: eolivelli commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r399582000
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/OutstandingOps.java
 ##
 @@ -0,0 +1,60 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.recipes.cache;
+
+import java.util.concurrent.atomic.AtomicLong;
+
+class OutstandingOps
+{
+private final Runnable completionProc;
+private volatile AtomicLong count = new AtomicLong(0);
+
+OutstandingOps(Runnable completionProc)
+{
+this.completionProc = completionProc;
+}
+
+void increment()
+{
+AtomicLong localCount = count;
+if ( localCount != null )
+{
+localCount.incrementAndGet();
+}
+}
+
+void decrement()
+{
+AtomicLong localCount = count;
+if ( localCount != null )
+{
+if ( (localCount.decrementAndGet() == 0) )
+{
+count = null;
 
 Review comment:
   I am not sure this trick works.
   
   You can be here when another thread calls increment function.
   You are not inside a lock
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 411496)
Time Spent: 10h 50m  (was: 10h 40m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 10h 50m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-26 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=410233&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-410233
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 26/Mar/20 12:18
Start Date: 26/Mar/20 12:18
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on issue #335: [CURATOR-549] Recipes 
based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#issuecomment-604397880
 
 
   @TisonKun 2 comments have been addressed.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 410233)
Time Spent: 10h 40m  (was: 10.5h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 10h 40m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-26 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=410230&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-410230
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 26/Mar/20 12:09
Start Date: 26/Mar/20 12:09
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r398522314
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCache.java
 ##
 @@ -0,0 +1,133 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.curator.framework.recipes.cache;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.listen.Listenable;
+import java.io.Closeable;
+import java.util.Optional;
+import java.util.stream.Stream;
+
+/**
+ * 
+ * A utility that attempts to keep the data from a node locally cached. 
Optionally the entire
+ * tree of children below the node can also be cached. Will respond to 
update/create/delete events, pull
+ * down the data, etc. You can register listeners that will get notified 
when changes occur.
+ * 
+ *
+ * 
+ * IMPORTANT - it's not possible to stay transactionally in sync. 
Users of this class must
+ * be prepared for false-positives and false-negatives. Additionally, 
always use the version number
+ * when updating data to avoid overwriting another process' change.
+ * 
+ */
+public interface CuratorCache extends Closeable, CuratorCacheAccessor
+{
+/**
+ * cache build options
+ */
+enum Options
+{
+/**
+ * Normally the entire tree of nodes starting at the given node are 
cached. This option
+ * causes only the given node to be cached (i.e. a single node cache)
+ */
+SINGLE_NODE_CACHE,
+
+/**
+ * Decompress data via {@link 
org.apache.curator.framework.api.GetDataBuilder#decompressed()}
+ */
+COMPRESSED_DATA,
+
+/**
+ * Normally, when the cache is closed via {@link 
CuratorCache#close()}, the storage is cleared
+ * via {@link CuratorCacheStorage#clear()}. This option prevents the 
storage from being cleared.
+ */
+DO_NOT_CLEAR_ON_CLOSE
+}
+
+/**
+ * Return a Curator Cache for the given path with the given options using 
a standard storage instance
+ *
+ * @param client Curator client
+ * @param path path to cache
+ * @param options any options
+ * @return cache (note it must be started via {@link #start()}
+ */
+static CuratorCache build(CuratorFramework client, String path, Options... 
options)
+{
+return builder(client, path).withOptions(options).build();
+}
+
+/**
+ * Start a Curator Cache builder
+ *
+ * @param client Curator client
+ * @param path path to cache
+ * @return builder
+ */
+static CuratorCacheBuilder builder(CuratorFramework client, String path)
+{
+return new CuratorCacheBuilderImpl(client, path);
+}
+
+/**
+ * Start the cache. This will cause a complete refresh from the cache's 
root node and generate
+ * events for all nodes found, etc.
+ */
+void start();
+
+/**
+ * Close the cache, stop responding to events, etc.
+ */
+@Override
+void close();
+
+/**
+ * Return the listener container so that listeners can be registered to be 
notified of changes to the cache
+ *
+ * @return listener container
+ */
+Listenable listenable();
+
+/**
+ * {@inheritDoc}
+ */
+@Override
+Optional get(String path);
+
+/**
+ * {@inheritDoc}
+ */
+@Override
+int size();
+
+/**
+ * {@inheritDoc}
+ */
+@Override
+Stream stream();
+
+/**
+ * {@inheritDoc}
+ */
+@Override
+Stream streamImmediateChildren(String fromParent);
 
 Review comment:
   I'm not happy with this API. I'm going to change it. Pl

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-26 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=410157&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-410157
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 26/Mar/20 09:08
Start Date: 26/Mar/20 09:08
Worklog Time Spent: 10m 
  Work Description: TisonKun commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r398353415
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCache.java
 ##
 @@ -0,0 +1,133 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.curator.framework.recipes.cache;
+
+import org.apache.curator.framework.CuratorFramework;
+import org.apache.curator.framework.listen.Listenable;
+import java.io.Closeable;
+import java.util.Optional;
+import java.util.stream.Stream;
+
+/**
+ * 
+ * A utility that attempts to keep the data from a node locally cached. 
Optionally the entire
+ * tree of children below the node can also be cached. Will respond to 
update/create/delete events, pull
+ * down the data, etc. You can register listeners that will get notified 
when changes occur.
+ * 
+ *
+ * 
+ * IMPORTANT - it's not possible to stay transactionally in sync. 
Users of this class must
+ * be prepared for false-positives and false-negatives. Additionally, 
always use the version number
+ * when updating data to avoid overwriting another process' change.
+ * 
+ */
+public interface CuratorCache extends Closeable, CuratorCacheAccessor
+{
+/**
+ * cache build options
+ */
+enum Options
+{
+/**
+ * Normally the entire tree of nodes starting at the given node are 
cached. This option
+ * causes only the given node to be cached (i.e. a single node cache)
+ */
+SINGLE_NODE_CACHE,
+
+/**
+ * Decompress data via {@link 
org.apache.curator.framework.api.GetDataBuilder#decompressed()}
+ */
+COMPRESSED_DATA,
+
+/**
+ * Normally, when the cache is closed via {@link 
CuratorCache#close()}, the storage is cleared
+ * via {@link CuratorCacheStorage#clear()}. This option prevents the 
storage from being cleared.
+ */
+DO_NOT_CLEAR_ON_CLOSE
+}
+
+/**
+ * Return a Curator Cache for the given path with the given options using 
a standard storage instance
+ *
+ * @param client Curator client
+ * @param path path to cache
+ * @param options any options
+ * @return cache (note it must be started via {@link #start()}
+ */
+static CuratorCache build(CuratorFramework client, String path, Options... 
options)
+{
+return builder(client, path).withOptions(options).build();
+}
+
+/**
+ * Start a Curator Cache builder
+ *
+ * @param client Curator client
+ * @param path path to cache
+ * @return builder
+ */
+static CuratorCacheBuilder builder(CuratorFramework client, String path)
+{
+return new CuratorCacheBuilderImpl(client, path);
+}
+
+/**
+ * Start the cache. This will cause a complete refresh from the cache's 
root node and generate
+ * events for all nodes found, etc.
+ */
+void start();
+
+/**
+ * Close the cache, stop responding to events, etc.
+ */
+@Override
+void close();
+
+/**
+ * Return the listener container so that listeners can be registered to be 
notified of changes to the cache
+ *
+ * @return listener container
+ */
+Listenable listenable();
+
+/**
+ * {@inheritDoc}
+ */
+@Override
+Optional get(String path);
+
+/**
+ * {@inheritDoc}
+ */
+@Override
+int size();
+
+/**
+ * {@inheritDoc}
+ */
+@Override
+Stream stream();
+
+/**
+ * {@inheritDoc}
+ */
+@Override
+Stream streamImmediateChildren(String fromParent);
 
 Review comment:
   Is this method for compatibility of `PathChildrenCache#

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-26 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=410158&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-410158
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 26/Mar/20 09:08
Start Date: 26/Mar/20 09:08
Worklog Time Spent: 10m 
  Work Description: TisonKun commented on pull request #335: [CURATOR-549] 
Recipes based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#discussion_r398354417
 
 

 ##
 File path: 
curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/CuratorCacheBuilder.java
 ##
 @@ -0,0 +1,68 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.curator.framework.recipes.cache;
+
+import java.util.concurrent.CompletableFuture;
+import java.util.function.Consumer;
+import java.util.function.Function;
+
+public interface CuratorCacheBuilder
+{
+/**
+ * @param options any options
+ * @return this
+ */
+CuratorCacheBuilder withOptions(CuratorCache.Options... options);
+
+/**
+ * Alternate storage to use. If not specified, {@link 
StandardCuratorCacheStorage#standard()} is used
+ *
+ * @param storage storage instance to use
+ * @return this
+ */
+CuratorCacheBuilder withStorage(CuratorCacheStorage storage);
+
+/**
+ * By default any unexpected exception is handled by logging the 
exception. You can change
+ * so that a handler is called instead. Under normal circumstances, this 
shouldn't be necessary.
+ *
+ * @param exceptionHandler exception handler to use
+ */
+CuratorCacheBuilder withExceptionHandler(Consumer 
exceptionHandler);
+
+/**
+ * Low-level replacement for runSafe. Listeners are notified by calling
+ * {@code runSafe(() -> listenerManager.forEach(...))}. This should work 
for nearly any
+ * case. However, you can provide a different handler instead so that 
runSafe is not
+ * used. The proc must behave similar to {@link 
org.apache.curator.framework.CuratorFramework#runSafe(Runnable)}.
+ * Under normal circumstances, this shouldn't be necessary.
+ *
+ * @param runSafeProc runSafe proc
+ * @return this
+ */
+CuratorCacheBuilder withListenerRunProc(Function> runSafeProc);
 
 Review comment:
   Shall we add a test or example for the use case? I don't see the motivation 
here in practice.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 410158)
Time Spent: 10h 20m  (was: 10h 10m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 10h 20m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCach

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-25 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=410104&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-410104
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 26/Mar/20 06:50
Start Date: 26/Mar/20 06:50
Worklog Time Spent: 10m 
  Work Description: TisonKun commented on issue #335: [CURATOR-549] Recipes 
based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#issuecomment-604260911
 
 
   Thanks for your work! I'm reviewing now.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 410104)
Time Spent: 10h  (was: 9h 50m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 10h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-23 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=407902&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-407902
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 23/Mar/20 13:58
Start Date: 23/Mar/20 13:58
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on issue #335: [CURATOR-549] Recipes 
based on Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/335#issuecomment-602607043
 
 
   Attn: @cammckenzie @shayshim @TisonKun - reviews would be appreciated
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 407902)
Time Spent: 9h 50m  (was: 9h 40m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 9h 50m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-19 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=406711&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-406711
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 20/Mar/20 02:13
Start Date: 20/Mar/20 02:13
Worklog Time Spent: 10m 
  Work Description: TisonKun commented on pull request #334: [CURATOR-549] 
Support ZooKeeper 3.6.0 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334#discussion_r395410864
 
 

 ##
 File path: 
curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorEdges.java
 ##
 @@ -26,6 +26,7 @@
 import org.apache.curator.framework.state.ConnectionState;
 import org.apache.curator.retry.RetryNTimes;
 import org.apache.curator.test.BaseClassForTests;
+import org.apache.curator.test.compatibility.CuratorTestBase;
 
 Review comment:
   Unused import
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 406711)
Time Spent: 9h 40m  (was: 9.5h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 9h 40m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-19 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=406702&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-406702
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 20/Mar/20 01:52
Start Date: 20/Mar/20 01:52
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #334: [CURATOR-549] 
Support ZooKeeper 3.6.0 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 406702)
Time Spent: 9.5h  (was: 9h 20m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 9.5h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-19 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=406664&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-406664
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 20/Mar/20 00:16
Start Date: 20/Mar/20 00:16
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #334: [CURATOR-549] 
Support ZooKeeper 3.6.0 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334#discussion_r395387653
 
 

 ##
 File path: 
curator-framework/src/test/java/org/apache/curator/framework/imps/TestWatchesBuilder.java
 ##
 @@ -610,6 +613,122 @@ public void pathAddedForGuaranteedOperation(
 }
 }
 
+@Test(groups = CuratorTestBase.zk36Group)
+public void testPersistentWatch() throws Exception
+{
+try ( CuratorFramework client = 
CuratorFrameworkFactory.newClient(server.getConnectString(), new 
RetryOneTime(1)) )
+{
+client.start();
+client.blockUntilConnected();
+
+CountDownLatch latch = new CountDownLatch(3);
+Watcher watcher = event -> latch.countDown();
+
client.watchers().add().withMode(AddWatchMode.PERSISTENT).usingWatcher(watcher).forPath("/test/foo");
+
+client.create().creatingParentsIfNeeded().forPath("/test/foo");
+client.setData().forPath("/test/foo", "hey".getBytes());
+client.delete().forPath("/test/foo");
+
+Assert.assertTrue(timing.awaitLatch(latch));
+}
+}
+
+@Test(groups = CuratorTestBase.zk36Group)
+public void testPersistentWatchInBackground() throws Exception
+{
+try ( CuratorFramework client = 
CuratorFrameworkFactory.newClient(server.getConnectString(), new 
RetryOneTime(1)) )
+{
+client.start();
+client.blockUntilConnected();
+
+CountDownLatch backgroundLatch = new CountDownLatch(1);
+BackgroundCallback backgroundCallback = (__, ___) -> 
backgroundLatch.countDown();
+CountDownLatch latch = new CountDownLatch(3);
+Watcher watcher = event -> latch.countDown();
+
client.watchers().add().withMode(AddWatchMode.PERSISTENT).inBackground(backgroundCallback).usingWatcher(watcher).forPath("/test/foo");
+
+client.create().creatingParentsIfNeeded().forPath("/test/foo");
+client.setData().forPath("/test/foo", "hey".getBytes());
+client.delete().forPath("/test/foo");
+
+Assert.assertTrue(timing.awaitLatch(latch));
+}
+}
+
+@Test(groups = CuratorTestBase.zk36Group)
+public void testPersistentRecursiveWatch() throws Exception
+{
+try ( CuratorFramework client = 
CuratorFrameworkFactory.newClient(server.getConnectString(), new 
RetryOneTime(1)) )
+{
+client.start();
+client.blockUntilConnected();
+
+CountDownLatch latch = new CountDownLatch(5);
+Watcher watcher = event -> latch.countDown();
+
client.watchers().add().withMode(AddWatchMode.PERSISTENT_RECURSIVE).usingWatcher(watcher).forPath("/test");
+
+client.create().forPath("/test");
+client.create().forPath("/test/a");
+client.create().forPath("/test/a/b");
+client.create().forPath("/test/a/b/c");
+client.create().forPath("/test/a/b/c/d");
+
+Assert.assertTrue(timing.awaitLatch(latch));
+}
+}
+
+@Test(groups = CuratorTestBase.zk36Group)
+public void testPersistentRecursiveWatchInBackground() throws Exception
+{
+try ( CuratorFramework client = 
CuratorFrameworkFactory.newClient(server.getConnectString(), new 
RetryOneTime(1)) )
+{
+client.start();
+client.blockUntilConnected();
+
+CountDownLatch backgroundLatch = new CountDownLatch(1);
 
 Review comment:
   Good catch on both
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 406664)
Time Spent: 9h 20m  (was: 9h 10m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: 

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-19 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=406621&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-406621
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 19/Mar/20 22:10
Start Date: 19/Mar/20 22:10
Worklog Time Spent: 10m 
  Work Description: cammckenzie commented on pull request #334: 
[CURATOR-549] Support ZooKeeper 3.6.0 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334#discussion_r395346038
 
 

 ##
 File path: 
curator-framework/src/test/java/org/apache/curator/framework/imps/TestWatchesBuilder.java
 ##
 @@ -610,6 +613,122 @@ public void pathAddedForGuaranteedOperation(
 }
 }
 
+@Test(groups = CuratorTestBase.zk36Group)
+public void testPersistentWatch() throws Exception
+{
+try ( CuratorFramework client = 
CuratorFrameworkFactory.newClient(server.getConnectString(), new 
RetryOneTime(1)) )
+{
+client.start();
+client.blockUntilConnected();
+
+CountDownLatch latch = new CountDownLatch(3);
+Watcher watcher = event -> latch.countDown();
+
client.watchers().add().withMode(AddWatchMode.PERSISTENT).usingWatcher(watcher).forPath("/test/foo");
+
+client.create().creatingParentsIfNeeded().forPath("/test/foo");
+client.setData().forPath("/test/foo", "hey".getBytes());
+client.delete().forPath("/test/foo");
+
+Assert.assertTrue(timing.awaitLatch(latch));
+}
+}
+
+@Test(groups = CuratorTestBase.zk36Group)
+public void testPersistentWatchInBackground() throws Exception
+{
+try ( CuratorFramework client = 
CuratorFrameworkFactory.newClient(server.getConnectString(), new 
RetryOneTime(1)) )
+{
+client.start();
+client.blockUntilConnected();
+
+CountDownLatch backgroundLatch = new CountDownLatch(1);
 
 Review comment:
   What's the purpose of the backgroundLatch? It doesn't seem to actually get 
used (beyond being counted down).
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 406621)
Time Spent: 9h  (was: 8h 50m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 9h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-19 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=406622&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-406622
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 19/Mar/20 22:10
Start Date: 19/Mar/20 22:10
Worklog Time Spent: 10m 
  Work Description: cammckenzie commented on pull request #334: 
[CURATOR-549] Support ZooKeeper 3.6.0 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334#discussion_r395346470
 
 

 ##
 File path: 
curator-framework/src/test/java/org/apache/curator/framework/imps/TestWatchesBuilder.java
 ##
 @@ -610,6 +613,122 @@ public void pathAddedForGuaranteedOperation(
 }
 }
 
+@Test(groups = CuratorTestBase.zk36Group)
+public void testPersistentWatch() throws Exception
+{
+try ( CuratorFramework client = 
CuratorFrameworkFactory.newClient(server.getConnectString(), new 
RetryOneTime(1)) )
+{
+client.start();
+client.blockUntilConnected();
+
+CountDownLatch latch = new CountDownLatch(3);
+Watcher watcher = event -> latch.countDown();
+
client.watchers().add().withMode(AddWatchMode.PERSISTENT).usingWatcher(watcher).forPath("/test/foo");
+
+client.create().creatingParentsIfNeeded().forPath("/test/foo");
+client.setData().forPath("/test/foo", "hey".getBytes());
+client.delete().forPath("/test/foo");
+
+Assert.assertTrue(timing.awaitLatch(latch));
+}
+}
+
+@Test(groups = CuratorTestBase.zk36Group)
+public void testPersistentWatchInBackground() throws Exception
+{
+try ( CuratorFramework client = 
CuratorFrameworkFactory.newClient(server.getConnectString(), new 
RetryOneTime(1)) )
+{
+client.start();
+client.blockUntilConnected();
+
+CountDownLatch backgroundLatch = new CountDownLatch(1);
+BackgroundCallback backgroundCallback = (__, ___) -> 
backgroundLatch.countDown();
+CountDownLatch latch = new CountDownLatch(3);
+Watcher watcher = event -> latch.countDown();
+
client.watchers().add().withMode(AddWatchMode.PERSISTENT).inBackground(backgroundCallback).usingWatcher(watcher).forPath("/test/foo");
+
+client.create().creatingParentsIfNeeded().forPath("/test/foo");
+client.setData().forPath("/test/foo", "hey".getBytes());
+client.delete().forPath("/test/foo");
+
+Assert.assertTrue(timing.awaitLatch(latch));
+}
+}
+
+@Test(groups = CuratorTestBase.zk36Group)
+public void testPersistentRecursiveWatch() throws Exception
+{
+try ( CuratorFramework client = 
CuratorFrameworkFactory.newClient(server.getConnectString(), new 
RetryOneTime(1)) )
+{
+client.start();
+client.blockUntilConnected();
+
+CountDownLatch latch = new CountDownLatch(5);
+Watcher watcher = event -> latch.countDown();
+
client.watchers().add().withMode(AddWatchMode.PERSISTENT_RECURSIVE).usingWatcher(watcher).forPath("/test");
+
+client.create().forPath("/test");
+client.create().forPath("/test/a");
+client.create().forPath("/test/a/b");
+client.create().forPath("/test/a/b/c");
+client.create().forPath("/test/a/b/c/d");
+
+Assert.assertTrue(timing.awaitLatch(latch));
+}
+}
+
+@Test(groups = CuratorTestBase.zk36Group)
+public void testPersistentRecursiveWatchInBackground() throws Exception
+{
+try ( CuratorFramework client = 
CuratorFrameworkFactory.newClient(server.getConnectString(), new 
RetryOneTime(1)) )
+{
+client.start();
+client.blockUntilConnected();
+
+CountDownLatch backgroundLatch = new CountDownLatch(1);
 
 Review comment:
   As for previous backgroundLatch comment
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 406622)
Time Spent: 9h 10m  (was: 9h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>  

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-19 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=406443&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-406443
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 19/Mar/20 17:55
Start Date: 19/Mar/20 17:55
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #334: [CURATOR-549] 
Support ZooKeeper 3.6.0 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334#discussion_r395215945
 
 

 ##
 File path: 
curator-x-async/src/main/java/org/apache/curator/x/async/details/AsyncCuratorFrameworkImpl.java
 ##
 @@ -151,6 +153,13 @@ public AsyncRemoveWatchesBuilder removeWatches()
 return new AsyncRemoveWatchesBuilderImpl(client, filters);
 }
 
+@Override
+public AsyncWatchBuilder addWatch()
+{
+Preconditions.checkState(Compatibility.hasPersistentWatchers(), 
"addWatch() is not supported in the ZooKeeper library being used.");
 
 Review comment:
   it's always been this way - I'd rather leave it for historical reasons
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 406443)
Time Spent: 8h 50m  (was: 8h 40m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 8h 50m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-19 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=406381&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-406381
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 19/Mar/20 16:40
Start Date: 19/Mar/20 16:40
Worklog Time Spent: 10m 
  Work Description: eolivelli commented on pull request #334: [CURATOR-549] 
Support ZooKeeper 3.6.0 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334#discussion_r395164268
 
 

 ##
 File path: 
curator-x-async/src/main/java/org/apache/curator/x/async/details/AsyncCuratorFrameworkImpl.java
 ##
 @@ -151,6 +153,13 @@ public AsyncRemoveWatchesBuilder removeWatches()
 return new AsyncRemoveWatchesBuilderImpl(client, filters);
 }
 
+@Override
+public AsyncWatchBuilder addWatch()
+{
+Preconditions.checkState(Compatibility.hasPersistentWatchers(), 
"addWatch() is not supported in the ZooKeeper library being used.");
 
 Review comment:
   I would throw UnsupportedOperationException
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 406381)
Time Spent: 8h 40m  (was: 8.5h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 8h 40m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-19 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=406317&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-406317
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 19/Mar/20 15:21
Start Date: 19/Mar/20 15:21
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on issue #334: [CURATOR-549] Support 
ZooKeeper 3.6.0 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334#issuecomment-601239624
 
 
   attn: @eolivelli @cammckenzie @shayshim @TisonKun 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 406317)
Time Spent: 8.5h  (was: 8h 20m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 8.5h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-18 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=405540&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-405540
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 18/Mar/20 16:05
Start Date: 18/Mar/20 16:05
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on issue #334: [CURATOR-549] Support 
ZooKeeper 3.6.0 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334#issuecomment-600142556
 
 
   > In the case that ZK server is using the Optimized WatchManager it would 
not be able to support PersistentRecursive watches.
   > How can we deal with this problem ?
   
   Hmm - good call. I'll consider this.
   
   More: there's no way for the client to detect this so there's nothing 
Curator can do. This suggests a new ZooKeeper server-API for returning some 
kind of metadata with version info, feature support, etc. I'll open something 
on the ZooKeeper board.
   
   https://issues.apache.org/jira/browse/ZOOKEEPER-3762
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 405540)
Time Spent: 8h 20m  (was: 8h 10m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 8h 20m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-17 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=404862&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-404862
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 17/Mar/20 17:26
Start Date: 17/Mar/20 17:26
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on issue #334: [CURATOR-549] Support 
ZooKeeper 3.6.0 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334#issuecomment-600142556
 
 
   > In the case that ZK server is using the Optimized WatchManager it would 
not be able to support PersistentRecursive watches.
   > How can we deal with this problem ?
   
   Hmm - good call. I'll consider this.
   
   More: there's no way for the client to detect this so there's nothing 
Curator can do. This suggests a new ZooKeeper server-API for returning some 
kind of metadata with version info, feature support, etc. I'll open something 
on the ZooKeeper board.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 404862)
Time Spent: 8h 10m  (was: 8h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 8h 10m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-17 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=404799&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-404799
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 17/Mar/20 15:44
Start Date: 17/Mar/20 15:44
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on issue #334: [CURATOR-549] Support 
ZooKeeper 3.6.0 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334#issuecomment-600142556
 
 
   > In the case that ZK server is using the Optimized WatchManager it would 
not be able to support PersistentRecursive watches.
   > How can we deal with this problem ?
   
   Hmm - good call. I'll consider this.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 404799)
Time Spent: 8h  (was: 7h 50m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 8h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-16 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=404383&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-404383
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 17/Mar/20 01:15
Start Date: 17/Mar/20 01:15
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #334: [CURATOR-549] 
Support ZooKeeper 3.6.0 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334#discussion_r393393447
 
 

 ##
 File path: 
curator-framework/src/test/java/org/apache/curator/framework/imps/TestWatchesBuilder.java
 ##
 @@ -611,6 +614,56 @@ public void pathAddedForGuaranteedOperation(
 }
 }
 
+@Test(groups = CuratorTestBase.zk36Group)
+public void testPersistentRecursiveWatch() throws Exception
+{
+try ( CuratorFramework client = 
CuratorFrameworkFactory.newClient(server.getConnectString(), new 
RetryOneTime(1)) )
+{
+client.start();
+client.blockUntilConnected();
+
+CountDownLatch latch = new CountDownLatch(5);
+Watcher watcher = event -> latch.countDown();
+
client.watchers().add().withMode(AddWatchMode.PERSISTENT_RECURSIVE).usingWatcher(watcher).forPath("/test");
+
+client.create().forPath("/test");
 
 Review comment:
   I was thinking it isn't necessary to test functionality that's already 
tested in ZK itself. But, this is a good point. I'll add some more tests.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 404383)
Time Spent: 7h 50m  (was: 7h 40m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 7h 50m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-15 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=403661&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-403661
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 15/Mar/20 20:31
Start Date: 15/Mar/20 20:31
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #334: [CURATOR-549] 
Support ZooKeeper 3.5.6 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334#discussion_r392709729
 
 

 ##
 File path: 
curator-x-async/src/main/java/org/apache/curator/x/async/api/AsyncCuratorFrameworkDsl.java
 ##
 @@ -112,4 +112,11 @@
  * @return builder object
  */
 AsyncRemoveWatchesBuilder removeWatches();
+
+/**
+ * Start an add watch builder
+ *
+ * @return builder object
+ */
+AsyncWatchBuilder addWatch();
 
 Review comment:
   No, the DSL verbs are different in for async and sync
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 403661)
Time Spent: 7h 40m  (was: 7.5h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 7h 40m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-15 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=403605&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-403605
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 15/Mar/20 13:55
Start Date: 15/Mar/20 13:55
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on issue #338: [CURATOR-549] Prep 
for Persistent Watchers by moving to ZK 3.6.0
URL: https://github.com/apache/curator/pull/338#issuecomment-599213669
 
 
   Closing in favor of #350 - this should be a Pr for CURATOR-558
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 403605)
Time Spent: 7h 20m  (was: 7h 10m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 7h 20m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-15 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=403606&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-403606
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 15/Mar/20 13:55
Start Date: 15/Mar/20 13:55
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #338: [CURATOR-549] 
Prep for Persistent Watchers by moving to ZK 3.6.0
URL: https://github.com/apache/curator/pull/338
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 403606)
Time Spent: 7.5h  (was: 7h 20m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 7.5h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-15 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=403602&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-403602
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 15/Mar/20 13:51
Start Date: 15/Mar/20 13:51
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #338: [CURATOR-549] 
Prep for Persistent Watchers by moving to ZK 3.6.0
URL: https://github.com/apache/curator/pull/338#discussion_r392675833
 
 

 ##
 File path: 
curator-framework/src/main/java/org/apache/curator/framework/imps/ReconfigBuilderImpl.java
 ##
 @@ -268,7 +269,7 @@ public void processResult(int rc, String path, Object ctx, 
byte[] bytes, Stat st
 client.processBackgroundOperation(data, event);
 }
 };
-client.getZooKeeper().reconfig(joining, leaving, newMembers, 
fromConfig, callback, backgrounding.getContext());
+((ZooKeeperAdmin)client.getZooKeeper()).reconfigure(joining, 
leaving, newMembers, fromConfig, callback, backgrounding.getContext());
 
 Review comment:
   No - via the `ZookeeperFactory` clients can change which ZooKeeper class is 
returned. In fact, I added `NonAdminZookeeperFactory` that returns the 
non-admin ZooKeeper. Of course, clients will need to know they can't use the 
reconfig APIs when this is done.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 403602)
Time Spent: 7h 10m  (was: 7h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 7h 10m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-14 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=403535&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-403535
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 15/Mar/20 04:47
Start Date: 15/Mar/20 04:47
Worklog Time Spent: 10m 
  Work Description: TisonKun commented on pull request #338: [CURATOR-549] 
Prep for Persistent Watchers by moving to ZK 3.6.0
URL: https://github.com/apache/curator/pull/338#discussion_r392640840
 
 

 ##
 File path: 
curator-test/src/main/java/org/apache/curator/test/BaseClassForTests.java
 ##
 @@ -123,7 +123,16 @@ public void setup() throws Exception
 System.setProperty(INTERNAL_PROPERTY_REMOVE_WATCHERS_IN_FOREGROUND, 
"true");
 
System.setProperty(INTERNAL_PROPERTY_VALIDATE_NAMESPACE_WATCHER_MAP_EMPTY, 
"true");
 
-createServer();
+try
+{
+createServer();
+}
+catch ( FailedServerStartException ignore )
+{
+log.warn("Failed to start server - retrying");
+closeServer();
+createServer();
 
 Review comment:
   Nice to document that we try exactly one more time for a best effort flaky 
test auto-recovery. It is confused at the first glance(why retry exactly once) 
and over-engineering if we set the retry time as a field or even configurable.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 403535)
Time Spent: 6h 50m  (was: 6h 40m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 6h 50m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-14 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=403536&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-403536
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 15/Mar/20 04:47
Start Date: 15/Mar/20 04:47
Worklog Time Spent: 10m 
  Work Description: TisonKun commented on pull request #338: [CURATOR-549] 
Prep for Persistent Watchers by moving to ZK 3.6.0
URL: https://github.com/apache/curator/pull/338#discussion_r392640142
 
 

 ##
 File path: 
curator-client/src/main/java/org/apache/curator/utils/Compatibility.java
 ##
 @@ -0,0 +1,104 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.curator.utils;
+
+import org.apache.zookeeper.server.quorum.QuorumPeer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.InetSocketAddress;
+
+/**
+ * Utils to help with ZK version compatibility
+ */
+public class Compatibility
+{
+private static final Method getReachableOrOneMethod;
+private static final Field addrField;
+
+private static final Logger logger = 
LoggerFactory.getLogger(Compatibility.class);
+
+static
+{
+Method localGetReachableOrOneMethod;
+try
+{
+Class multipleAddressesClass = 
Class.forName("org.apache.zookeeper.server.quorum.MultipleAddresses");
+localGetReachableOrOneMethod = 
multipleAddressesClass.getMethod("getReachableOrOne");
+LoggerFactory.getLogger(Compatibility.class).info("Using 
org.apache.zookeeper.server.quorum.MultipleAddresses");
+}
+catch ( ReflectiveOperationException ignore )
+{
+localGetReachableOrOneMethod = null;
+}
+getReachableOrOneMethod = localGetReachableOrOneMethod;
+
+Field localAddrField;
+try
+{
+localAddrField = QuorumPeer.QuorumServer.class.getField("addr");
+}
+catch ( NoSuchFieldException e )
+{
+localAddrField = null;
+LoggerFactory.getLogger(Compatibility.class).error("Could not get 
addr field! Reconfiguration fail!");
 
 Review comment:
   ```suggestion
   logger.error("Could not get addr field! Reconfiguration fail!");
   ```
   
   And most where in Curator we call the logger `log`.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 403536)
Time Spent: 7h  (was: 6h 50m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 7h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * 

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-14 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=403532&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-403532
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 15/Mar/20 04:47
Start Date: 15/Mar/20 04:47
Worklog Time Spent: 10m 
  Work Description: TisonKun commented on pull request #338: [CURATOR-549] 
Prep for Persistent Watchers by moving to ZK 3.6.0
URL: https://github.com/apache/curator/pull/338#discussion_r392640142
 
 

 ##
 File path: 
curator-client/src/main/java/org/apache/curator/utils/Compatibility.java
 ##
 @@ -0,0 +1,104 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.curator.utils;
+
+import org.apache.zookeeper.server.quorum.QuorumPeer;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.InetSocketAddress;
+
+/**
+ * Utils to help with ZK version compatibility
+ */
+public class Compatibility
+{
+private static final Method getReachableOrOneMethod;
+private static final Field addrField;
+
+private static final Logger logger = 
LoggerFactory.getLogger(Compatibility.class);
+
+static
+{
+Method localGetReachableOrOneMethod;
+try
+{
+Class multipleAddressesClass = 
Class.forName("org.apache.zookeeper.server.quorum.MultipleAddresses");
+localGetReachableOrOneMethod = 
multipleAddressesClass.getMethod("getReachableOrOne");
+LoggerFactory.getLogger(Compatibility.class).info("Using 
org.apache.zookeeper.server.quorum.MultipleAddresses");
+}
+catch ( ReflectiveOperationException ignore )
+{
+localGetReachableOrOneMethod = null;
+}
+getReachableOrOneMethod = localGetReachableOrOneMethod;
+
+Field localAddrField;
+try
+{
+localAddrField = QuorumPeer.QuorumServer.class.getField("addr");
+}
+catch ( NoSuchFieldException e )
+{
+localAddrField = null;
+LoggerFactory.getLogger(Compatibility.class).error("Could not get 
addr field! Reconfiguration fail!");
 
 Review comment:
   ```suggestion
   logger.error("Could not get addr field! Reconfiguration fail!");
   ```
   
   And most where in Curator we call `log`.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 403532)
Time Spent: 6.5h  (was: 6h 20m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 6.5h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Depreca

[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-14 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=403533&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-403533
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 15/Mar/20 04:47
Start Date: 15/Mar/20 04:47
Worklog Time Spent: 10m 
  Work Description: TisonKun commented on pull request #338: [CURATOR-549] 
Prep for Persistent Watchers by moving to ZK 3.6.0
URL: https://github.com/apache/curator/pull/338#discussion_r392640705
 
 

 ##
 File path: 
curator-framework/src/main/java/org/apache/curator/framework/imps/ReconfigBuilderImpl.java
 ##
 @@ -268,7 +269,7 @@ public void processResult(int rc, String path, Object ctx, 
byte[] bytes, Stat st
 client.processBackgroundOperation(data, event);
 }
 };
-client.getZooKeeper().reconfig(joining, leaving, newMembers, 
fromConfig, callback, backgrounding.getContext());
+((ZooKeeperAdmin)client.getZooKeeper()).reconfigure(joining, 
leaving, newMembers, fromConfig, callback, backgrounding.getContext());
 
 Review comment:
   Shall we change the return type of `getZooKeeper` to `ZooKeeperAdmin`?
   
   I don't see an instantiate code path of `NonAdminZookeeperFactory` and from 
3.5.3 there is always `ZooKeeperAdmin`. From another perspective, what if 
`getZooKeeper` didn't return `ZooKeeperAdmin` and we reach to this line? It 
seems the program exits exceptionally.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 403533)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 6.5h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-14 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=403534&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-403534
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 15/Mar/20 04:47
Start Date: 15/Mar/20 04:47
Worklog Time Spent: 10m 
  Work Description: TisonKun commented on pull request #338: [CURATOR-549] 
Prep for Persistent Watchers by moving to ZK 3.6.0
URL: https://github.com/apache/curator/pull/338#discussion_r392640787
 
 

 ##
 File path: 
curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorEdges.java
 ##
 @@ -26,6 +26,7 @@
 import org.apache.curator.framework.state.ConnectionState;
 import org.apache.curator.retry.RetryNTimes;
 import org.apache.curator.test.BaseClassForTests;
+import org.apache.curator.test.compatibility.CuratorTestBase;
 
 Review comment:
   Unused import.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 403534)
Time Spent: 6h 40m  (was: 6.5h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 6h 40m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2020-03-14 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=403527&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-403527
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 15/Mar/20 03:51
Start Date: 15/Mar/20 03:51
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on issue #338: [CURATOR-549] Prep 
for Persistent Watchers by moving to ZK 3.6.0
URL: https://github.com/apache/curator/pull/338#issuecomment-599164345
 
 
   @shayshim @cammckenzie @TisonKun this PR is ready for review/re-review
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 403527)
Time Spent: 6h 20m  (was: 6h 10m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 5.0.0
>
>  Time Spent: 6h 20m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2019-12-02 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=352271&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-352271
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 02/Dec/19 22:31
Start Date: 02/Dec/19 22:31
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #334: [CURATOR-549] 
Support ZooKeeper 3.5.6 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334#discussion_r352894455
 
 

 ##
 File path: 
curator-framework/src/main/java/org/apache/curator/framework/api/AddWatchBuilder.java
 ##
 @@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.api;
+
+import org.apache.zookeeper.AddWatchMode;
+
+public interface AddWatchBuilder extends AddWatchBuilder2
 
 Review comment:
   OK, it is just a little hard for me with using the same name but with 2 as 
suffix, but I don't have a better name to offer :)
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 352271)
Time Spent: 6h 10m  (was: 6h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 4.3.0
>
>  Time Spent: 6h 10m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2019-12-02 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=352269&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-352269
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 02/Dec/19 22:24
Start Date: 02/Dec/19 22:24
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #334: [CURATOR-549] 
Support ZooKeeper 3.5.6 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334#discussion_r352891261
 
 

 ##
 File path: 
curator-framework/src/test/java/org/apache/curator/framework/imps/TestWatchesBuilder.java
 ##
 @@ -611,6 +614,56 @@ public void pathAddedForGuaranteedOperation(
 }
 }
 
+@Test(groups = CuratorTestBase.zk36Group)
+public void testPersistentRecursiveWatch() throws Exception
+{
+try ( CuratorFramework client = 
CuratorFrameworkFactory.newClient(server.getConnectString(), new 
RetryOneTime(1)) )
+{
+client.start();
+client.blockUntilConnected();
+
+CountDownLatch latch = new CountDownLatch(5);
+Watcher watcher = event -> latch.countDown();
+
client.watchers().add().withMode(AddWatchMode.PERSISTENT_RECURSIVE).usingWatcher(watcher).forPath("/test");
+
+client.create().forPath("/test");
 
 Review comment:
   Not interesting to test here also other recursive events like data changes 
and remove nodes?
   Also, might be good to create and modify recursively "/not-the-test" and 
make sure nothing comes from there.
   And remove watcher tests shouldn't be repeated for persistent/recursive too?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 352269)
Time Spent: 6h  (was: 5h 50m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 4.3.0
>
>  Time Spent: 6h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2019-12-02 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=352254&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-352254
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 02/Dec/19 22:06
Start Date: 02/Dec/19 22:06
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #334: [CURATOR-549] 
Support ZooKeeper 3.5.6 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334#discussion_r352884218
 
 

 ##
 File path: 
curator-x-async/src/main/java/org/apache/curator/x/async/api/AsyncCuratorFrameworkDsl.java
 ##
 @@ -112,4 +112,11 @@
  * @return builder object
  */
 AsyncRemoveWatchesBuilder removeWatches();
+
+/**
+ * Start an add watch builder
+ *
+ * @return builder object
+ */
+AsyncWatchBuilder addWatch();
 
 Review comment:
   Shouldn't addWatch() be named watchers(), line in CuratorFramwork, to be 
consistent with the naming?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 352254)
Time Spent: 5h 50m  (was: 5h 40m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 4.3.0
>
>  Time Spent: 5h 50m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2019-11-30 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=351583&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-351583
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 30/Nov/19 20:58
Start Date: 30/Nov/19 20:58
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #334: [CURATOR-549] 
Support ZooKeeper 3.5.6 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334#discussion_r352304147
 
 

 ##
 File path: 
curator-framework/src/main/java/org/apache/curator/framework/api/AddWatchBuilder.java
 ##
 @@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.api;
+
+import org.apache.zookeeper.AddWatchMode;
+
+public interface AddWatchBuilder extends AddWatchBuilder2
 
 Review comment:
   `AddWatchBuilder` has the "withMode" method which is optional.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 351583)
Time Spent: 5h 40m  (was: 5.5h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 4.3.0
>
>  Time Spent: 5h 40m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2019-11-30 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=351572&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-351572
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 30/Nov/19 20:23
Start Date: 30/Nov/19 20:23
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #334: [CURATOR-549] 
Support ZooKeeper 3.5.6 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334#discussion_r352302681
 
 

 ##
 File path: 
curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java
 ##
 @@ -572,6 +572,13 @@ public RemoveWatchesBuilder watches()
 return new RemoveWatchesBuilderImpl(this);
 }
 
+@Override
+public WatchesBuilder watchers()
+{
+Preconditions.checkState(Compatibility.hasPersistentWatchers(), 
"addWatch() is not supported in the ZooKeeper library being used. Use watches() 
instead.");
 
 Review comment:
   The exception message: "addWatch()" -> "watchers()"
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 351572)
Time Spent: 5.5h  (was: 5h 20m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 4.3.0
>
>  Time Spent: 5.5h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2019-11-30 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=351555&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-351555
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 30/Nov/19 19:42
Start Date: 30/Nov/19 19:42
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #334: [CURATOR-549] 
Support ZooKeeper 3.5.6 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334#discussion_r352300966
 
 

 ##
 File path: 
curator-x-async/src/main/java/org/apache/curator/x/async/api/AsyncCuratorFrameworkDsl.java
 ##
 @@ -112,4 +112,11 @@
  * @return builder object
  */
 AsyncRemoveWatchesBuilder removeWatches();
+
+/**
+ * Start an add watch builder
+ *
 
 Review comment:
   Consider adding something like: supported only when ZooKeeper client of 
version 3.6 or above is used, throws IllegalStateException for ZooKeeper client 
3.5 or below
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 351555)
Time Spent: 5h 20m  (was: 5h 10m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 4.3.0
>
>  Time Spent: 5h 20m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2019-11-30 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=351543&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-351543
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 30/Nov/19 17:39
Start Date: 30/Nov/19 17:39
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #334: [CURATOR-549] 
Support ZooKeeper 3.5.6 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334#discussion_r352295752
 
 

 ##
 File path: 
curator-framework/src/main/java/org/apache/curator/framework/api/AddWatchBuilder.java
 ##
 @@ -0,0 +1,32 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.curator.framework.api;
+
+import org.apache.zookeeper.AddWatchMode;
+
+public interface AddWatchBuilder extends AddWatchBuilder2
 
 Review comment:
   Why do we need AddWatchBuilder2 and AddWatchBuilder separated? Why not merge 
them into one interface? Did you want to clean AddWatchBuilder from the parent 
interfaces?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 351543)
Time Spent: 5h 10m  (was: 5h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 4.3.0
>
>  Time Spent: 5h 10m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2019-11-12 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=341995&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-341995
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 12/Nov/19 15:59
Start Date: 12/Nov/19 15:59
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #338: [CURATOR-549] 
Prep for Persistent Watchers by moving to ZK 3.6.0
URL: https://github.com/apache/curator/pull/338
 
 
   ### 3.6.0 has many changes
   
   ZooKeeper 3.6.0 has some significant changes from previous versions and this 
PR is only bringing Curator up to date. Some of these changes are:
   
   - The reconfig APIs have moved into a new class, `ZooKeeperAdmin`. This 
class existed in 3.5.x but wasn't required. Now it is. 
   - `DefaultZookeeperFactory` now checks `Compatibility.hasZooKeeperAdmin()` 
and creates a `ZooKeeperAdmin` if it's available
   - A bunch of little things changed in the ZK server code which affected 
Curator's test classes. I moved it all into reflection based calls in 
`Compatibility.java` in the test module. We now have modules that test ZK 3.4, 
3.5 and 3.6 so we're safe with compatibility.
   - ZooKeeper's `MultiTransactionRecord` has been removed it seems. That 
forced `CuratorMultiTransactionRecord` to be re-written. It's not a public 
class so hopefully it won't affect anyone.
   
   ### New module
   
   There is a new module, `curator-test-zk35`. It forces ZooKeeper 3.5.6 and 
performs selected tests from the other modules to ensure compatibility. Tests 
annotated with TestNG groups `zk35` and `zk35Compatibility` are tested. Group 
`zk36` is excluded. Note: these tests will only run from Maven. I don't think 
IntelliJ/Eclipse support the Maven syntax I used.
   
   ### 3 More PRs coming
   
   I have 3 more PRs that will be separate from this to avoid too much review 
pain:
   
   - #334
   - #335 
   - #336
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 341995)
Time Spent: 5h  (was: 4h 50m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 4.3.0
>
>  Time Spent: 5h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2019-11-12 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=341994&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-341994
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 12/Nov/19 15:59
Start Date: 12/Nov/19 15:59
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #334: [CURATOR-549] 
Support ZooKeeper 3.5.6 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334
 
 
   Note: this is based off #338 
   
   See: https://github.com/apache/zookeeper/pull/1106
   
   Support persistent watchers in ZK 3.6+ while maintaining background 
compatability with previous versions of ZK. Adds Curator Framework DSL calls to 
ZooKeeper's `addWatch()` method. Subsequent PRs will add recipes. Both the 
older Framework and the async Framework now have methods to add persistent 
watchers.
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 341994)
Time Spent: 4h 50m  (was: 4h 40m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 4.3.0
>
>  Time Spent: 4h 50m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2019-11-12 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=341990&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-341990
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 12/Nov/19 15:54
Start Date: 12/Nov/19 15:54
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #338: [CURATOR-549] 
Prep for Persistent Watchers by moving to ZK 3.6.0
URL: https://github.com/apache/curator/pull/338
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 341990)
Time Spent: 4.5h  (was: 4h 20m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 4.3.0
>
>  Time Spent: 4.5h
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2019-11-12 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=341991&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-341991
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 12/Nov/19 15:54
Start Date: 12/Nov/19 15:54
Worklog Time Spent: 10m 
  Work Description: shayshim commented on pull request #334: [CURATOR-549] 
Support ZooKeeper 3.5.6 Persistent Recursive Watchers
URL: https://github.com/apache/curator/pull/334
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 341991)
Time Spent: 4h 40m  (was: 4.5h)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 4.3.0
>
>  Time Spent: 4h 40m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (CURATOR-549) ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add Curator support

2019-11-12 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CURATOR-549?focusedWorklogId=341948&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-341948
 ]

ASF GitHub Bot logged work on CURATOR-549:
--

Author: ASF GitHub Bot
Created on: 12/Nov/19 14:36
Start Date: 12/Nov/19 14:36
Worklog Time Spent: 10m 
  Work Description: Randgalt commented on pull request #338: [CURATOR-549] 
Prep for Persistent Watchers by moving to ZK 3.6.0
URL: https://github.com/apache/curator/pull/338#discussion_r345240331
 
 

 ##
 File path: curator-test-zk34/pom.xml
 ##
 @@ -160,7 +160,7 @@
 
org.apache.curator:curator-framework
 
 Review comment:
   It's not tested for zk34 compatibility. We don't make any guarantees that 
that module works with zk 3.4
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 341948)
Time Spent: 4h 20m  (was: 4h 10m)

> ZooKeeper 3.6 will add support for Persistent Recursive Watchers - Add 
> Curator support
> --
>
> Key: CURATOR-549
> URL: https://issues.apache.org/jira/browse/CURATOR-549
> Project: Apache Curator
>  Issue Type: Improvement
>  Components: Client, Documentation, Framework, Recipes, Tests
>Affects Versions: 4.2.0
>Reporter: Jordan Zimmerman
>Assignee: Jordan Zimmerman
>Priority: Major
> Fix For: 4.3.0
>
>  Time Spent: 4h 20m
>  Remaining Estimate: 0h
>
> ZOOKEEPER-1416 will add support for Persistent Recursive Watchers. This 
> feature allows Curator to re-think/re-write the various cache recipes so that 
> they're simpler, use less resources and more stable.
> * Change Curator to depend on ZooKeeper 3.6.x
> * Add a new module so that backward compatibility with 3.5 is ensured
> * Add new methods corresponding to {{ZooKeeper.addWatch()}}
> * Add a new recipe that enables a fully managed Persistent watch
> * Create new Cache recipes that use the new Persistent watch recipe
> * Replace internal usages of TreeCache/PathChildrenCache/NodeCache with new 
> cache recipe
> * Deprecate TreeCache/PathChildrenCache/NodeCache
> * Updated docs/tests/etc



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


  1   2   >