spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nchammas <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-4924] Add a library for launching Spark...
Date Mon, 09 Mar 2015 21:46:32 GMT
Github user nchammas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3916#discussion_r26079987
  
    --- Diff: bin/spark-submit ---
    @@ -17,58 +17,18 @@
     # limitations under the License.
     #
     
    -# NOTE: Any changes in this file must be reflected in SparkSubmitDriverBootstrapper.scala!
    -
    -export SPARK_HOME="$(cd "`dirname "$0"`"/..; pwd)"
    -ORIG_ARGS=("$@")
    -
    -# Set COLUMNS for progress bar
    -export COLUMNS=`tput cols`
    -
    -while (($#)); do
    -  if [ "$1" = "--deploy-mode" ]; then
    -    SPARK_SUBMIT_DEPLOY_MODE=$2
    -  elif [ "$1" = "--properties-file" ]; then
    -    SPARK_SUBMIT_PROPERTIES_FILE=$2
    -  elif [ "$1" = "--driver-memory" ]; then
    -    export SPARK_SUBMIT_DRIVER_MEMORY=$2
    -  elif [ "$1" = "--driver-library-path" ]; then
    -    export SPARK_SUBMIT_LIBRARY_PATH=$2
    -  elif [ "$1" = "--driver-class-path" ]; then
    -    export SPARK_SUBMIT_CLASSPATH=$2
    -  elif [ "$1" = "--driver-java-options" ]; then
    -    export SPARK_SUBMIT_OPTS=$2
    -  elif [ "$1" = "--master" ]; then
    -    export MASTER=$2
    -  fi
    -  shift
    -done
    -
    -if [ -z "$SPARK_CONF_DIR" ]; then
    -  export SPARK_CONF_DIR="$SPARK_HOME/conf"
    -fi
    -DEFAULT_PROPERTIES_FILE="$SPARK_CONF_DIR/spark-defaults.conf"
    -if [ "$MASTER" == "yarn-cluster" ]; then
    -  SPARK_SUBMIT_DEPLOY_MODE=cluster
    +SPARK_HOME="$(cd "`dirname "$0"`"/..; pwd)"
    +
    +# Only define a usage function if an upstream script hasn't done so.
    +if ! type -t usage >/dev/null 2>&1; then
    +  usage() {
    +    if [ -n "$1" ]; then
    +      echo $1
    +    fi
    +    "$SPARK_HOME"/bin/spark-class org.apache.spark.deploy.SparkSubmit --help
    +    exit $2
    --- End diff --
    
    ```
    exit "$2"
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message