Description
Steps to reproduce:
1. Initialise an instance of PersistentNode
2. Ensure that CuratorFramework is Not Started (Latent)
Expected behaviour:
PersistentNode constructor should work without an active CuratorFramework connection to ZK
Actual behaviour:
An Exception is thrown:
Caused by: java.lang.IllegalStateException: instance must be started before calling this methodDEBUG [2016-12-14 10:25:25,641] akka.event.EventStream: logger log1-Slf4jLogger started
at com.google.common.base.Preconditions.checkState(Preconditions.java:150)
at org.apache.curator.framework.imps.CuratorFrameworkImpl.create(CuratorFrameworkImpl.java:351)
at org.apache.curator.framework.recipes.nodes.PersistentNode.<init>(PersistentNode.java:173)
Thoughts
This behaviour is inconsistent with other Zk recepies based on Closable interface. PersistentNode should not attempt any Zk communication until start() method is called.
Attachments
Issue Links
- links to