You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2020/05/19 14:32:53 UTC

[flink] branch master updated (2aacb62 -> 2f18138)

This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git.


    from 2aacb62  [FLINK-17547][task] Implement getUnconsumedSegment for spilled buffers
     new 31ec497  [FLINK-17763][dist] Properly handle log properties and spaces in scala-shell.sh
     new 2f18138  [FLINK-17809][dist] Quote classpath and FLINK_CONF_DIR

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 flink-dist/src/main/flink-bin/bin/config.sh         | 4 ++--
 flink-dist/src/main/flink-bin/bin/taskmanager.sh    | 2 +-
 flink-scala-shell/start-script/start-scala-shell.sh | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)


[flink] 01/02: [FLINK-17763][dist] Properly handle log properties and spaces in scala-shell.sh

Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 31ec497b9678597f87914b607203cc849a8fd583
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Mon May 18 09:38:49 2020 +0200

    [FLINK-17763][dist] Properly handle log properties and spaces in scala-shell.sh
---
 flink-scala-shell/start-script/start-scala-shell.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/flink-scala-shell/start-script/start-scala-shell.sh b/flink-scala-shell/start-script/start-scala-shell.sh
index e083008..bc1f9b5 100644
--- a/flink-scala-shell/start-script/start-scala-shell.sh
+++ b/flink-scala-shell/start-script/start-scala-shell.sh
@@ -93,13 +93,13 @@ then
     FLINK_CLASSPATH=$FLINK_CLASSPATH:$HADOOP_CLASSPATH:$HADOOP_CONF_DIR:$YARN_CONF_DIR
 fi
 
-log_setting="-Dlog.file="$LOG" -Dlog4j.configuration=file:"$FLINK_CONF_DIR"/$LOG4J_CONFIG -Dlog4j.configurationFile=file:"$FLINK_CONF_DIR"/$LOG4J_CONFIG -Dlogback.configurationFile=file:"$FLINK_CONF_DIR"/$LOGBACK_CONFIG"
+log_setting=("-Dlog.file=$LOG" "-Dlog4j.configuration=file:$FLINK_CONF_DIR/$LOG4J_CONFIG" "-Dlog4j.configurationFile=file:$FLINK_CONF_DIR/$LOG4J_CONFIG" "-Dlogback.configurationFile=file:$FLINK_CONF_DIR/$LOGBACK_CONFIG")
 
 if ${EXTERNAL_LIB_FOUND}
 then
-    $JAVA_RUN -Dscala.color -cp "$FLINK_CLASSPATH" "$log_setting" org.apache.flink.api.scala.FlinkShell $@ --addclasspath "$EXT_CLASSPATH"
+    $JAVA_RUN -Dscala.color -cp "$FLINK_CLASSPATH" "${log_setting[@]}" org.apache.flink.api.scala.FlinkShell $@ --addclasspath "$EXT_CLASSPATH"
 else
-    $JAVA_RUN -Dscala.color -cp "$FLINK_CLASSPATH" "$log_setting" org.apache.flink.api.scala.FlinkShell $@
+    $JAVA_RUN -Dscala.color -cp "$FLINK_CLASSPATH" "${log_setting[@]}" org.apache.flink.api.scala.FlinkShell $@
 fi
 
 #restore echo


[flink] 02/02: [FLINK-17809][dist] Quote classpath and FLINK_CONF_DIR

Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 2f18138df2b493c7e3af84d6dbf9b1acf09e1089
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Tue May 19 11:00:57 2020 +0200

    [FLINK-17809][dist] Quote classpath and FLINK_CONF_DIR
---
 flink-dist/src/main/flink-bin/bin/config.sh      | 4 ++--
 flink-dist/src/main/flink-bin/bin/taskmanager.sh | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/flink-dist/src/main/flink-bin/bin/config.sh b/flink-dist/src/main/flink-bin/bin/config.sh
index fe69ead..01d6308 100755
--- a/flink-dist/src/main/flink-bin/bin/config.sh
+++ b/flink-dist/src/main/flink-bin/bin/config.sh
@@ -478,9 +478,9 @@ runBashJavaUtilsCmd() {
     local conf_dir=$2
     local class_path=$3
     local dynamic_args=${@:4}
-    class_path=`manglePathList ${class_path}`
+    class_path=`manglePathList "${class_path}"`
 
-    local output=`${JAVA_RUN} -classpath ${class_path} org.apache.flink.runtime.util.bash.BashJavaUtils ${cmd} --configDir ${conf_dir} $dynamic_args 2>&1 | tail -n 1000`
+    local output=`${JAVA_RUN} -classpath "${class_path}" org.apache.flink.runtime.util.bash.BashJavaUtils ${cmd} --configDir "${conf_dir}" $dynamic_args 2>&1 | tail -n 1000`
     if [[ $? -ne 0 ]]; then
         echo "[ERROR] Cannot run BashJavaUtils to execute command ${cmd}." 1>&2
         # Print the output in case the user redirect the log to console.
diff --git a/flink-dist/src/main/flink-bin/bin/taskmanager.sh b/flink-dist/src/main/flink-bin/bin/taskmanager.sh
index c6e3aab..6c95326 100755
--- a/flink-dist/src/main/flink-bin/bin/taskmanager.sh
+++ b/flink-dist/src/main/flink-bin/bin/taskmanager.sh
@@ -48,7 +48,7 @@ if [[ $STARTSTOP == "start" ]] || [[ $STARTSTOP == "start-foreground" ]]; then
 
     # Startup parameters
 
-    java_utils_output=$(runBashJavaUtilsCmd GET_TM_RESOURCE_PARAMS ${FLINK_CONF_DIR} $FLINK_BIN_DIR/bash-java-utils.jar:$(findFlinkDistJar) "${ARGS[@]}")
+    java_utils_output=$(runBashJavaUtilsCmd GET_TM_RESOURCE_PARAMS "${FLINK_CONF_DIR}" "$FLINK_BIN_DIR/bash-java-utils.jar:$(findFlinkDistJar)" "${ARGS[@]}")
 
     logging_output=$(extractLoggingOutputs "${java_utils_output}")
     params_output=$(extractExecutionResults "${java_utils_output}" 2)