Support for Set<String> keys(String pattern) in JedisCluster

393 views
Skip to first unread message

sg

unread,
Feb 2, 2015, 11:43:54 PM2/2/15
to jedis...@googlegroups.com
Hi,
   Is there a plan to provide support for the

Set<String> keys(String pattern)

in the JedisCluster class. Is there any existing way in Jedis(Cluster) to get a list of keys matching a specific pattern.

Thanks
Gurmeet

Ravikanth G

unread,
Apr 30, 2015, 8:17:30 AM4/30/15
to jedis...@googlegroups.com

@sg - Did you find the answer ? I'm also looking for the same.

-Ravi

Marcos NiLs

unread,
Apr 30, 2015, 12:18:47 PM4/30/15
to jedis...@googlegroups.com
Hi, 

Redis cluster doesn't support the KEYS operation cluster wide. Whenever you're in a node in redis cluster if you issue a KEYS <pattern> it will only retrieve the keys of the current node, it won't fetch keys from other nodes. 

You can currently do this in Jedis by retrieving the nodes with the getClusterNodes method and then sending the KEYS command to the desired node. 

Marcos.
Reply all
Reply to author
Forward
0 new messages