[
https://issues.apache.org/jira/browse/ZOOKEEPER-2077?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15008093#comment-15008093
]
Raju Bairishetti commented on ZOOKEEPER-2077:
---------------------------------------------
[~vivekpm] +1 for adding this feature. I recently started using zookeeper. I
was also about to create a jira for the same feature.
It would be nice to have this feature on *ls & delete*. If we are having
multiple kafka topics info on zookeeper then it is very hard to interpreting
the current *ls* output. It would be easy to figure it out & delete all at once
if we have regex support.
> Wild-card/Regex Support for Zookeeper client commands
> -----------------------------------------------------
>
> Key: ZOOKEEPER-2077
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2077
> Project: ZooKeeper
> Issue Type: New Feature
> Components: java client
> Reporter: Vivek Madani
>
> We had an use-case where we had to list nodes matching a particular pattern
> from a given path. While looking at the ZK client commands, it seems that it
> does not support wildcard/regex.
> I did try to overcome this by making some basic changes to the LSCommand.java
> and adding a "-m" switch which accepts regex. Since I implemented this using
> java.util.regex, it supports everything that Java regex supports.
> I was thinking such functionality can be useful for 'ls' as well as 'delete'
> (and deleteall). Though I implemented this at the client code for ls - this
> can be done at the server side code as well and I have a preliminary plan on
> top of my head to do this for ls, delete, deleteall.
> Will it be worthwhile addition to make to zookeeper client? If so, I can work
> on submitting a patch.
> Points to consider in case such a support can be implemented:
> 1. Do we support Java regex or Unix Shell wildcards ( * )?
> 2. Right now, create allows creating nodes with characters like * - we need
> to make sure that such a change does not break or create confusion (Unix too
> allows creating a directory with * BTW).
> Any thoughts on whether this will be a worthwhile addition to Zookeeper
> client?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)