我看到vert-redis-client有很多redis集群api,但我编写代码,而不是得到结果 代码在这里
public class App {
public static void main(String[] args) {
Vertx vertx = Vertx.vertx();
RedisOptions redisOptions = new RedisOptions();
redisOptions.setAddress("***********");
redisOptions.setPort(6379);//this is redis cluster one of the nodes
RedisClient redisClient = RedisClient.create(vertx, redisOptions);
redisClient.clusterInfo(result -> {
if (result.succeeded()) {
JsonArray data = result.result();
System.out.println(data.toString());
} else {
System.out.println("fail");
}
});
}
}
the output result is "fail", why? Seeking guidance