Skip to content

Commit ded6796

Browse files
sarutakpwendell
authored andcommitted
[SPARK-3192] Some scripts have 2 space indentation but other scripts have 4 space indentation.
Author: Kousuke Saruta <[email protected]> Closes apache#2104 from sarutak/SPARK-3192 and squashes the following commits: db78419 [Kousuke Saruta] Modified indentation of spark-shell
1 parent 8861cdf commit ded6796

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

bin/spark-shell

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
cygwin=false
2424
case "`uname`" in
25-
CYGWIN*) cygwin=true;;
25+
CYGWIN*) cygwin=true;;
2626
esac
2727

2828
# Enter posix mode for bash
@@ -32,9 +32,9 @@ set -o posix
3232
FWDIR="$(cd `dirname $0`/..; pwd)"
3333

3434
function usage() {
35-
echo "Usage: ./bin/spark-shell [options]"
36-
$FWDIR/bin/spark-submit --help 2>&1 | grep -v Usage 1>&2
37-
exit 0
35+
echo "Usage: ./bin/spark-shell [options]"
36+
$FWDIR/bin/spark-submit --help 2>&1 | grep -v Usage 1>&2
37+
exit 0
3838
}
3939

4040
if [[ "$@" = *--help ]] || [[ "$@" = *-h ]]; then
@@ -46,20 +46,20 @@ SUBMIT_USAGE_FUNCTION=usage
4646
gatherSparkSubmitOpts "$@"
4747

4848
function main() {
49-
if $cygwin; then
50-
# Workaround for issue involving JLine and Cygwin
51-
# (see http://sourceforge.net/p/jline/bugs/40/).
52-
# If you're using the Mintty terminal emulator in Cygwin, may need to set the
53-
# "Backspace sends ^H" setting in "Keys" section of the Mintty options
54-
# (see https://github.com/sbt/sbt/issues/562).
55-
stty -icanon min 1 -echo > /dev/null 2>&1
56-
export SPARK_SUBMIT_OPTS="$SPARK_SUBMIT_OPTS -Djline.terminal=unix"
57-
$FWDIR/bin/spark-submit --class org.apache.spark.repl.Main "${SUBMISSION_OPTS[@]}" spark-shell "${APPLICATION_OPTS[@]}"
58-
stty icanon echo > /dev/null 2>&1
59-
else
60-
export SPARK_SUBMIT_OPTS
61-
$FWDIR/bin/spark-submit --class org.apache.spark.repl.Main "${SUBMISSION_OPTS[@]}" spark-shell "${APPLICATION_OPTS[@]}"
62-
fi
49+
if $cygwin; then
50+
# Workaround for issue involving JLine and Cygwin
51+
# (see http://sourceforge.net/p/jline/bugs/40/).
52+
# If you're using the Mintty terminal emulator in Cygwin, may need to set the
53+
# "Backspace sends ^H" setting in "Keys" section of the Mintty options
54+
# (see https://github.com/sbt/sbt/issues/562).
55+
stty -icanon min 1 -echo > /dev/null 2>&1
56+
export SPARK_SUBMIT_OPTS="$SPARK_SUBMIT_OPTS -Djline.terminal=unix"
57+
$FWDIR/bin/spark-submit --class org.apache.spark.repl.Main "${SUBMISSION_OPTS[@]}" spark-shell "${APPLICATION_OPTS[@]}"
58+
stty icanon echo > /dev/null 2>&1
59+
else
60+
export SPARK_SUBMIT_OPTS
61+
$FWDIR/bin/spark-submit --class org.apache.spark.repl.Main "${SUBMISSION_OPTS[@]}" spark-shell "${APPLICATION_OPTS[@]}"
62+
fi
6363
}
6464

6565
# Copy restore-TTY-on-exit functions from Scala script so spark-shell exits properly even in

0 commit comments

Comments
 (0)