chn5944 commented on code in PR #25739:
URL: https://github.com/apache/flink/pull/25739#discussion_r1869702019


##########
flink-dist/src/main/flink-bin/bin/bash-java-utils.sh:
##########
@@ -25,11 +34,41 @@ readFromConfigFile() {
     # first extract the value with the given key (1st sed), then trim the 
result (2nd sed)
     # if a key exists multiple times, take the "last" one (tail)
     local value=`sed -n "s/^[ ]*${key}[ ]*: \([^#]*\).*$/\1/p" "${configFile}" 
| sed "s/^ *//;s/ *$//" | tail -n 1`
-
+    if [ -z "$value" ]; then
+               # for env.java.home value = `sed -n "/^env:/,/^[^ ]/p" 
"${configFile}" | sed -n "/^  java:/,/^[^ ]/p" | sed -n "/home:/s/.*: //p" | 
tail -n 1`
+               IFS='.'
+               read -ra nodes <<< "$1"
+               
+               local sed_cmd_left="sed -n \"/^"
+               local sed_cmd_right=" | "               
+               for index in ${!nodes[@]}; do
+                       node=${nodes[index]}
+                                
+                       if [ $index -eq 0 ]; then

Review Comment:
   get it,  I will follow your above suggest; I have no good idea to add  tests 
for this now, I just test new logic is adaptive for "flink-conf.yaml" and 
"config.yaml", I will try add to tests, also looking forward to your good idea



-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to