Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: f40a0898a7
Fetching contributors…

Cannot retrieve contributors at this time

executable file 74 lines (62 sloc) 2.453 kb
#!/bin/bash
# Figure out where the Scala framework is installed
FWDIR="$(cd `dirname $0`; pwd)"
# Export this as SPARK_HOME
export SPARK_HOME="$FWDIR"
# Load environment variables from conf/spark-env.sh, if it exists
if [ -e $FWDIR/conf/spark-env.sh ] ; then
. $FWDIR/conf/spark-env.sh
fi
MESOS_CLASSPATH=""
MESOS_LIBRARY_PATH=""
if [ "x$MESOS_HOME" != "x" ] ; then
MESOS_CLASSPATH="$MESOS_HOME/lib/java/mesos.jar"
MESOS_LIBRARY_PATH="$MESOS_HOME/lib/java"
fi
if [ "x$SPARK_MEM" == "x" ] ; then
SPARK_MEM="300m"
fi
# Set JAVA_OPTS to be able to load native libraries and to set heap size
JAVA_OPTS="$SPARK_JAVA_OPTS"
JAVA_OPTS+=" -Djava.library.path=$SPARK_LIBRARY_PATH:$FWDIR/lib:$FWDIR/src/main/native:$MESOS_LIBRARY_PATH"
JAVA_OPTS+=" -Xms$SPARK_MEM -Xmx$SPARK_MEM"
# Load extra JAVA_OPTS from conf/java-opts, if it exists
if [ -e $FWDIR/conf/java-opts ] ; then
JAVA_OPTS+=" `cat $FWDIR/conf/java-opts`"
fi
export JAVA_OPTS
CORE_DIR=$FWDIR/core
EXAMPLES_DIR=$FWDIR/examples
BAGEL_DIR=$FWDIR/bagel
# Build up classpath
CLASSPATH="$SPARK_CLASSPATH:$CORE_DIR/target/scala_2.8.1/classes:$MESOS_CLASSPATH"
CLASSPATH+=:$FWDIR/conf
CLASSPATH+=:$CORE_DIR/lib/mesos.jar
CLASSPATH+=:$CORE_DIR/lib/asm-all-3.3.1.jar
CLASSPATH+=:$CORE_DIR/lib/colt.jar
CLASSPATH+=:$CORE_DIR/lib/guava-r07/guava-r07.jar
CLASSPATH+=:$CORE_DIR/lib/hadoop-0.20.2/hadoop-0.20.2-core.jar
CLASSPATH+=:$CORE_DIR/lib/scalatest-1.2/scalatest-1.2.jar
CLASSPATH+=:$CORE_DIR/lib/scalacheck_2.8.0-1.7.jar
CLASSPATH+=:$CORE_DIR/lib/jetty-7.1.6.v20100715/jetty-server-7.1.6.v20100715.jar
CLASSPATH+=:$CORE_DIR/lib/jetty-7.1.6.v20100715/servlet-api-2.5.jar
CLASSPATH+=:$CORE_DIR/lib/kryo-1.04-mod/kryo-1.04-mod.jar
CLASSPATH+=:$CORE_DIR/lib/kryo-1.04-mod/minlog-1.2.jar
CLASSPATH+=:$CORE_DIR/lib/kryo-1.04-mod/objenesis-1.2.jar
CLASSPATH+=:$CORE_DIR/lib/kryo-1.04-mod/reflectasm-1.01.jar
CLASSPATH+=:$CORE_DIR/lib/apache-log4j-1.2.16/log4j-1.2.16.jar
CLASSPATH+=:$CORE_DIR/lib/slf4j-1.6.1/slf4j-api-1.6.1.jar
CLASSPATH+=:$CORE_DIR/lib/slf4j-1.6.1/slf4j-log4j12-1.6.1.jar
CLASSPATH+=:$CORE_DIR/lib/compress-lzf-0.6.0/compress-lzf-0.6.0.jar
CLASSPATH+=:$EXAMPLES_DIR/target/scala_2.8.1/classes
for jar in $CORE_DIR/lib/hadoop-0.20.2/lib/*.jar; do
CLASSPATH+=:$jar
done
CLASSPATH+=:$BAGEL_DIR/target/scala_2.8.1/classes
export CLASSPATH # Needed for spark-shell
if [ -n "$SCALA_HOME" ]; then
SCALA=${SCALA_HOME}/bin/scala
else
SCALA=scala
fi
exec $SCALA -cp $CLASSPATH $@
Jump to Line
Something went wrong with that request. Please try again.