spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sro...@apache.org
Subject spark git commit: SPARK-4924 addendum. Minor assembly directory fix in load-spark-env-sh
Date Thu, 09 Apr 2015 11:05:17 GMT
Repository: spark
Updated Branches:
  refs/heads/master b9c51c049 -> 53f6bb1df


SPARK-4924 addendum. Minor assembly directory fix in load-spark-env-sh

Set the current dir path $FWDIR and same at $ASSEMBLY_DIR1, $ASSEMBLY_DIR2
otherwise $SPARK_HOME cannot be visible from spark-env.sh -- no SPARK_HOME variable is assigned
there.
I am using the Spark-1.3.0 source code package and I come across with this when trying to
start the master: sbin/start-master.sh

Author: raschild <raschild@users.noreply.github.com>

Closes #5261 from raschild/patch-1 and squashes the following commits:

b9babcd [raschild] Update load-spark-env.sh


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/53f6bb1d
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/53f6bb1d
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/53f6bb1d

Branch: refs/heads/master
Commit: 53f6bb1dfec74cbe8be9ae6a670d82eb6759cc8c
Parents: b9c51c0
Author: raschild <raschild@users.noreply.github.com>
Authored: Thu Apr 9 07:04:18 2015 -0400
Committer: Sean Owen <sowen@cloudera.com>
Committed: Thu Apr 9 07:04:45 2015 -0400

----------------------------------------------------------------------
 bin/load-spark-env.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/53f6bb1d/bin/load-spark-env.sh
----------------------------------------------------------------------
diff --git a/bin/load-spark-env.sh b/bin/load-spark-env.sh
index 2d7070c..95779e9 100644
--- a/bin/load-spark-env.sh
+++ b/bin/load-spark-env.sh
@@ -20,6 +20,7 @@
 # This script loads spark-env.sh if it exists, and ensures it is only loaded once.
 # spark-env.sh is loaded from SPARK_CONF_DIR if set, or within the current directory's
 # conf/ subdirectory.
+FWDIR="$(cd "`dirname "$0"`"/..; pwd)"
 
 if [ -z "$SPARK_ENV_LOADED" ]; then
   export SPARK_ENV_LOADED=1
@@ -41,8 +42,8 @@ fi
 
 if [ -z "$SPARK_SCALA_VERSION" ]; then
 
-    ASSEMBLY_DIR2="$SPARK_HOME/assembly/target/scala-2.11"
-    ASSEMBLY_DIR1="$SPARK_HOME/assembly/target/scala-2.10"
+    ASSEMBLY_DIR2="$FWDIR/assembly/target/scala-2.11"
+    ASSEMBLY_DIR1="$FWDIR/assembly/target/scala-2.10"
 
     if [[ -d "$ASSEMBLY_DIR2" && -d "$ASSEMBLY_DIR1" ]]; then
         echo -e "Presence of build for both scala versions(SCALA 2.10 and SCALA 2.11) detected."
1>&2


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org


Mime
View raw message