srmrz commented on code in PR #156:
URL: https://github.com/apache/bahir-flink/pull/156#discussion_r991500442
##########
flink-connector-redis/src/main/java/org/apache/flink/streaming/connectors/redis/common/container/RedisClusterContainer.java:
##########
@@ -46,15 +46,7 @@ public RedisClusterContainer(JedisCluster jedisCluster) {
this.jedisCluster = jedisCluster;
}
- @Override
- public void open() throws Exception {
-
- // echo() tries to open a connection and echos back the
- // message passed as argument. Here we use it to monitor
- // if we can communicate with the cluster.
-
- jedisCluster.echo("Test");
- }
+ public void open() {}
Review Comment:
@eskabetxe I see!
> I don't know if is needed
My take is that it isn't needed - the constructor takes a `JedisCluster`.
As part of the initialization of `JedisCluster` , it contacts the cluster:
https://github.com/redis/jedis/blob/379bbed0ee363bfc9f31e4591f5d46c28976cff5/src/main/java/redis/clients/jedis/UnifiedJedis.java#L105-L107
https://github.com/redis/jedis/blob/379bbed0ee363bfc9f31e4591f5d46c28976cff5/src/main/java/redis/clients/jedis/providers/ClusterConnectionProvider.java#L27
https://github.com/redis/jedis/blob/379bbed0ee363bfc9f31e4591f5d46c28976cff5/src/main/java/redis/clients/jedis/providers/ClusterConnectionProvider.java#L36-L49
That runs commands in the cluster. So if there are problems contacting the
cluster, we'll know before we even construct a `RedisClusterContainer`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]