NutzCN Logo
问答 redis cluster scan/keys
发布于 1377天前 作者 阿强 3437 次浏览 复制 上一个帖子 下一个帖子
标签:

redis cluster模式应如何通过scan扫描key
直接执行scan方法抛出异常JedisCluster only supports SCAN commands with MATCH patterns containing hash-tags ( curly-brackets enclosed strings )

度娘帖子发现jedisCluster.getClusterNodes()可以通过pool获取conn循环scan

debug模式下发现redisService.getJedis()返回值类型为JedisClusterWrapper 其中包含所需的nodes(pools)

q:如何获取pools

1 回复

getPool就是吧,不行就反射取

添加回复
请先登陆
回到顶部