File tree 6 files changed +20
-7
lines changed
spark-ec2/mesos/hadoop-framework-conf
6 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 45
45
"hdfs_data_dirs" : os .getenv ("MESOS_HDFS_DATA_DIRS" ),
46
46
"mapred_local_dirs" : os .getenv ("MESOS_MAPRED_LOCAL_DIRS" ),
47
47
"spark_local_dirs" : os .getenv ("MESOS_SPARK_LOCAL_DIRS" ),
48
- "default_spark_mem" : "%dm" % spark_mb
48
+ "default_spark_mem" : "%dm" % spark_mb ,
49
+ "scala_home" : os .getenv ("SCALA_HOME" ),
50
+ "java_home" : os .getenv ("JAVA_HOME" )
49
51
}
50
52
51
53
template_dir = "/root/spark-ec2/templates"
Original file line number Diff line number Diff line change 3
3
# Make sure we are in the spark-ec2 directory
4
4
cd /root/spark-ec2
5
5
6
+ # Load the environment variables specific to this AMI
7
+ source /root/.bash_profile
8
+
6
9
# Load the cluster variables set by the deploy script
7
10
source ec2-variables.sh
8
11
@@ -29,10 +32,18 @@ MASTERS=`cat masters`
29
32
NUM_MASTERS=` cat masters | wc -l`
30
33
OTHER_MASTERS=` cat masters | sed ' 1d' `
31
34
SLAVES=` cat slaves`
32
-
33
- JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk.x86_64
34
35
SSH_OPTS=" -o StrictHostKeyChecking=no -o ConnectTimeout=5"
35
36
37
+ if [[ " x$JAVA_HOME " == " x" ]] ; then
38
+ echo " Expected JAVA_HOME to be set in .bash_profile!"
39
+ exit 1
40
+ fi
41
+
42
+ if [[ " x$SCALA_HOME " == " x" ]] ; then
43
+ echo " Expected SCALA_HOME to be set in .bash_profile!"
44
+ exit 1
45
+ fi
46
+
36
47
if [[ ` tty` == " not a tty" ]] ; then
37
48
echo " Expecting a tty or pty! (use the ssh -t option)."
38
49
exit 1
Original file line number Diff line number Diff line change 6
6
# remote nodes.
7
7
8
8
# The java implementation to use. Required.
9
- export JAVA_HOME=/usr/lib/jvm/java-1.6.0
9
+ export JAVA_HOME={{java_home}}
10
10
11
11
# Extra Java CLASSPATH elements. Optional.
12
12
# export HADOOP_CLASSPATH=
Original file line number Diff line number Diff line change 6
6
# remote nodes.
7
7
8
8
# The java implementation to use. Required.
9
- export JAVA_HOME=/usr/lib/jvm/java-1.6.0
9
+ export JAVA_HOME={{java_home}}
10
10
11
11
# Extra Java CLASSPATH elements. Optional.
12
12
# export HADOOP_CLASSPATH=
Original file line number Diff line number Diff line change 6
6
# remote nodes.
7
7
8
8
# The java implementation to use. Required.
9
- export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk.x86_64
9
+ export JAVA_HOME={{java_home}}
10
10
11
11
# Mesos build directory, useful for finding JARs and the native library.
12
12
export MESOS_BUILD_DIR=/root/mesos/build
Original file line number Diff line number Diff line change 10
10
# be in the same format as the JVM's -Xmx option, e.g. 300m or 1g).
11
11
# - SPARK_LIBRARY_PATH, to add extra search paths for native libraries.
12
12
13
- export SCALA_HOME=/root/scala-2.9.2
13
+ export SCALA_HOME={{scala_home}}
14
14
export MESOS_NATIVE_LIBRARY=/usr/local/lib/libmesos.so
15
15
16
16
# Set Spark's memory per machine; note that you can also comment this out
You can’t perform that action at this time.
0 commit comments