roadan closed pull request #9: Simple impl. relaying on version check and upload in the yarn client. URL: https://github.com/apache/incubator-amaterasu/pull/9
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/leader/src/main/scripts/ama-start-yarn.sh b/leader/src/main/scripts/ama-start-yarn.sh index 153eba8..6fd194a 100755 --- a/leader/src/main/scripts/ama-start-yarn.sh +++ b/leader/src/main/scripts/ama-start-yarn.sh @@ -36,6 +36,8 @@ echo " Version 0.2.0" echo "${NC}" echo "" +FORCE_BIN=false + for i in "$@" do case $i in @@ -67,6 +69,10 @@ case $i in JARPATH="${i#*=}" shift # past argument=value ;; + -f=*|--force-bin) + FORCE_BIN=true + shift # past argument with no value + ;; --default) DEFAULT=YES shift # past argument with no value @@ -78,6 +84,7 @@ esac done echo "repo: ${REPO} " +echo "force-bin: ${FORCE_BIN}" export HADOOP_USER_CLASSPATH_FIRST=true CMD="yarn jar ${BASEDIR}/bin/leader-0.2.0-incubating-all.jar org.apache.amaterasu.leader.yarn.Client --home ${BASEDIR}" @@ -118,10 +125,15 @@ if [ ! -f ${BASEDIR}/dist/Miniconda2-latest-Linux-x86_64.sh ]; then wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -P ${BASEDIR}/dist fi -eval "hdfs dfs -rm -R -skipTrash /apps/amaterasu" -#eval "hdfs dfs -mkdir /apps/amaterasu/" -#eval "hdfs dfs -chmod -R 777 /apps/amaterasu/" -#eval "hdfs dfs -copyFromLocal ${BASEDIR}/* /apps/amaterasu/" + +if [ "$FORCE_BIN" = true ] ; then + echo "FORCE: Deleting and re-creating /apps/amaterasu folder" + eval "hdfs dfs -rm -R -skipTrash /apps/amaterasu" + eval "hdfs dfs -mkdir /apps/amaterasu/" + eval "hdfs dfs -chmod -R 777 /apps/amaterasu/" + eval "hdfs dfs -copyFromLocal ${BASEDIR}/* /apps/amaterasu/" +fi + eval $CMD | grep "===>" kill $SERVER_PID ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services