Skip to content
Snippets Groups Projects
Commit ded6796b authored by Kousuke Saruta's avatar Kousuke Saruta Committed by Patrick Wendell
Browse files

[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
parent 8861cdf1
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
cygwin=false cygwin=false
case "`uname`" in case "`uname`" in
CYGWIN*) cygwin=true;; CYGWIN*) cygwin=true;;
esac esac
# Enter posix mode for bash # Enter posix mode for bash
...@@ -32,9 +32,9 @@ set -o posix ...@@ -32,9 +32,9 @@ set -o posix
FWDIR="$(cd `dirname $0`/..; pwd)" FWDIR="$(cd `dirname $0`/..; pwd)"
function usage() { function usage() {
echo "Usage: ./bin/spark-shell [options]" echo "Usage: ./bin/spark-shell [options]"
$FWDIR/bin/spark-submit --help 2>&1 | grep -v Usage 1>&2 $FWDIR/bin/spark-submit --help 2>&1 | grep -v Usage 1>&2
exit 0 exit 0
} }
if [[ "$@" = *--help ]] || [[ "$@" = *-h ]]; then if [[ "$@" = *--help ]] || [[ "$@" = *-h ]]; then
...@@ -46,20 +46,20 @@ SUBMIT_USAGE_FUNCTION=usage ...@@ -46,20 +46,20 @@ SUBMIT_USAGE_FUNCTION=usage
gatherSparkSubmitOpts "$@" gatherSparkSubmitOpts "$@"
function main() { function main() {
if $cygwin; then if $cygwin; then
# Workaround for issue involving JLine and Cygwin # Workaround for issue involving JLine and Cygwin
# (see http://sourceforge.net/p/jline/bugs/40/). # (see http://sourceforge.net/p/jline/bugs/40/).
# If you're using the Mintty terminal emulator in Cygwin, may need to set the # 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 # "Backspace sends ^H" setting in "Keys" section of the Mintty options
# (see https://github.com/sbt/sbt/issues/562). # (see https://github.com/sbt/sbt/issues/562).
stty -icanon min 1 -echo > /dev/null 2>&1 stty -icanon min 1 -echo > /dev/null 2>&1
export SPARK_SUBMIT_OPTS="$SPARK_SUBMIT_OPTS -Djline.terminal=unix" 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[@]}" $FWDIR/bin/spark-submit --class org.apache.spark.repl.Main "${SUBMISSION_OPTS[@]}" spark-shell "${APPLICATION_OPTS[@]}"
stty icanon echo > /dev/null 2>&1 stty icanon echo > /dev/null 2>&1
else else
export SPARK_SUBMIT_OPTS export SPARK_SUBMIT_OPTS
$FWDIR/bin/spark-submit --class org.apache.spark.repl.Main "${SUBMISSION_OPTS[@]}" spark-shell "${APPLICATION_OPTS[@]}" $FWDIR/bin/spark-submit --class org.apache.spark.repl.Main "${SUBMISSION_OPTS[@]}" spark-shell "${APPLICATION_OPTS[@]}"
fi fi
} }
# Copy restore-TTY-on-exit functions from Scala script so spark-shell exits properly even in # Copy restore-TTY-on-exit functions from Scala script so spark-shell exits properly even in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment