From c29e74399d4c02ac613bb3811afd44e23fd73786 Mon Sep 17 00:00:00 2001 From: uce Date: Wed, 18 Jun 2014 00:48:15 +0200 Subject: [PATCH] [FLINK-943] Remove leading and ending double quotes from 'env.java.opts' config value in startup scripts --- stratosphere-dist/src/main/stratosphere-bin/bin/config.sh | 3 +++ stratosphere-dist/src/main/stratosphere-bin/bin/jobmanager.sh | 2 +- stratosphere-dist/src/main/stratosphere-bin/bin/taskmanager.sh | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/stratosphere-dist/src/main/stratosphere-bin/bin/config.sh b/stratosphere-dist/src/main/stratosphere-bin/bin/config.sh index 916881358e8bb..64f8ea7c7434f 100755 --- a/stratosphere-dist/src/main/stratosphere-bin/bin/config.sh +++ b/stratosphere-dist/src/main/stratosphere-bin/bin/config.sh @@ -169,6 +169,9 @@ fi if [ -z "${STRATOSPHERE_ENV_JAVA_OPTS}" ]; then STRATOSPHERE_ENV_JAVA_OPTS=$(readFromConfig ${KEY_ENV_JAVA_OPTS} "${DEFAULT_ENV_JAVA_OPTS}" "${YAML_CONF}") + + # Remove leading and ending double quotes (if present) of value + STRATOSPHERE_ENV_JAVA_OPTS="$( echo "${STRATOSPHERE_ENV_JAVA_OPTS}" | sed -e 's/^"//' -e 's/"$//' )" fi if [ -z "${STRATOSPHERE_SSH_OPTS}" ]; then diff --git a/stratosphere-dist/src/main/stratosphere-bin/bin/jobmanager.sh b/stratosphere-dist/src/main/stratosphere-bin/bin/jobmanager.sh index e474e5eeb75b2..a2ef1beca16d9 100755 --- a/stratosphere-dist/src/main/stratosphere-bin/bin/jobmanager.sh +++ b/stratosphere-dist/src/main/stratosphere-bin/bin/jobmanager.sh @@ -72,7 +72,7 @@ case $STARTSTOP in rotateLogFile $out echo Starting job manager - $JAVA_RUN $JVM_ARGS $STRATOSPHERE_ENV_JAVA_OPTS "${log_setting[@]}" -classpath "$STRATOSPHERE_JM_CLASSPATH" eu.stratosphere.nephele.jobmanager.JobManager -executionMode $EXECUTIONMODE -configDir "$STRATOSPHERE_CONF_DIR" > "$out" 2>&1 < /dev/null & + $JAVA_RUN $JVM_ARGS ${STRATOSPHERE_ENV_JAVA_OPTS} "${log_setting[@]}" -classpath "$STRATOSPHERE_JM_CLASSPATH" eu.stratosphere.nephele.jobmanager.JobManager -executionMode $EXECUTIONMODE -configDir "$STRATOSPHERE_CONF_DIR" > "$out" 2>&1 < /dev/null & echo $! > $pid ;; diff --git a/stratosphere-dist/src/main/stratosphere-bin/bin/taskmanager.sh b/stratosphere-dist/src/main/stratosphere-bin/bin/taskmanager.sh index ea6e46887ce59..aa92b6e951318 100755 --- a/stratosphere-dist/src/main/stratosphere-bin/bin/taskmanager.sh +++ b/stratosphere-dist/src/main/stratosphere-bin/bin/taskmanager.sh @@ -69,7 +69,7 @@ case $STARTSTOP in rotateLogFile $out echo Starting task manager on host $HOSTNAME - $JAVA_RUN $JVM_ARGS $STRATOSPHERE_ENV_JAVA_OPTS "${log_setting[@]}" -classpath "$STRATOSPHERE_TM_CLASSPATH" eu.stratosphere.nephele.taskmanager.TaskManager -configDir "$STRATOSPHERE_CONF_DIR" > "$out" 2>&1 < /dev/null & + $JAVA_RUN $JVM_ARGS ${STRATOSPHERE_ENV_JAVA_OPTS} "${log_setting[@]}" -classpath "$STRATOSPHERE_TM_CLASSPATH" eu.stratosphere.nephele.taskmanager.TaskManager -configDir "$STRATOSPHERE_CONF_DIR" > "$out" 2>&1 < /dev/null & echo $! > $pid ;;