diff options
author | haitao.yao <yao.erix@gmail.com> | 2013-02-16 10:11:28 +0800 |
---|---|---|
committer | haitao.yao <yao.erix@gmail.com> | 2013-02-16 10:11:28 +0800 |
commit | a9cfac347a367ba252e2061f5d9910355e2fe0c3 (patch) | |
tree | b4abb2c66b67f1a117aabdb850285587c8d4348e /run | |
parent | f609182e5bfc73110181f8c432cea460a74e61d6 (diff) | |
parent | 3bcc6e5c0395b7478bc19572cbef3958f13daf6e (diff) | |
download | spark-a9cfac347a367ba252e2061f5d9910355e2fe0c3.tar.gz spark-a9cfac347a367ba252e2061f5d9910355e2fe0c3.tar.bz2 spark-a9cfac347a367ba252e2061f5d9910355e2fe0c3.zip |
Merge branch 'mesos'
Diffstat (limited to 'run')
-rwxr-xr-x | run | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -13,6 +13,18 @@ if [ -e $FWDIR/conf/spark-env.sh ] ; then . $FWDIR/conf/spark-env.sh fi +if [ -z "$1" ]; then + echo "Usage: run <spark-class> [<args>]" >&2 + exit 1 +fi + +# If this is a standalone cluster daemon, reset SPARK_JAVA_OPTS and SPARK_MEM to reasonable +# values for that; it doesn't need a lot +if [ "$1" = "spark.deploy.master.Master" -o "$1" = "spark.deploy.worker.Worker" ]; then + SPARK_MEM=${SPARK_DAEMON_MEMORY:-512m} + SPARK_JAVA_OPTS=$SPARK_DAEMON_JAVA_OPTS # Empty by default +fi + if [ "$SPARK_LAUNCH_WITH_SCALA" == "1" ]; then if [ `command -v scala` ]; then RUNNER="scala" |