azagrebin commented on a change in pull request #11545: 
[FLINK-16742][runtime][dist] Extend and use BashJavaUtils to start JM JVM 
process and pass JVM memory args
URL: https://github.com/apache/flink/pull/11545#discussion_r400751296
 
 

 ##########
 File path: flink-dist/src/main/flink-bin/bin/config.sh
 ##########
 @@ -632,16 +632,27 @@ runBashJavaUtilsCmd() {
     echo "$output"
 }
 
-extractExecutionParams() {
-    local execution_config=$1
+extractExecutionResults() {
+    local output="$1"
     local EXECUTION_PREFIX="BASH_JAVA_UTILS_EXEC_RESULT:"
+    local execution_results
 
-    if ! [[ $execution_config =~ ^${EXECUTION_PREFIX}.* ]]; then
-        echo "[ERROR] Unexpected result: $execution_config" 1>&2
-        echo "[ERROR] The last line of the BashJavaUtils outputs is expected 
to be the execution result, following the prefix '${EXECUTION_PREFIX}'" 1>&2
+    IFS=$'\n' execution_results=($(echo "${output}" | grep 
${EXECUTION_PREFIX}))
+    if [[ ${#execution_results[@]} -le 0 ]]; then
 
 Review comment:
   maybe, we could also pass and check here the number of expected output lines?
   this would prevent from subtle failures of the subsequent head/tail commands

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to