[Java] Add the default redis password for Java (#6528)

This commit is contained in:
Kai Yang
2019-12-19 10:53:53 +08:00
committed by Hao Chen
parent 012c0ca7dc
commit 03c37c7825
2 changed files with 4 additions and 3 deletions
@@ -48,7 +48,7 @@ public class GcsClient {
List<byte[]> shardAddresses = primary.lrange("RedisShards".getBytes(), 0, -1);
Preconditions.checkState(shardAddresses.size() == numShards);
shards = shardAddresses.stream().map((byte[] address) -> {
return new RedisClient(new String(address));
return new RedisClient(new String(address), redisPassword);
}).collect(Collectors.toList());
}
@@ -59,10 +59,11 @@ ray {
address: ""
// If `redis.server` isn't provided, which port we should use to start redis server.
head-port: 6379
// Below passwords should be consistent with the one defined in python/ray/ray_constants.py.
// The password used to start the redis server on the head node.
head-password: ""
head-password: "5241590000000000"
// The password used to connect to the redis server.
password:""
password: "5241590000000000"
// If `redis.server` isn't provided, how many Redis shards we should start in addition to the
// primary Redis shard. The ports of these shards will be `head-port + 1`, `head-port + 2`, etc.
shard-number: 1