rabashizade commented on code in PR #2090:
URL: https://github.com/apache/helix/pull/2090#discussion_r875283556
##########
zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/ZkClient.java:
##########
@@ -438,6 +438,41 @@ public void createPersistent(String path)
createPersistent(path, false);
}
+ /**
+ * Create a persistent node with TTL.
+ * @param path the path where you want the node to be created
+ * @param ttl TTL of the node in milliseconds
+ * @throws ZkInterruptedException
+ * if operation was interrupted, or a required reconnection got
interrupted
+ * @throws IllegalArgumentException
+ * if called from anything except the ZooKeeper event thread
+ * @throws ZkException
+ * if any ZooKeeper exception occurred
+ * @throws RuntimeException
+ * if any other exception occurs
+ */
+ public void createPersistentWithTTL(String path, long ttl)
Review Comment:
I see your point now. for the createParents version, I think it doesn't make
sense for sequential mode because the path is altered, and wouldn't be clear
what the complete path of the ZNode will be at the end. For the other API you
asked about, I think the data argument can be set to null to achieve the same
behavior. I tried to be consistent with the existing API, so I only added new
methods that correspond to existing ones.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]