spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From foxish <...@git.apache.org>
Subject [GitHub] spark pull request #20154: [SPARK-22960][k8s] Make build-push-docker-images....
Date Thu, 04 Jan 2018 18:35:52 GMT
Github user foxish commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20154#discussion_r159724221
  
    --- Diff: sbin/build-push-docker-images.sh ---
    @@ -19,51 +19,118 @@
     # This script builds and pushes docker images when run from a release of Spark
     # with Kubernetes support.
     
    -declare -A path=( [spark-driver]=kubernetes/dockerfiles/driver/Dockerfile \
    -                  [spark-executor]=kubernetes/dockerfiles/executor/Dockerfile \
    -                  [spark-init]=kubernetes/dockerfiles/init-container/Dockerfile )
    +function error {
    +  echo "$@" 1>&2
    +  exit 1
    +}
    +
    +# Detect whether this is a git clone or a Spark distribution and adjust paths
    +# accordingly.
    +if [ -z "${SPARK_HOME}" ]; then
    +  SPARK_HOME="$(cd "`dirname "$0"`"/..; pwd)"
    +fi
    +. "${SPARK_HOME}/bin/load-spark-env.sh"
    +
    +if [ -f "$SPARK_HOME/RELEASE" ]; then
    +  IMG_PATH="kubernetes/dockerfiles"
    +  SPARK_JARS="jars"
    +else
    +  IMG_PATH="resource-managers/kubernetes/docker/src/main/dockerfiles"
    +  SPARK_JARS="assembly/target/scala-$SPARK_SCALA_VERSION/jars"
    +fi
    +
    +if [ ! -d "$IMG_PATH" ]; then
    +  error "Cannot find docker images. This script must be run from a runnable distribution
of Apache Spark."
    --- End diff --
    
    SGTM


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message