Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/beeline
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
set -o posix

# Figure out where Spark is installed
FWDIR="$(cd "`dirname "$0"`"/..; pwd)"
FWDIR="$(cd $(dirname $(readlink -f $0))/..; pwd)"

CLASS="org.apache.hive.beeline.BeeLine"
exec "$FWDIR/bin/spark-class" $CLASS "$@"
2 changes: 1 addition & 1 deletion bin/pyspark
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#

# Figure out where Spark is installed
FWDIR="$(cd "`dirname "$0"`"/..; pwd)"
FWDIR="$(cd $(dirname $(readlink -f $0))/..; pwd)"

# Export this as SPARK_HOME
export SPARK_HOME="$FWDIR"
Expand Down
2 changes: 1 addition & 1 deletion bin/run-example
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

SCALA_VERSION=2.10

FWDIR="$(cd "`dirname "$0"`"/..; pwd)"
FWDIR="$(cd $(dirname $(readlink -f $0))/..; pwd)"
export SPARK_HOME="$FWDIR"
EXAMPLES_DIR="$FWDIR"/examples

Expand Down
2 changes: 1 addition & 1 deletion bin/spark-class
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ esac
SCALA_VERSION=2.10

# Figure out where Spark is installed
FWDIR="$(cd "`dirname "$0"`"/..; pwd)"
FWDIR="$(cd $(dirname $(readlink -f $0))/..; pwd)"

# Export this as SPARK_HOME
export SPARK_HOME="$FWDIR"
Expand Down
2 changes: 1 addition & 1 deletion bin/spark-shell
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ esac
set -o posix

## Global script variables
FWDIR="$(cd "`dirname "$0"`"/..; pwd)"
FWDIR="$(cd $(dirname $(readlink -f $0))/..; pwd)"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may have to quote these - so that dirs with spaces within their name work. Like they do at the moment.
Above should look like.
FWDIR="$(cd "$(dirname "$(readlink -f "$0")")"/..; pwd)"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ofcourse this applies to all other places as well.


function usage() {
echo "Usage: ./bin/spark-shell [options]"
Expand Down
2 changes: 1 addition & 1 deletion bin/spark-sql
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ CLASS="org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver"
CLASS_NOT_FOUND_EXIT_STATUS=1

# Figure out where Spark is installed
FWDIR="$(cd "`dirname "$0"`"/..; pwd)"
FWDIR="$(cd $(dirname $(readlink -f $0))/..; pwd)"

function usage {
echo "Usage: ./bin/spark-sql [options] [cli option]"
Expand Down
2 changes: 1 addition & 1 deletion bin/spark-submit
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# NOTE: Any changes in this file must be reflected in SparkSubmitDriverBootstrapper.scala!

export SPARK_HOME="$(cd "`dirname "$0"`"/..; pwd)"
export SPARK_HOME="$(cd $(dirname $(readlink -f $0))/..; pwd)"
ORIG_ARGS=("$@")

while (($#)); do
Expand Down