mirror of
https://github.com/wassname/ray.git
synced 2026-07-10 12:06:43 +08:00
[Java] Enable GCS server when running java unit tests (#7041)
* enable gcs service when run java testcase * fix ci bug * fix windows compile bug * fix ci bug * restart ci job * enable java testcase * restart ci job * restart ci job * add debug log * add debug log * restart ci job * add debug log * restart ci * add debug log * fix java testcase bug * restart ci job * restart ci job * restart ci job * restart ci job * restart ci job * restart ci job * restart ci job * restart ci job
This commit is contained in:
@@ -55,6 +55,8 @@ RAYLET_MONITOR_EXECUTABLE = os.path.join(
|
||||
"core/src/ray/raylet/raylet_monitor")
|
||||
RAYLET_EXECUTABLE = os.path.join(
|
||||
os.path.abspath(os.path.dirname(__file__)), "core/src/ray/raylet/raylet")
|
||||
GCS_SERVER_EXECUTABLE = os.path.join(
|
||||
os.path.abspath(os.path.dirname(__file__)), "core/src/ray/gcs/gcs_server")
|
||||
|
||||
DEFAULT_JAVA_WORKER_OPTIONS = "-classpath {}".format(
|
||||
os.path.join(
|
||||
@@ -1083,6 +1085,44 @@ def start_dashboard(require_webui,
|
||||
return None, None
|
||||
|
||||
|
||||
def start_gcs_server(redis_address,
|
||||
stdout_file=None,
|
||||
stderr_file=None,
|
||||
redis_password=None,
|
||||
config=None):
|
||||
"""Start a gcs server.
|
||||
Args:
|
||||
redis_address (str): The address that the Redis server is listening on.
|
||||
stdout_file: A file handle opened for writing to redirect stdout to. If
|
||||
no redirection should happen, then this should be None.
|
||||
stderr_file: A file handle opened for writing to redirect stderr to. If
|
||||
no redirection should happen, then this should be None.
|
||||
redis_password (str): The password of the redis server.
|
||||
config (dict|None): Optional configuration that will
|
||||
override defaults in RayConfig.
|
||||
Returns:
|
||||
ProcessInfo for the process that was started.
|
||||
"""
|
||||
gcs_ip_address, gcs_port = redis_address.split(":")
|
||||
redis_password = redis_password or ""
|
||||
config = config or {}
|
||||
config_str = ",".join(["{},{}".format(*kv) for kv in config.items()])
|
||||
command = [
|
||||
GCS_SERVER_EXECUTABLE,
|
||||
"--redis_address={}".format(gcs_ip_address),
|
||||
"--redis_port={}".format(gcs_port),
|
||||
"--config_list={}".format(config_str),
|
||||
]
|
||||
if redis_password:
|
||||
command += ["--redis_password={}".format(redis_password)]
|
||||
process_info = start_ray_process(
|
||||
command,
|
||||
ray_constants.PROCESS_TYPE_GCS_SERVER,
|
||||
stdout_file=stdout_file,
|
||||
stderr_file=stderr_file)
|
||||
return process_info
|
||||
|
||||
|
||||
def start_raylet(redis_address,
|
||||
node_ip_address,
|
||||
node_manager_port,
|
||||
|
||||
Reference in New Issue
Block a user