[feat-34267][redis] redis side support ipv6.
@@ -66,7 +66,7 @@ public class RedisAsyncReqRow extends BaseAsyncReqRow {
private RedisSideTableInfo redisSideTableInfo;
- private RedisSideReqRow redisSideReqRow;
+ private final RedisSideReqRow redisSideReqRow;
public RedisAsyncReqRow(RowTypeInfo rowTypeInfo, JoinInfo joinInfo, List<FieldInfo> outFieldInfoList, AbstractSideTableInfo sideTableInfo) {
super(new RedisAsyncSideInfo(rowTypeInfo, joinInfo, outFieldInfoList, sideTableInfo));
@@ -92,7 +92,7 @@ public class RedisAsyncReqRow extends BaseAsyncReqRow {
case STANDALONE:
RedisURI redisURI = RedisURI.create("redis://" + url);
redisURI.setPassword(password);
- redisURI.setDatabase(Integer.valueOf(database));
+ redisURI.setDatabase(Integer.parseInt(database));
redisClient = RedisClient.create(redisURI);
connection = redisClient.connect();
async = connection.async();
@@ -100,7 +100,7 @@ public class RedisAsyncReqRow extends BaseAsyncReqRow {
case SENTINEL:
RedisURI redisSentinelURI = RedisURI.create("redis-sentinel://" + url);
redisSentinelURI.setPassword(password);
- redisSentinelURI.setDatabase(Integer.valueOf(database));
+ redisSentinelURI.setDatabase(Integer.parseInt(database));
redisSentinelURI.setSentinelMasterId(redisSideTableInfo.getMasterName());
redisClient = RedisClient.create(redisSentinelURI);
connection = redisClient.connect();
@@ -129,9 +129,7 @@ public class RedisAsyncReqRow extends BaseAsyncReqRow {
return;
}
RedisFuture<Map<String, String>> future = ((RedisHashAsyncCommands) async).hgetall(key);
- future.thenAccept(new Consumer<Map<String, String>>() {
- @Override
- public void accept(Map<String, String> values) {
+ future.thenAccept(values -> {
if (MapUtils.isNotEmpty(values)) {
try {
BaseRow row = fillData(input, values);
@@ -144,7 +142,6 @@ public class RedisAsyncReqRow extends BaseAsyncReqRow {
dealMissKey(input, resultFuture);
dealCacheData(key, CacheMissVal.getMissKeyObj());
}
- }
});
}
