diff --git a/bin/pyspark b/bin/pyspark index 10454375c6cdb..9e1364e44c8c4 100755 --- a/bin/pyspark +++ b/bin/pyspark @@ -25,7 +25,7 @@ export SPARK_HOME="$FWDIR" SCALA_VERSION=2.10 -if [[ "$@" = *--help ]] || [[ "$@" = *--h ]]; then +if [[ "$@" = *--help ]] || [[ "$@" = *-h ]]; then echo "Usage: ./bin/pyspark [options]" ./bin/spark-submit --help 2>&1 | grep -v Usage 1>&2 exit 0 diff --git a/bin/spark-shell b/bin/spark-shell index 36129a552852f..c158683ab3f99 100755 --- a/bin/spark-shell +++ b/bin/spark-shell @@ -28,7 +28,7 @@ esac # Enter posix mode for bash set -o posix -if [[ "$@" = *--help ]] || [[ "$@" = *--h ]]; then +if [[ "$@" = *--help ]] || [[ "$@" = *-h ]]; then echo "Usage: ./bin/spark-shell [options]" ./bin/spark-submit --help 2>&1 | grep -v Usage 1>&2 exit 0 diff --git a/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala b/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala index 04245223330e4..a99b2176e2b5e 100644 --- a/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala +++ b/core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala @@ -334,11 +334,10 @@ object SparkSubmit { * no files, into a single comma-separated string. */ private[spark] def mergeFileLists(lists: String*): String = { - lists - .filter(_ != null) - .filter(_ != "") - .flatMap(_.split(",")) - .mkString(",") + val merged = lists.filter(_ != null) + .flatMap(_.split(",")) + .mkString(",") + if (merged == "") null else merged } }