[ https://issues.apache.org/jira/browse/ZOOKEEPER-616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12789475#action_12789475 ]
Patrick Hunt commented on ZOOKEEPER-616: ---------------------------------------- Actually this is very well documented in the current release docs: http://hadoop.apache.org/zookeeper/docs/current/zookeeperProgrammers.html#Sequence+Nodes+--+Unique+Naming "When creating a znode you can also request that ZooKeeper append a monotonicly increasing counter to the end of path. This counter is unique to the parent znode. The counter has a format of %010d -- that is 10 digits with 0 (zero) padding (the counter is formatted in this way to simplify sorting), i.e. "<path>0000000001"." However this does sound like a reasonable request to me. Where should we put it though? Stick it into ZooKeeper class, or in some new ZooKeeperUtils class? (both don't seem optimal) As we don't have a "ZNode" class on the client (Stat is probably the closest) there's no obvious place to put it afaict. > Provide a function to parse out the name and the sequence number from a > zknode path > ----------------------------------------------------------------------------------- > > Key: ZOOKEEPER-616 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-616 > Project: Zookeeper > Issue Type: New Feature > Components: c client, java client > Affects Versions: 3.0.0, 3.0.1, 3.1.0, 3.1.1, 3.2.0, 3.2.1 > Reporter: Avery Ching > Priority: Minor > Fix For: 3.3.0 > > > Given a zookeeper path and knowing it was created with the SEQUENCE flag, it > would be nice to be able to get the sequence number and the name. Currently, > it is not documented how many bytes the sequence number uses in the path > (Mahadev told me 10 for 3.1.1 for example), and having a function to retrieve > this data would hide the actual number of bytes used and provide the useful > functionality for users. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.