Skip to content

Commit 24cbf40

Browse files
committed
Signed-off-by: Yikun Jiang <yikunkero@gmail.com>
1 parent 997413e commit 24cbf40

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

3.5.0/scala2.12-java11-ubuntu/entrypoint.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ elif ! [ -z "${SPARK_HOME+x}" ]; then
7777
SPARK_CLASSPATH="$SPARK_HOME/conf:$SPARK_CLASSPATH";
7878
fi
7979

80+
# SPARK-43540: add current working directory into executor classpath
81+
SPARK_CLASSPATH="$SPARK_CLASSPATH:$PWD"
82+
8083
# Switch to spark if no USER specified (root by default) otherwise use USER directly
8184
switch_spark_if_root() {
8285
if [ $(id -u) -eq 0 ]; then
@@ -90,6 +93,7 @@ case "$1" in
9093
CMD=(
9194
"$SPARK_HOME/bin/spark-submit"
9295
--conf "spark.driver.bindAddress=$SPARK_DRIVER_BIND_ADDRESS"
96+
--conf "spark.executorEnv.SPARK_DRIVER_POD_IP=$SPARK_DRIVER_BIND_ADDRESS"
9397
--deploy-mode client
9498
"$@"
9599
)

entrypoint.sh.template

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ elif ! [ -z "${SPARK_HOME+x}" ]; then
7777
SPARK_CLASSPATH="$SPARK_HOME/conf:$SPARK_CLASSPATH";
7878
fi
7979

80+
# SPARK-43540: add current working directory into executor classpath
81+
SPARK_CLASSPATH="$SPARK_CLASSPATH:$PWD"
82+
8083
# Switch to spark if no USER specified (root by default) otherwise use USER directly
8184
switch_spark_if_root() {
8285
if [ $(id -u) -eq 0 ]; then
@@ -90,6 +93,7 @@ case "$1" in
9093
CMD=(
9194
"$SPARK_HOME/bin/spark-submit"
9295
--conf "spark.driver.bindAddress=$SPARK_DRIVER_BIND_ADDRESS"
96+
--conf "spark.executorEnv.SPARK_DRIVER_POD_IP=$SPARK_DRIVER_BIND_ADDRESS"
9397
--deploy-mode client
9498
"$@"
9599
)

0 commit comments

Comments
 (0)