This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 5a96ee7  [SPARK-29574][K8S][FOLLOWUP] Fix bash comparison error in 
Docker entrypoint.sh
5a96ee7 is described below

commit 5a96ee7619ea07edefd030c66641e6e473a890e0
Author: Đặng Minh Dũng <dungd...@live.com>
AuthorDate: Mon Mar 30 15:41:57 2020 -0700

    [SPARK-29574][K8S][FOLLOWUP] Fix bash comparison error in Docker 
entrypoint.sh
    
    A small change to fix an error in Docker `entrypoint.sh`
    
    When spark running on Kubernetes, I got the following logs:
    ```log
    + '[' -n ']'
    + '[' -z ']'
    ++ /bin/hadoop classpath
    /opt/entrypoint.sh: line 62: /bin/hadoop: No such file or directory
    + export SPARK_DIST_CLASSPATH=
    + SPARK_DIST_CLASSPATH=
    ```
    This is because you are missing some quotes on bash comparisons.
    
    No
    
    CI
    
    Closes #28075 from dungdm93/patch-1.
    
    Authored-by: Đặng Minh Dũng <dungd...@live.com>
    Signed-off-by: Dongjoon Hyun <dongj...@apache.org>
    (cherry picked from commit 1d0fc9aa85b3ad3326b878de49b748413dee1dd9)
    Signed-off-by: Dongjoon Hyun <dongj...@apache.org>
---
 .../kubernetes/docker/src/main/dockerfiles/spark/entrypoint.sh        | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/resource-managers/kubernetes/docker/src/main/dockerfiles/spark/entrypoint.sh 
b/resource-managers/kubernetes/docker/src/main/dockerfiles/spark/entrypoint.sh
index 6ee3523..8218c29 100755
--- 
a/resource-managers/kubernetes/docker/src/main/dockerfiles/spark/entrypoint.sh
+++ 
b/resource-managers/kubernetes/docker/src/main/dockerfiles/spark/entrypoint.sh
@@ -58,8 +58,8 @@ fi
 
 # If HADOOP_HOME is set and SPARK_DIST_CLASSPATH is not set, set it here so 
Hadoop jars are available to the executor.
 # It does not set SPARK_DIST_CLASSPATH if already set, to avoid overriding 
customizations of this value from elsewhere e.g. Docker/K8s.
-if [ -n ${HADOOP_HOME}  ] && [ -z ${SPARK_DIST_CLASSPATH}  ]; then
-  export SPARK_DIST_CLASSPATH=$($HADOOP_HOME/bin/hadoop classpath)  
+if [ -n "${HADOOP_HOME}"  ] && [ -z "${SPARK_DIST_CLASSPATH}"  ]; then
+  export SPARK_DIST_CLASSPATH="$($HADOOP_HOME/bin/hadoop classpath)"
 fi
 
 if ! [ -z ${HADOOP_CONF_DIR+x} ]; then


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to