aboutsummaryrefslogtreecommitdiff
path: root/bin/spark-shell
diff options
context:
space:
mode:
authorKousuke Saruta <sarutak@oss.nttdata.co.jp>2014-08-24 09:43:44 -0700
committerPatrick Wendell <pwendell@gmail.com>2014-08-24 09:43:44 -0700
commitded6796bf54f5c005b27135d7dec19634038a1c6 (patch)
tree86df87954acf79555997230bf0723eb90c82f2c8 /bin/spark-shell
parent8861cdf11288f7597809e9e0e1cad66fb85dd946 (diff)
downloadspark-ded6796bf54f5c005b27135d7dec19634038a1c6.tar.gz
spark-ded6796bf54f5c005b27135d7dec19634038a1c6.tar.bz2
spark-ded6796bf54f5c005b27135d7dec19634038a1c6.zip
[SPARK-3192] Some scripts have 2 space indentation but other scripts have 4 space indentation.
Author: Kousuke Saruta <sarutak@oss.nttdata.co.jp> Closes #2104 from sarutak/SPARK-3192 and squashes the following commits: db78419 [Kousuke Saruta] Modified indentation of spark-shell
Diffstat (limited to 'bin/spark-shell')
-rwxr-xr-xbin/spark-shell36
1 files changed, 18 insertions, 18 deletions
diff --git a/bin/spark-shell b/bin/spark-shell
index 8b7ccd7439..0ab4e14f5b 100755
--- a/bin/spark-shell
+++ b/bin/spark-shell
@@ -22,7 +22,7 @@
cygwin=false
case "`uname`" in
- CYGWIN*) cygwin=true;;
+ CYGWIN*) cygwin=true;;
esac
# Enter posix mode for bash
@@ -32,9 +32,9 @@ set -o posix
FWDIR="$(cd `dirname $0`/..; pwd)"
function usage() {
- echo "Usage: ./bin/spark-shell [options]"
- $FWDIR/bin/spark-submit --help 2>&1 | grep -v Usage 1>&2
- exit 0
+ echo "Usage: ./bin/spark-shell [options]"
+ $FWDIR/bin/spark-submit --help 2>&1 | grep -v Usage 1>&2
+ exit 0
}
if [[ "$@" = *--help ]] || [[ "$@" = *-h ]]; then
@@ -46,20 +46,20 @@ SUBMIT_USAGE_FUNCTION=usage
gatherSparkSubmitOpts "$@"
function main() {
- if $cygwin; then
- # Workaround for issue involving JLine and Cygwin
- # (see http://sourceforge.net/p/jline/bugs/40/).
- # If you're using the Mintty terminal emulator in Cygwin, may need to set the
- # "Backspace sends ^H" setting in "Keys" section of the Mintty options
- # (see https://github.com/sbt/sbt/issues/562).
- stty -icanon min 1 -echo > /dev/null 2>&1
- export SPARK_SUBMIT_OPTS="$SPARK_SUBMIT_OPTS -Djline.terminal=unix"
- $FWDIR/bin/spark-submit --class org.apache.spark.repl.Main "${SUBMISSION_OPTS[@]}" spark-shell "${APPLICATION_OPTS[@]}"
- stty icanon echo > /dev/null 2>&1
- else
- export SPARK_SUBMIT_OPTS
- $FWDIR/bin/spark-submit --class org.apache.spark.repl.Main "${SUBMISSION_OPTS[@]}" spark-shell "${APPLICATION_OPTS[@]}"
- fi
+ if $cygwin; then
+ # Workaround for issue involving JLine and Cygwin
+ # (see http://sourceforge.net/p/jline/bugs/40/).
+ # If you're using the Mintty terminal emulator in Cygwin, may need to set the
+ # "Backspace sends ^H" setting in "Keys" section of the Mintty options
+ # (see https://github.com/sbt/sbt/issues/562).
+ stty -icanon min 1 -echo > /dev/null 2>&1
+ export SPARK_SUBMIT_OPTS="$SPARK_SUBMIT_OPTS -Djline.terminal=unix"
+ $FWDIR/bin/spark-submit --class org.apache.spark.repl.Main "${SUBMISSION_OPTS[@]}" spark-shell "${APPLICATION_OPTS[@]}"
+ stty icanon echo > /dev/null 2>&1
+ else
+ export SPARK_SUBMIT_OPTS
+ $FWDIR/bin/spark-submit --class org.apache.spark.repl.Main "${SUBMISSION_OPTS[@]}" spark-shell "${APPLICATION_OPTS[@]}"
+ fi
}
# Copy restore-TTY-on-exit functions from Scala script so spark-shell exits properly even in