eskabetxe commented on a change in pull request #104:
URL: https://github.com/apache/bahir-flink/pull/104#discussion_r556403547
##########
File path:
flink-connector-redis/src/main/java/org/apache/flink/streaming/connectors/redis/common/container/RedisCommandsContainerBuilder.java
##########
@@ -66,10 +66,20 @@ public static RedisCommandsContainer
build(FlinkJedisPoolConfig jedisPoolConfig)
genericObjectPoolConfig.setMaxIdle(jedisPoolConfig.getMaxIdle());
genericObjectPoolConfig.setMaxTotal(jedisPoolConfig.getMaxTotal());
genericObjectPoolConfig.setMinIdle(jedisPoolConfig.getMinIdle());
+
genericObjectPoolConfig.setTestOnBorrow(jedisPoolConfig.getTestOnBorrow());
+
genericObjectPoolConfig.setTestOnReturn(jedisPoolConfig.getTestOnReturn());
+
+ if (jedisPoolConfig.getTestWhileIdle()) {
+ // default parameters from redis.clients.jedis.JedisPoolConfig
+ genericObjectPoolConfig.setTestWhileIdle(true);
Review comment:
it is better to create a variable in the class and have the value
defined in only 1 place...
if this value can be obtained in some way from the default values of the
library, it is better (always with the constant in the class)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]