diff options
author | KarthikTunga <karthik.tunga@gmail.com> | 2013-10-15 00:35:44 -0700 |
---|---|---|
committer | KarthikTunga <karthik.tunga@gmail.com> | 2013-10-15 00:35:44 -0700 |
commit | d2c86e718891b40e1cea8b0719462673b6b64e4e (patch) | |
tree | 7ff28942c69f9460d4655d004a6a76350611c092 /bin | |
parent | d585613ee22ed9292a69e35cedb0d5965f4c906f (diff) | |
download | spark-d2c86e718891b40e1cea8b0719462673b6b64e4e.tar.gz spark-d2c86e718891b40e1cea8b0719462673b6b64e4e.tar.bz2 spark-d2c86e718891b40e1cea8b0719462673b6b64e4e.zip |
SPARK-627 - reading --config argument
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/slaves.sh | 16 | ||||
-rwxr-xr-x | bin/spark-daemon.sh | 17 |
2 files changed, 33 insertions, 0 deletions
diff --git a/bin/slaves.sh b/bin/slaves.sh index 752565b759..bcb7760130 100755 --- a/bin/slaves.sh +++ b/bin/slaves.sh @@ -46,6 +46,22 @@ bin=`cd "$bin"; pwd` # spark-env.sh. Save it here. HOSTLIST=$SPARK_SLAVES +#check if conf dir passed as an argument +if [ "$1" == "--config" ] +then + shift + conf_dir=$1 + if [ ! -d "$conf_dir" ] + then + echo "$conf_dir is not a valid directory" + echo $usage + exit 1 + else + export SPARK_CONF_DIR=$conf_dir + fi + shift +fi + if [ -f "${SPARK_CONF_DIR}/spark-env.sh" ]; then . "${SPARK_CONF_DIR}/spark-env.sh" fi diff --git a/bin/spark-daemon.sh b/bin/spark-daemon.sh index 5bfe967fbf..48d552f3db 100755 --- a/bin/spark-daemon.sh +++ b/bin/spark-daemon.sh @@ -43,6 +43,23 @@ bin=`cd "$bin"; pwd` . "$bin/spark-config.sh" # get arguments + +# check if conf dir passed as an argument +if [ "$1" == "--config" ] +then + shift + conf_dir=$1 + if [ ! -d "$conf_dir" ] + then + echo "$conf_dir is not a valid directory" + echo "FOUL :"$usage + exit 1 + else + export SPARK_CONF_DIR=$conf_dir + fi + shift +fi + startStop=$1 shift command=$1 |