You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by Vivek Madani <vi...@gmail.com> on 2014/10/16 08:01:07 UTC
Wildcard/regex support for ZK Client
Hi,
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? If so, I can open up a
Jira, start a discussion on this and work on submitting a patch.
-Vivek