This commit is contained in:
Si-Yuan
2019-02-14 09:22:45 +08:00
committed by Philipp Moritz
parent 2dccf383dd
commit 2de31eb489
3 changed files with 14 additions and 21 deletions
+4 -3
View File
@@ -501,9 +501,10 @@ def start_redis(node_ip_address,
started.
"""
assert len(redirect_files) == 1 + num_redis_shards, (
"The number of redirect file pairs should be equal to the number of"
"redis shards (including the primary shard) we will start.")
if len(redirect_files) != 1 + num_redis_shards:
raise ValueError("The number of redirect file pairs should be equal "
"to the number of redis shards (including the "
"primary shard) we will start.")
if redis_shard_ports is None:
redis_shard_ports = num_redis_shards * [None]
elif len(redis_shard_ports) != num_redis_shards: