mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 00:29:38 +08:00
[Java] Simplify Ray.init() by invoking ray start internally (#10762)
This commit is contained in:
@@ -279,7 +279,8 @@ def get_address_info_from_redis_helper(redis_address,
|
||||
def get_address_info_from_redis(redis_address,
|
||||
node_ip_address,
|
||||
num_retries=5,
|
||||
redis_password=None):
|
||||
redis_password=None,
|
||||
no_warning=False):
|
||||
counter = 0
|
||||
while True:
|
||||
try:
|
||||
@@ -290,10 +291,11 @@ def get_address_info_from_redis(redis_address,
|
||||
raise
|
||||
# Some of the information may not be in Redis yet, so wait a little
|
||||
# bit.
|
||||
logger.warning(
|
||||
"Some processes that the driver needs to connect to have "
|
||||
"not registered with Redis, so retrying. Have you run "
|
||||
"'ray start' on this node?")
|
||||
if not no_warning:
|
||||
logger.warning(
|
||||
"Some processes that the driver needs to connect to have "
|
||||
"not registered with Redis, so retrying. Have you run "
|
||||
"'ray start' on this node?")
|
||||
time.sleep(1)
|
||||
counter += 1
|
||||
|
||||
|
||||
@@ -537,6 +537,8 @@ def start(node_ip_address, address, port, redis_password, redis_shard_ports,
|
||||
with cli_logger.group("Next steps"):
|
||||
cli_logger.print(
|
||||
"To connect to this Ray runtime from another node, run")
|
||||
# NOTE(kfstorm): Java driver rely on this line to get the address
|
||||
# of the cluster. Please be careful when updating this line.
|
||||
cli_logger.print(
|
||||
cf.bold(" ray start --address='{}'{}"), redis_address,
|
||||
f" --redis-password='{redis_password}'"
|
||||
|
||||
Reference in New Issue
Block a user