Skip to content

Commit bfe144e

Browse files
slfan1989carsonwang
authored andcommitted
Resolve Driver Host Recognition Issue in RayDP Executor. (#424)
1 parent b13dffc commit bfe144e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

bin/raydp-submit

+8
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ fi
4444
if [ -z "${RAY_HOME}" ]; then
4545
RAY_HOME=$(python3 -c "import os, ray; print(os.path.dirname(ray.__file__))")
4646
fi
47+
# set RAY_DRIVER_NODE_IP
48+
if [ -z "${RAY_DRIVER_NODE_IP}" ]; then
49+
RAY_DRIVER_NODE_IP=$(python3 -c "import ray; print(ray.util.get_node_ip_address())")
50+
fi
4751

4852

4953
# set log4j versions for spark driver and executors inside ray worker
@@ -115,6 +119,10 @@ added_confs+=("-D$SPARK_LOG4J_CONFIG_FILE_NAME_KEY=$SPARK_LOG4J_CONFIG_FILE_NAME
115119
added_confs+=("-Dspark.javaagent=$raydp_agent_jar")
116120
added_args+=("--conf")
117121
added_args+=("spark.ray.log4j.config.file.name=$RAY_LOG4J_CONFIG_FILE_NAME")
122+
added_args+=("--conf")
123+
added_args+=("spark.driver.host=$RAY_DRIVER_NODE_IP")
124+
added_args+=("--conf")
125+
added_args+=("spark.driver.bindAddress=$RAY_DRIVER_NODE_IP")
118126

119127
# Find the java binary
120128
if [ -n "${JAVA_HOME}" ]; then

0 commit comments

Comments
 (0)