1
Workaround:
no Jedis Jed .=NewJedis ("192.168.56.101"); Jed.set (key,value); set<HostAndPort> jedisclusternodes =NewHashset(); //Jedis Cluster would attempt to discover Cluster nodes automaticallyJedisclusternodes.add (NewHostandport ("192.168.56.101", 6379)); Jedisclusternodes.add (NewHostandport ("192.168.56.101", 6380)); Jedisclusternodes.add (NewHostandport ("192.168.56.101", 6381)); Jediscluster JC=NewJediscluster (jedisclusternodes); Jc.set (key,value);
2
Exception in thread "main" Redis.clients.jedis.exceptions.JedisClusterMaxRedirectionsException:Too many Cluster Redirections?
At Redis.clients.jedis.JedisClusterCommand.runWithRetries (jedisclustercommand.java:39)
At Redis.clients.jedis.JedisClusterCommand.runWithRetries (jedisclustercommand.java:87)
At Redis.clients.jedis.JedisClusterCommand.runWithRetries (jedisclustercommand.java:72)
At Redis.clients.jedis.JedisClusterCommand.runWithRetries (jedisclustercommand.java:87)
At Redis.clients.jedis.JedisClusterCommand.runWithRetries (jedisclustercommand.java:72)
At Redis.clients.jedis.JedisClusterCommand.runWithRetries (jedisclustercommand.java:87)
At Redis.clients.jedis.JedisClusterCommand.runWithRetries (jedisclustercommand.java:72)
At Redis.clients.jedis.JedisClusterCommand.runWithRetries (jedisclustercommand.java:87)
At Redis.clients.jedis.JedisClusterCommand.runWithRetries (jedisclustercommand.java:72)
At Redis.clients.jedis.JedisClusterCommand.runWithRetries (jedisclustercommand.java:87)
At Redis.clients.jedis.JedisClusterCommand.runWithRetries (jedisclustercommand.java:72)
At Redis.clients.jedis.JedisClusterCommand.run (jedisclustercommand.java:33)
At Redis.clients.jedis.JedisCluster.set (jediscluster.java:44)
At RedisTest.MysqlToRedis.main (mysqltoredis.java:76)
Workaround: The value of the key that should be saved and the key in Redis that has too many duplicates of the appropriate flush Redis
A Redis cluster error occurred