Skip to content

Commit d3e36e0

Browse files
committed
EZAF-6347: Avoid using custom spark-env.sh and sprk-defaults.conf in PKD (apache#1218)
1 parent 25a8409 commit d3e36e0

File tree

1 file changed

+18
-1
lines changed
  • resource-managers/kubernetes/docker/src/main/dockerfiles/spark

1 file changed

+18
-1
lines changed

resource-managers/kubernetes/docker/src/main/dockerfiles/spark/entrypoint.sh

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,23 @@
1919
# echo commands to the terminal output
2020
set -ex
2121

22+
if [ -f "/tmp/usersecret/CLUSTER_NAME" ]; then
23+
echo "DF env detected. Starting DF configuration"
24+
# common configuration
25+
source "$MAPR_HOME"/kubernetes/common.sh
26+
27+
READY_FLAG=$MAPR_KUBERNETES/ready
28+
CURRENT_FILE="entrypoint.sh"
29+
COMPONENT_NAME="SPARK DRIVER/EXECUTOR"
30+
cleanup_ready
31+
prologue $COMPONENT_NAME
32+
wait
33+
client_init spark
34+
echo "DF configuration complete"
35+
else
36+
echo "Not in DF env. Skipping DF configuration"
37+
fi
38+
2239
# Check whether there is a passwd entry for the container UID
2340
myuid=$(id -u)
2441
mygid=$(id -g)
@@ -115,4 +132,4 @@ case "$1" in
115132
esac
116133

117134
# Execute the container CMD under tini for better hygiene
118-
exec /usr/bin/tini -s -- "${CMD[@]}"
135+
exec /tini -s -- "${CMD[@]}"

0 commit comments

Comments
 (0)