Skip to content

Commit 9ba37e2

Browse files
committed
Don't barf when the properties file does not exist
1 parent 8867a09 commit 9ba37e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/spark-submit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export SPARK_SUBMIT_PROPERTIES_FILE=${SPARK_SUBMIT_PROPERTIES_FILE:-"$DEFAULT_PR
4848
# paths, library paths, java options and memory early on. Otherwise, it will
4949
# be too late by the time the JVM has started.
5050

51-
if [ "$SPARK_SUBMIT_DEPLOY_MODE" == "client" ]; then
51+
if [[ "$SPARK_SUBMIT_DEPLOY_MODE" == "client" && -f "$SPARK_SUBMIT_PROPERTIES_FILE" ]]; then
5252
# Parse the properties file only if the special configs exist
5353
contains_special_configs=$(
5454
grep -e "spark.driver.extra*\|spark.driver.memory" "$SPARK_SUBMIT_PROPERTIES_FILE" | \

0 commit comments

Comments
 (0)