github-actions[bot] commented on PR #17139:
URL: https://github.com/apache/doris/pull/17139#issuecomment-1445288720

   #### `sh-checker report`
   
   To get the full details, please check in the 
[job]("https://github.com/apache/doris/actions/runs/4273960350";) output.
   
   <details>
   <summary>shellcheck errors</summary>
   
   ```
   
   'shellcheck ' returned error 1 finding the following syntactical issues:
   
   ----------
   
   In docker/runtime/be/resource/entry_point.sh line 33:
       if [ "$#" -eq 0 ]; then text="$(cat)"; fi
          ^------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
   
   Did you mean: 
       if [[ "$#" -eq 0 ]]; then text="$(cat)"; fi
   
   
   In docker/runtime/be/resource/entry_point.sh line 34:
       local dt="$(date -Iseconds)"
             ^-- SC2155 (warning): Declare and assign separately to avoid 
masking return values.
   
   
   In docker/runtime/be/resource/entry_point.sh line 35:
       printf '%s [%s] [Entrypoint]: %s\n' "$dt" "$type" "$text"
                                            ^-^ SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
                                                  ^---^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
                                                          ^---^ SC2250 (style): 
Prefer putting braces around variable references even when not strictly 
required.
   
   Did you mean: 
       printf '%s [%s] [Entrypoint]: %s\n' "${dt}" "${type}" "${text}"
   
   
   In docker/runtime/be/resource/entry_point.sh line 50:
       [ "${#FUNCNAME[@]}" -ge 2 ] &&
       ^-------------------------^ SC2292 (style): Prefer [[ ]] over [ ] for 
tests in Bash/Ksh.
   
   Did you mean: 
       [[ "${#FUNCNAME[@]}" -ge 2 ]] &&
   
   
   In docker/runtime/be/resource/entry_point.sh line 51:
           [ "${FUNCNAME[0]}" = '_is_sourced' ] &&
           ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
   
   Did you mean: 
           [[ "${FUNCNAME[0]}" = '_is_sourced' ]] &&
   
   
   In docker/runtime/be/resource/entry_point.sh line 52:
           [ "${FUNCNAME[1]}" = 'source' ]
           ^-----------------------------^ SC2292 (style): Prefer [[ ]] over [ 
] for tests in Bash/Ksh.
   
   Did you mean: 
           [[ "${FUNCNAME[1]}" = 'source' ]]
   
   
   In docker/runtime/be/resource/entry_point.sh line 57:
       if [ -d "${DORIS_HOME}/be/storage/data" ]; then
          ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
                ^-----------^ SC2154 (warning): DORIS_HOME is referenced but 
not assigned.
   
   Did you mean: 
       if [[ -d "${DORIS_HOME}/be/storage/data" ]]; then
   
   
   In docker/runtime/be/resource/entry_point.sh line 63:
       local feServerArray=($(echo "${FE_SERVERS}" | awk '{gsub (/,/," "); 
print $0}'))
                            ^-- SC2207 (warning): Prefer mapfile or read -a to 
split command output (or quote to avoid splitting).
   
   
   In docker/runtime/be/resource/entry_point.sh line 69:
           feIpArray[$tmpFeId]=${tmpFeIp}
                     ^------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
           feIpArray[${tmpFeId}]=${tmpFeIp}
   
   
   In docker/runtime/be/resource/entry_point.sh line 75:
       BE_HOST_IP=$(echo "${BE_ADDR}" | awk -F ':' '{ sub(/ /, ""); print$1}')
                          ^--------^ SC2154 (warning): BE_ADDR is referenced 
but not assigned.
   
   
   In docker/runtime/be/resource/entry_point.sh line 86:
       mysql -uroot -P9030 -h${MASTER_FE_IP} --comments "$@" 2>/dev/null
                             ^-------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean: 
       mysql -uroot -P9030 -h"${MASTER_FE_IP}" --comments "$@" 2>/dev/null
   
   
   In docker/runtime/be/resource/entry_point.sh line 93:
           if [[ $(($i % 20)) == 1 ]]; then
                    ^-- SC2004 (style): $/${} is unnecessary on arithmetic 
variables.
                    ^-- SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
           if [[ $((${i} % 20)) == 1 ]]; then
   
   
   In docker/runtime/be/resource/entry_point.sh line 103:
               if [[ $(($i % 20)) == 1 ]]; then
                        ^-- SC2004 (style): $/${} is unnecessary on arithmetic 
variables.
                        ^-- SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
               if [[ $((${i} % 20)) == 1 ]]; then
   
   
   In docker/runtime/be/resource/entry_point.sh line 109:
       if ! [[ $is_fe_start ]]; then
               ^----------^ SC2244 (style): Prefer explicit -n to check 
non-empty string (or use =/-ne to check boolean/integer).
               ^----------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
       if ! [[ -n $is_fe_start ]]; then
   
   
   In docker/runtime/be/resource/entry_point.sh line 120:
           case "$f" in
                 ^-- SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
           case "${f}" in
   
   
   In docker/runtime/be/resource/entry_point.sh line 122:
               if [ -x "$f" ]; then
                  ^---------^ SC2292 (style): Prefer [[ ]] over [ ] for tests 
in Bash/Ksh.
                        ^-- SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
               if [[ -x "${f}" ]]; then
   
   
   In docker/runtime/be/resource/entry_point.sh line 123:
                   doris_note "$0: running $f"
                                           ^-- SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
                   doris_note "$0: running ${f}"
   
   
   In docker/runtime/be/resource/entry_point.sh line 124:
                   "$f"
                    ^-- SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
                   "${f}"
   
   
   In docker/runtime/be/resource/entry_point.sh line 126:
                   doris_note "$0: sourcing $f"
                                            ^-- SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
                   doris_note "$0: sourcing ${f}"
   
   
   In docker/runtime/be/resource/entry_point.sh line 127:
                   . "$f"
                     ^--^ SC1090 (warning): ShellCheck can't follow 
non-constant source. Use a directive to specify location.
                      ^-- SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
                   . "${f}"
   
   
   In docker/runtime/be/resource/entry_point.sh line 131:
               doris_note "$0: running $f"
                                       ^-- SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
               doris_note "$0: running ${f}"
   
   
   In docker/runtime/be/resource/entry_point.sh line 132:
               docker_process_sql <"$f"
                                    ^-- SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
               docker_process_sql <"${f}"
   
   
   In docker/runtime/be/resource/entry_point.sh line 136:
               doris_note "$0: running $f"
                                       ^-- SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
               doris_note "$0: running ${f}"
   
   
   In docker/runtime/be/resource/entry_point.sh line 137:
               bunzip2 -c "$f" | docker_process_sql
                           ^-- SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
               bunzip2 -c "${f}" | docker_process_sql
   
   
   In docker/runtime/be/resource/entry_point.sh line 141:
               doris_note "$0: running $f"
                                       ^-- SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
               doris_note "$0: running ${f}"
   
   
   In docker/runtime/be/resource/entry_point.sh line 142:
               gunzip -c "$f" | docker_process_sql
                          ^-- SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
               gunzip -c "${f}" | docker_process_sql
   
   
   In docker/runtime/be/resource/entry_point.sh line 146:
               doris_note "$0: running $f"
                                       ^-- SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
               doris_note "$0: running ${f}"
   
   
   In docker/runtime/be/resource/entry_point.sh line 147:
               xzcat "$f" | docker_process_sql
                      ^-- SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
               xzcat "${f}" | docker_process_sql
   
   
   In docker/runtime/be/resource/entry_point.sh line 151:
               doris_note "$0: running $f"
                                       ^-- SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
               doris_note "$0: running ${f}"
   
   
   In docker/runtime/be/resource/entry_point.sh line 152:
               zstd -dc "$f" | docker_process_sql
                         ^-- SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
               zstd -dc "${f}" | docker_process_sql
   
   
   In docker/runtime/be/resource/entry_point.sh line 155:
           *) doris_warn "$0: ignoring $f" ;;
                                       ^-- SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
           *) doris_warn "$0: ignoring ${f}" ;;
   
   
   In docker/runtime/be/resource/entry_point.sh line 172:
       if [ -z ${DATABASE_ALREADY_EXISTS} ]; then
          ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
               ^------------------------^ SC2248 (style): Prefer double quoting 
even when variables don't contain special characters.
   
   Did you mean: 
       if [[ -z "${DATABASE_ALREADY_EXISTS}" ]]; then
   
   
   In docker/runtime/be/resource/init_be.sh line 35:
     if [ "$#" -eq 0 ]; then text="$(cat)"; fi
        ^------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
   
   Did you mean: 
     if [[ "$#" -eq 0 ]]; then text="$(cat)"; fi
   
   
   In docker/runtime/be/resource/init_be.sh line 36:
     local dt="$(date -Iseconds)"
           ^-- SC2155 (warning): Declare and assign separately to avoid masking 
return values.
   
   
   In docker/runtime/be/resource/init_be.sh line 37:
     printf '%s [%s] [Entrypoint]: %s\n' "$dt" "$type" "$text"
                                          ^-^ SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
                                                ^---^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
                                                        ^---^ SC2250 (style): 
Prefer putting braces around variable references even when not strictly 
required.
   
   Did you mean: 
     printf '%s [%s] [Entrypoint]: %s\n' "${dt}" "${type}" "${text}"
   
   
   In docker/runtime/be/resource/init_be.sh line 52:
     [ "${#FUNCNAME[@]}" -ge 2 ] &&
     ^-------------------------^ SC2292 (style): Prefer [[ ]] over [ ] for 
tests in Bash/Ksh.
   
   Did you mean: 
     [[ "${#FUNCNAME[@]}" -ge 2 ]] &&
   
   
   In docker/runtime/be/resource/init_be.sh line 53:
       [ "${FUNCNAME[0]}" = '_is_sourced' ] &&
       ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
   
   Did you mean: 
       [[ "${FUNCNAME[0]}" = '_is_sourced' ]] &&
   
   
   In docker/runtime/be/resource/init_be.sh line 54:
       [ "${FUNCNAME[1]}" = 'source' ]
       ^-----------------------------^ SC2292 (style): Prefer [[ ]] over [ ] 
for tests in Bash/Ksh.
   
   Did you mean: 
       [[ "${FUNCNAME[1]}" = 'source' ]]
   
   
   In docker/runtime/be/resource/init_be.sh line 59:
     if [ -d "${DORIS_HOME}/be/storage/data" ]; then
        ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
   
   Did you mean: 
     if [[ -d "${DORIS_HOME}/be/storage/data" ]]; then
   
   
   In docker/runtime/be/resource/init_be.sh line 66:
     if [[ $FE_SERVERS =~ 
^.+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4}(,.+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4})*$
 ]]; then
           ^---------^ SC2154 (warning): FE_SERVERS is referenced but not 
assigned.
           ^---------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
     if [[ ${FE_SERVERS} =~ 
^.+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4}(,.+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4})*$
 ]]; then
   
   
   In docker/runtime/be/resource/init_be.sh line 67:
       doris_warn "FE_SERVERS" $FE_SERVERS
                               ^---------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
                               ^---------^ SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
       doris_warn "FE_SERVERS" "$FE_SERVERS"
   
   
   In docker/runtime/be/resource/init_be.sh line 71:
     if [[ $BE_ADDR =~ 
^[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4}$
 ]]; then
           ^------^ SC2154 (warning): BE_ADDR is referenced but not assigned.
           ^------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
     if [[ ${BE_ADDR} =~ 
^[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4}$
 ]]; then
   
   
   In docker/runtime/be/resource/init_be.sh line 72:
       doris_warn "BE_ADDR" $BE_ADDR
                            ^------^ SC2086 (info): Double quote to prevent 
globbing and word splitting.
                            ^------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
       doris_warn "BE_ADDR" "$BE_ADDR"
   
   
   In docker/runtime/be/resource/init_be.sh line 79:
     local feServerArray=($(echo "${FE_SERVERS}" | awk '{gsub (/,/," "); print 
$0}'))
                          ^-- SC2207 (warning): Prefer mapfile or read -a to 
split command output (or quote to avoid splitting).
   
   
   In docker/runtime/be/resource/init_be.sh line 86:
       check_arg "tmpFeIp" $tmpFeIp
                           ^------^ SC2086 (info): Double quote to prevent 
globbing and word splitting.
                           ^------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
       check_arg "tmpFeIp" "$tmpFeIp"
   
   
   In docker/runtime/be/resource/init_be.sh line 87:
       feIpArray[$tmpFeId]=${tmpFeIp}
                 ^------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
       feIpArray[${tmpFeId}]=${tmpFeIp}
   
   
   In docker/runtime/be/resource/init_be.sh line 88:
       check_arg "tmpFeEditLogPort" $tmpFeEditLogPort
                                    ^---------------^ SC2086 (info): Double 
quote to prevent globbing and word splitting.
                                    ^---------------^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
       check_arg "tmpFeEditLogPort" "$tmpFeEditLogPort"
   
   
   In docker/runtime/be/resource/init_be.sh line 89:
       feEditLogPortArray[$tmpFeId]=${tmpFeEditLogPort}
                          ^------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
       feEditLogPortArray[${tmpFeId}]=${tmpFeEditLogPort}
   
   
   In docker/runtime/be/resource/init_be.sh line 94:
     check_arg "MASTER_FE_IP" $MASTER_FE_IP
                              ^-----------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
                              ^-----------^ SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
     check_arg "MASTER_FE_IP" "$MASTER_FE_IP"
   
   
   In docker/runtime/be/resource/init_be.sh line 96:
     check_arg "BE_HOST_IP" $BE_HOST_IP
                            ^---------^ SC2086 (info): Double quote to prevent 
globbing and word splitting.
                            ^---------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
     check_arg "BE_HOST_IP" "$BE_HOST_IP"
   
   
   In docker/runtime/be/resource/init_be.sh line 98:
     check_arg "BE_HEARTBEAT_PORT" $BE_HEARTBEAT_PORT
                                   ^----------------^ SC2086 (info): Double 
quote to prevent globbing and word splitting.
                                   ^----------------^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
     check_arg "BE_HEARTBEAT_PORT" "$BE_HEARTBEAT_PORT"
   
   
   In docker/runtime/be/resource/init_be.sh line 101:
     check_arg "priority_networks" $PRIORITY_NETWORKS
                                   ^----------------^ SC2086 (info): Double 
quote to prevent globbing and word splitting.
                                   ^----------------^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
     check_arg "priority_networks" "$PRIORITY_NETWORKS"
   
   
   In docker/runtime/be/resource/init_be.sh line 114:
     echo "priority_networks = ${1}" >>${DORIS_HOME}/be/conf/be.conf
                                       ^-----------^ SC2248 (style): Prefer 
double quoting even when variables don't contain special characters.
   
   Did you mean: 
     echo "priority_networks = ${1}" >>"${DORIS_HOME}"/be/conf/be.conf
   
   
   In docker/runtime/be/resource/init_be.sh line 121:
     mysql -uroot -P9030 -h${MASTER_FE_IP} --comments "$@" 2>/dev/null
                           ^-------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean: 
     mysql -uroot -P9030 -h"${MASTER_FE_IP}" --comments "$@" 2>/dev/null
   
   
   In docker/runtime/be/resource/init_be.sh line 125:
     if [[ ${NODE_ROLE} == 'computation' ]]; then
           ^----------^ SC2154 (warning): NODE_ROLE is referenced but not 
assigned.
   
   
   In docker/runtime/be/resource/init_be.sh line 127:
       echo "be_node_role=computation" >>${DORIS_HOME}/be/conf/be.conf
                                         ^-----------^ SC2248 (style): Prefer 
double quoting even when variables don't contain special characters.
   
   Did you mean: 
       echo "be_node_role=computation" >>"${DORIS_HOME}"/be/conf/be.conf
   
   
   In docker/runtime/be/resource/init_be.sh line 140:
       if [[ $register_be_status == 0 ]]; then
             ^-----------------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
       if [[ ${register_be_status} == 0 ]]; then
   
   
   In docker/runtime/be/resource/init_be.sh line 146:
         if [ -n "$BE_ALREADY_EXISTS" ]; then
            ^-------------------------^ SC2292 (style): Prefer [[ ]] over [ ] 
for tests in Bash/Ksh.
                  ^----------------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
         if [[ -n "${BE_ALREADY_EXISTS}" ]]; then
   
   
   In docker/runtime/be/resource/init_be.sh line 150:
         if [[ $(( $i % 20 )) == 1 ]]; then
                   ^-- SC2004 (style): $/${} is unnecessary on arithmetic 
variables.
                   ^-- SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
         if [[ $(( ${i} % 20 )) == 1 ]]; then
   
   
   In docker/runtime/be/resource/init_be.sh line 155:
       if [[ $(( $i % 20 )) == 1 ]]; then
                 ^-- SC2004 (style): $/${} is unnecessary on arithmetic 
variables.
                 ^-- SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
       if [[ $(( ${i} % 20 )) == 1 ]]; then
   
   
   In docker/runtime/be/resource/init_be.sh line 160:
     if ! [[ $is_fe_start ]]; then
             ^----------^ SC2244 (style): Prefer explicit -n to check non-empty 
string (or use =/-ne to check boolean/integer).
             ^----------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
     if ! [[ -n $is_fe_start ]]; then
   
   
   In docker/runtime/be/resource/init_be.sh line 168:
     if [ -z $2 ]; then
        ^-------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
             ^-- SC2086 (info): Double quote to prevent globbing and word 
splitting.
   
   Did you mean: 
     if [[ -z "$2" ]]; then
   
   
   In docker/runtime/be/resource/init_be.sh line 191:
       if [[ $(( $i % 20 )) == 1 ]]; then
                 ^-- SC2004 (style): $/${} is unnecessary on arithmetic 
variables.
                 ^-- SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
       if [[ $(( ${i} % 20 )) == 1 ]]; then
   
   
   In docker/runtime/be/resource/init_be.sh line 207:
     if [ -z "$DATABASE_ALREADY_EXISTS" ]; then
        ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
              ^----------------------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
     if [[ -z "${DATABASE_ALREADY_EXISTS}" ]]; then
   
   
   In docker/runtime/be/resource/init_be.sh line 208:
       add_priority_networks $PRIORITY_NETWORKS
                             ^----------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
                             ^----------------^ SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
       add_priority_networks "$PRIORITY_NETWORKS"
   
   
   In docker/runtime/broker/resource/init_broker.sh line 22:
   DORIS_HOME="/opt/apache-doris"
   ^--------^ SC2034 (warning): DORIS_HOME appears unused. Verify use (or 
export if used externally).
   
   
   In docker/runtime/broker/resource/init_broker.sh line 35:
     if [ "$#" -eq 0 ]; then text="$(cat)"; fi
        ^------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
   
   Did you mean: 
     if [[ "$#" -eq 0 ]]; then text="$(cat)"; fi
   
   
   In docker/runtime/broker/resource/init_broker.sh line 36:
     local dt="$(date -Iseconds)"
           ^-- SC2155 (warning): Declare and assign separately to avoid masking 
return values.
   
   
   In docker/runtime/broker/resource/init_broker.sh line 37:
     printf '%s [%s] [Entrypoint]: %s\n' "$dt" "$type" "$text"
                                          ^-^ SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
                                                ^---^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
                                                        ^---^ SC2250 (style): 
Prefer putting braces around variable references even when not strictly 
required.
   
   Did you mean: 
     printf '%s [%s] [Entrypoint]: %s\n' "${dt}" "${type}" "${text}"
   
   
   In docker/runtime/broker/resource/init_broker.sh line 52:
     [ "${#FUNCNAME[@]}" -ge 2 ] &&
     ^-------------------------^ SC2292 (style): Prefer [[ ]] over [ ] for 
tests in Bash/Ksh.
   
   Did you mean: 
     [[ "${#FUNCNAME[@]}" -ge 2 ]] &&
   
   
   In docker/runtime/broker/resource/init_broker.sh line 53:
       [ "${FUNCNAME[0]}" = '_is_sourced' ] &&
       ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
   
   Did you mean: 
       [[ "${FUNCNAME[0]}" = '_is_sourced' ]] &&
   
   
   In docker/runtime/broker/resource/init_broker.sh line 54:
       [ "${FUNCNAME[1]}" = 'source' ]
       ^-----------------------------^ SC2292 (style): Prefer [[ ]] over [ ] 
for tests in Bash/Ksh.
   
   Did you mean: 
       [[ "${FUNCNAME[1]}" = 'source' ]]
   
   
   In docker/runtime/broker/resource/init_broker.sh line 59:
     if [[ $FE_SERVERS =~ 
^.+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4}(,.+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4})*$
 ]]; then
           ^---------^ SC2154 (warning): FE_SERVERS is referenced but not 
assigned.
           ^---------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
     if [[ ${FE_SERVERS} =~ 
^.+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4}(,.+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4})*$
 ]]; then
   
   
   In docker/runtime/broker/resource/init_broker.sh line 60:
       doris_warn "FE_SERVERS" $FE_SERVERS
                               ^---------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
                               ^---------^ SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
       doris_warn "FE_SERVERS" "$FE_SERVERS"
   
   
   In docker/runtime/broker/resource/init_broker.sh line 64:
     if [[ $BROKER_ADDR =~ 
^[a-zA-Z0-9]+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4}$
 ]]; then
           ^----------^ SC2154 (warning): BROKER_ADDR is referenced but not 
assigned.
           ^----------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
     if [[ ${BROKER_ADDR} =~ 
^[a-zA-Z0-9]+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4}$
 ]]; then
   
   
   In docker/runtime/broker/resource/init_broker.sh line 65:
       doris_warn "BROKER_ADDR" $BROKER_ADDR
                                ^----------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
                                ^----------^ SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
       doris_warn "BROKER_ADDR" "$BROKER_ADDR"
   
   
   In docker/runtime/broker/resource/init_broker.sh line 72:
     local feServerArray=($(echo "${FE_SERVERS}" | awk '{gsub (/,/," "); print 
$0}'))
                          ^-- SC2207 (warning): Prefer mapfile or read -a to 
split command output (or quote to avoid splitting).
   
   
   In docker/runtime/broker/resource/init_broker.sh line 79:
       check_arg "tmpFeIp" $tmpFeIp
                           ^------^ SC2086 (info): Double quote to prevent 
globbing and word splitting.
                           ^------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
       check_arg "tmpFeIp" "$tmpFeIp"
   
   
   In docker/runtime/broker/resource/init_broker.sh line 80:
       feIpArray[$tmpFeId]=${tmpFeIp}
                 ^------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
       feIpArray[${tmpFeId}]=${tmpFeIp}
   
   
   In docker/runtime/broker/resource/init_broker.sh line 81:
       check_arg "tmpFeEditLogPort" $tmpFeEditLogPort
                                    ^---------------^ SC2086 (info): Double 
quote to prevent globbing and word splitting.
                                    ^---------------^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
       check_arg "tmpFeEditLogPort" "$tmpFeEditLogPort"
   
   
   In docker/runtime/broker/resource/init_broker.sh line 82:
       feEditLogPortArray[$tmpFeId]=${tmpFeEditLogPort}
                          ^------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
       feEditLogPortArray[${tmpFeId}]=${tmpFeEditLogPort}
   
   
   In docker/runtime/broker/resource/init_broker.sh line 87:
     check_arg "MASTER_FE_IP" $MASTER_FE_IP
                              ^-----------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
                              ^-----------^ SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
     check_arg "MASTER_FE_IP" "$MASTER_FE_IP"
   
   
   In docker/runtime/broker/resource/init_broker.sh line 89:
     check_arg "BROKER_NAME" $BROKER_NAME
                             ^----------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
                             ^----------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
     check_arg "BROKER_NAME" "$BROKER_NAME"
   
   
   In docker/runtime/broker/resource/init_broker.sh line 91:
     check_arg "BROKER_HOST_IP" $BROKER_HOST_IP
                                ^-------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
                                ^-------------^ SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
     check_arg "BROKER_HOST_IP" "$BROKER_HOST_IP"
   
   
   In docker/runtime/broker/resource/init_broker.sh line 93:
     check_arg "BROKER_IPC_PORT" $BROKER_IPC_PORT
                                 ^--------------^ SC2086 (info): Double quote 
to prevent globbing and word splitting.
                                 ^--------------^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
     check_arg "BROKER_IPC_PORT" "$BROKER_IPC_PORT"
   
   
   In docker/runtime/broker/resource/init_broker.sh line 107:
     mysql -uroot -P9030 -h${MASTER_FE_IP} --comments "$@" 2>/dev/null
                           ^-------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean: 
     mysql -uroot -P9030 -h"${MASTER_FE_IP}" --comments "$@" 2>/dev/null
   
   
   In docker/runtime/broker/resource/init_broker.sh line 116:
       if [[ $(( $i % 20 )) == 1 ]]; then
                 ^-- SC2004 (style): $/${} is unnecessary on arithmetic 
variables.
                 ^-- SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
       if [[ $(( ${i} % 20 )) == 1 ]]; then
   
   
   In docker/runtime/broker/resource/init_broker.sh line 121:
       if [[ $register_broker_status == 0 ]]; then
             ^---------------------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
       if [[ ${register_broker_status} == 0 ]]; then
   
   
   In docker/runtime/broker/resource/init_broker.sh line 127:
         if [ -n "$BROKER_ALREADY_EXISTS" ]; then
            ^-----------------------------^ SC2292 (style): Prefer [[ ]] over [ 
] for tests in Bash/Ksh.
                  ^--------------------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
         if [[ -n "${BROKER_ALREADY_EXISTS}" ]]; then
   
   
   In docker/runtime/broker/resource/init_broker.sh line 131:
         if [[ $(( $i % 20 )) == 1 ]]; then
                   ^-- SC2004 (style): $/${} is unnecessary on arithmetic 
variables.
                   ^-- SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
         if [[ $(( ${i} % 20 )) == 1 ]]; then
   
   
   In docker/runtime/broker/resource/init_broker.sh line 137:
     if ! [[ $is_fe_start ]]; then
             ^----------^ SC2244 (style): Prefer explicit -n to check non-empty 
string (or use =/-ne to check boolean/integer).
             ^----------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
     if ! [[ -n $is_fe_start ]]; then
   
   
   In docker/runtime/broker/resource/init_broker.sh line 145:
     if [ -z $2 ]; then
        ^-------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
             ^-- SC2086 (info): Double quote to prevent globbing and word 
splitting.
   
   Did you mean: 
     if [[ -z "$2" ]]; then
   
   
   In docker/runtime/broker/resource/init_broker.sh line 159:
       doris_warn "broker_join_status: " $broker_join_status
                                         ^-----------------^ SC2248 (style): 
Prefer double quoting even when variables don't contain special characters.
                                         ^-----------------^ SC2250 (style): 
Prefer putting braces around variable references even when not strictly 
required.
   
   Did you mean: 
       doris_warn "broker_join_status: " "$broker_join_status"
   
   
   In docker/runtime/broker/resource/init_broker.sh line 169:
       if [[ $(( $i % 20 )) == 1 ]]; then
                 ^-- SC2004 (style): $/${} is unnecessary on arithmetic 
variables.
                 ^-- SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
       if [[ $(( ${i} % 20 )) == 1 ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 35:
       if [ "$#" -eq 0 ]; then text="$(cat)"; fi
          ^------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
   
   Did you mean: 
       if [[ "$#" -eq 0 ]]; then text="$(cat)"; fi
   
   
   In docker/runtime/fe/resource/init_fe.sh line 36:
       local dt="$(date -Iseconds)"
             ^-- SC2155 (warning): Declare and assign separately to avoid 
masking return values.
   
   
   In docker/runtime/fe/resource/init_fe.sh line 37:
       printf '%s [%s] [Entrypoint]: %s\n' "$dt" "$type" "$text"
                                            ^-^ SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
                                                  ^---^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
                                                          ^---^ SC2250 (style): 
Prefer putting braces around variable references even when not strictly 
required.
   
   Did you mean: 
       printf '%s [%s] [Entrypoint]: %s\n' "${dt}" "${type}" "${text}"
   
   
   In docker/runtime/fe/resource/init_fe.sh line 52:
       [ "${#FUNCNAME[@]}" -ge 2 ] &&
       ^-------------------------^ SC2292 (style): Prefer [[ ]] over [ ] for 
tests in Bash/Ksh.
   
   Did you mean: 
       [[ "${#FUNCNAME[@]}" -ge 2 ]] &&
   
   
   In docker/runtime/fe/resource/init_fe.sh line 53:
           [ "${FUNCNAME[0]}" = '_is_sourced' ] &&
           ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
   
   Did you mean: 
           [[ "${FUNCNAME[0]}" = '_is_sourced' ]] &&
   
   
   In docker/runtime/fe/resource/init_fe.sh line 54:
           [ "${FUNCNAME[1]}" = 'source' ]
           ^-----------------------------^ SC2292 (style): Prefer [[ ]] over [ 
] for tests in Bash/Ksh.
   
   Did you mean: 
           [[ "${FUNCNAME[1]}" = 'source' ]]
   
   
   In docker/runtime/fe/resource/init_fe.sh line 58:
       declare -g DATABASE_ALREADY_EXISTS BUILD_TYPE_K8S
                                          ^------------^ SC2034 (warning): 
BUILD_TYPE_K8S appears unused. Verify use (or export if used externally).
   
   
   In docker/runtime/fe/resource/init_fe.sh line 59:
       if [ -d "${DORIS_HOME}/fe/doris-meta/image" ]; then
          ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
   
   Did you mean: 
       if [[ -d "${DORIS_HOME}/fe/doris-meta/image" ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 67:
       if [ -n "$BUILD_TYPE" ]; then
          ^------------------^ SC2292 (style): Prefer [[ ]] over [ ] for tests 
in Bash/Ksh.
                ^---------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
       if [[ -n "${BUILD_TYPE}" ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 69:
           if [[ $BUILD_TYPE =~ ^([kK]8[sS])$ ]]; then
                 ^---------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
           if [[ ${BUILD_TYPE} =~ ^([kK]8[sS])$ ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 70:
               doris_warn "BUILD_TYPE" $BUILD_TYPE
                                       ^---------^ SC2086 (info): Double quote 
to prevent globbing and word splitting.
                                       ^---------^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
               doris_warn "BUILD_TYPE" "$BUILD_TYPE"
   
   
   In docker/runtime/fe/resource/init_fe.sh line 77:
       if [[ -n "$FE_SERVERS" && -n "$FE_ID" ]]; then
                 ^---------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
                                     ^----^ SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
       if [[ -n "${FE_SERVERS}" && -n "${FE_ID}" ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 79:
           if [[ $FE_SERVERS =~ 
^.+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4}(,.+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4})*$
 || $FE_SERVERS =~ 
^([0-9a-fA-F]{1,4}:){7,7}([0-9a-fA-F]{1,4}|:)|([0-9a-fA-F]{1,4}:){1,6}(:[0-9a-fA-F]{1,4}|:)|([0-9a-fA-F]{1,4}:){1,5}((:[0-9a-fA-F]{1,4}){1,2}|:)|([0-9a-fA-F]{1,4}:){1,4}((:[0-9a-fA-F]{1,4}){1,3}|:)|([0-9a-fA-F]{1,4}:){1,3}((:[0-9a-fA-F]{1,4}){1,4}|:)|([0-9a-fA-F]{1,4}:){1,2}((:[0-9a-fA-F]{1,4}){1,5}|:)|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6}|:)|:((:[0-9a-fA-F]{1,4}){1,7}|:)$
 ]]; then
                 ^---------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
                                                                                
                                                                                
                                                        ^---------^ SC2250 
(style): Prefer putting braces around variable references even when not 
strictly required.
   
   Did you mean: 
           if [[ ${FE_SERVERS} =~ 
^.+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4}(,.+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4})*$
 || ${FE_SERVERS} =~ 
^([0-9a-fA-F]{1,4}:){7,7}([0-9a-fA-F]{1,4}|:)|([0-9a-fA-F]{1,4}:){1,6}(:[0-9a-fA-F]{1,4}|:)|([0-9a-fA-F]{1,4}:){1,5}((:[0-9a-fA-F]{1,4}){1,2}|:)|([0-9a-fA-F]{1,4}:){1,4}((:[0-9a-fA-F]{1,4}){1,3}|:)|([0-9a-fA-F]{1,4}:){1,3}((:[0-9a-fA-F]{1,4}){1,4}|:)|([0-9a-fA-F]{1,4}:){1,2}((:[0-9a-fA-F]{1,4}){1,5}|:)|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6}|:)|:((:[0-9a-fA-F]{1,4}){1,7}|:)$
 ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 80:
               doris_warn "FE_SERVERS" $FE_SERVERS
                                       ^---------^ SC2086 (info): Double quote 
to prevent globbing and word splitting.
                                       ^---------^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
               doris_warn "FE_SERVERS" "$FE_SERVERS"
   
   
   In docker/runtime/fe/resource/init_fe.sh line 84:
           if [[ $FE_ID =~ ^[1-9]{1}$ ]]; then
                 ^----^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
           if [[ ${FE_ID} =~ ^[1-9]{1}$ ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 85:
               doris_warn "FE_ID" $FE_ID
                                  ^----^ SC2086 (info): Double quote to prevent 
globbing and word splitting.
                                  ^----^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
               doris_warn "FE_ID" "$FE_ID"
   
   
   In docker/runtime/fe/resource/init_fe.sh line 91:
       doris_note $FE_MASTER_IP "  " $FE_MASTER_PORT "  " $FE_CURRENT_IP "  " 
$FE_CURRENT_PORT
                  ^-----------^ SC2086 (info): Double quote to prevent globbing 
and word splitting.
                  ^-----------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
                                     ^-------------^ SC2086 (info): Double 
quote to prevent globbing and word splitting.
                                     ^-------------^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
                                                          ^------------^ SC2086 
(info): Double quote to prevent globbing and word splitting.
                                                          ^------------^ SC2250 
(style): Prefer putting braces around variable references even when not 
strictly required.
                                                                              
^--------------^ SC2086 (info): Double quote to prevent globbing and word 
splitting.
                                                                              
^--------------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
       doris_note "$FE_MASTER_IP" "  " $FE_MASTER_PORT "  " $FE_CURRENT_IP "  " 
$FE_CURRENT_PORT
   
   
   In docker/runtime/fe/resource/init_fe.sh line 92:
       if [[ -n "$FE_MASTER_IP" && -n "$FE_MASTER_PORT" && -n "$FE_CURRENT_IP" 
&& -n "$FE_CURRENT_PORT" ]]; then
                 ^-----------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
                                       ^-------------^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
                                                               ^------------^ 
SC2250 (style): Prefer putting braces around variable references even when not 
strictly required.
                                                                                
      ^--------------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
       if [[ -n "${FE_MASTER_IP}" && -n "${FE_MASTER_PORT}" && -n 
"${FE_CURRENT_IP}" && -n "${FE_CURRENT_PORT}" ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 94:
           if [[ $FE_MASTER_IP =~ 
^[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}$ || 
$FE_MASTER_IP =~ 
^([0-9a-fA-F]{1,4}:){7,7}([0-9a-fA-F]{1,4}|:)|([0-9a-fA-F]{1,4}:){1,6}(:[0-9a-fA-F]{1,4}|:)|([0-9a-fA-F]{1,4}:){1,5}((:[0-9a-fA-F]{1,4}){1,2}|:)|([0-9a-fA-F]{1,4}:){1,4}((:[0-9a-fA-F]{1,4}){1,3}|:)|([0-9a-fA-F]{1,4}:){1,3}((:[0-9a-fA-F]{1,4}){1,4}|:)|([0-9a-fA-F]{1,4}:){1,2}((:[0-9a-fA-F]{1,4}){1,5}|:)|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6}|:)|:((:[0-9a-fA-F]{1,4}){1,7}|:)$
 ]]; then
                 ^-----------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
                                                                                
                       ^-----------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
           if [[ ${FE_MASTER_IP} =~ 
^[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}$ || 
${FE_MASTER_IP} =~ 
^([0-9a-fA-F]{1,4}:){7,7}([0-9a-fA-F]{1,4}|:)|([0-9a-fA-F]{1,4}:){1,6}(:[0-9a-fA-F]{1,4}|:)|([0-9a-fA-F]{1,4}:){1,5}((:[0-9a-fA-F]{1,4}){1,2}|:)|([0-9a-fA-F]{1,4}:){1,4}((:[0-9a-fA-F]{1,4}){1,3}|:)|([0-9a-fA-F]{1,4}:){1,3}((:[0-9a-fA-F]{1,4}){1,4}|:)|([0-9a-fA-F]{1,4}:){1,2}((:[0-9a-fA-F]{1,4}){1,5}|:)|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6}|:)|:((:[0-9a-fA-F]{1,4}){1,7}|:)$
 ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 95:
               doris_warn "FE_MASTER_IP" $FE_MASTER_IP
                                         ^-----------^ SC2086 (info): Double 
quote to prevent globbing and word splitting.
                                         ^-----------^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
               doris_warn "FE_MASTER_IP" "$FE_MASTER_IP"
   
   
   In docker/runtime/fe/resource/init_fe.sh line 99:
           if [[ $FE_MASTER_PORT =~ ^[1-6]{0,1}[0-9]{1,4}$ ]]; then
                 ^-------------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
           if [[ ${FE_MASTER_PORT} =~ ^[1-6]{0,1}[0-9]{1,4}$ ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 100:
               doris_warn "FE_MASTER_PORT" $FE_MASTER_PORT
                                           ^-------------^ SC2086 (info): 
Double quote to prevent globbing and word splitting.
                                           ^-------------^ SC2250 (style): 
Prefer putting braces around variable references even when not strictly 
required.
   
   Did you mean: 
               doris_warn "FE_MASTER_PORT" "$FE_MASTER_PORT"
   
   
   In docker/runtime/fe/resource/init_fe.sh line 104:
           if [[ $FE_CURRENT_IP =~ 
^[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}$ || 
$FE_CURRENT_IP =~ 
^([0-9a-fA-F]{1,4}:){7,7}([0-9a-fA-F]{1,4}|:)|([0-9a-fA-F]{1,4}:){1,6}(:[0-9a-fA-F]{1,4}|:)|([0-9a-fA-F]{1,4}:){1,5}((:[0-9a-fA-F]{1,4}){1,2}|:)|([0-9a-fA-F]{1,4}:){1,4}((:[0-9a-fA-F]{1,4}){1,3}|:)|([0-9a-fA-F]{1,4}:){1,3}((:[0-9a-fA-F]{1,4}){1,4}|:)|([0-9a-fA-F]{1,4}:){1,2}((:[0-9a-fA-F]{1,4}){1,5}|:)|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6}|:)|:((:[0-9a-fA-F]{1,4}){1,7}|:)$
 ]]; then
                 ^------------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
                                                                                
                        ^------------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
           if [[ ${FE_CURRENT_IP} =~ 
^[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}$ || 
${FE_CURRENT_IP} =~ 
^([0-9a-fA-F]{1,4}:){7,7}([0-9a-fA-F]{1,4}|:)|([0-9a-fA-F]{1,4}:){1,6}(:[0-9a-fA-F]{1,4}|:)|([0-9a-fA-F]{1,4}:){1,5}((:[0-9a-fA-F]{1,4}){1,2}|:)|([0-9a-fA-F]{1,4}:){1,4}((:[0-9a-fA-F]{1,4}){1,3}|:)|([0-9a-fA-F]{1,4}:){1,3}((:[0-9a-fA-F]{1,4}){1,4}|:)|([0-9a-fA-F]{1,4}:){1,2}((:[0-9a-fA-F]{1,4}){1,5}|:)|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6}|:)|:((:[0-9a-fA-F]{1,4}){1,7}|:)$
 ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 105:
               doris_warn "FE_CURRENT_IP" $FE_CURRENT_IP
                                          ^------------^ SC2086 (info): Double 
quote to prevent globbing and word splitting.
                                          ^------------^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
               doris_warn "FE_CURRENT_IP" "$FE_CURRENT_IP"
   
   
   In docker/runtime/fe/resource/init_fe.sh line 109:
           if [[ $FE_CURRENT_PORT =~ ^[1-6]{0,1}[0-9]{1,4}$ ]]; then
                 ^--------------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
           if [[ ${FE_CURRENT_PORT} =~ ^[1-6]{0,1}[0-9]{1,4}$ ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 110:
               doris_warn "FE_CURRENT_PORT" $FE_CURRENT_PORT
                                            ^--------------^ SC2086 (info): 
Double quote to prevent globbing and word splitting.
                                            ^--------------^ SC2250 (style): 
Prefer putting braces around variable references even when not strictly 
required.
   
   Did you mean: 
               doris_warn "FE_CURRENT_PORT" "$FE_CURRENT_PORT"
   
   
   In docker/runtime/fe/resource/init_fe.sh line 131:
       if [ $RUN_TYPE == "ELECTION" ]; then
          ^-------------------------^ SC2292 (style): Prefer [[ ]] over [ ] for 
tests in Bash/Ksh.
            ^-------^ SC2248 (style): Prefer double quoting even when variables 
don't contain special characters.
            ^-------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
       if [[ "$RUN_TYPE" == "ELECTION" ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 132:
           local feServerArray=($(echo "${FE_SERVERS}" | awk '{gsub (/,/," "); 
print $0}'))
                                ^-- SC2207 (warning): Prefer mapfile or read -a 
to split command output (or quote to avoid splitting).
   
   
   In docker/runtime/fe/resource/init_fe.sh line 139:
               check_arg "TMP_FE_NAME" $tmpFeName
                                       ^--------^ SC2086 (info): Double quote 
to prevent globbing and word splitting.
                                       ^--------^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
               check_arg "TMP_FE_NAME" "$tmpFeName"
   
   
   In docker/runtime/fe/resource/init_fe.sh line 140:
               feIpArray[$tmpFeName]=${tmpFeIp}
                         ^--------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
               feIpArray[${tmpFeName}]=${tmpFeIp}
   
   
   In docker/runtime/fe/resource/init_fe.sh line 141:
               check_arg "TMP_FE_EDIT_LOG_PORT" $tmpFeEditLogPort
                                                ^---------------^ SC2086 
(info): Double quote to prevent globbing and word splitting.
                                                ^---------------^ SC2250 
(style): Prefer putting braces around variable references even when not 
strictly required.
   
   Did you mean: 
               check_arg "TMP_FE_EDIT_LOG_PORT" "$tmpFeEditLogPort"
   
   
   In docker/runtime/fe/resource/init_fe.sh line 142:
               feEditLogPortArray[$tmpFeName]=${tmpFeEditLogPort}
                                  ^--------^ SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
               feEditLogPortArray[${tmpFeName}]=${tmpFeEditLogPort}
   
   
   In docker/runtime/fe/resource/init_fe.sh line 146:
           check_arg "MASTER_FE_IP" $MASTER_FE_IP
                                    ^-----------^ SC2086 (info): Double quote 
to prevent globbing and word splitting.
                                    ^-----------^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
           check_arg "MASTER_FE_IP" "$MASTER_FE_IP"
   
   
   In docker/runtime/fe/resource/init_fe.sh line 148:
           check_arg "MASTER_FE_EDIT_PORT" $MASTER_FE_EDIT_PORT
                                           ^------------------^ SC2086 (info): 
Double quote to prevent globbing and word splitting.
                                           ^------------------^ SC2250 (style): 
Prefer putting braces around variable references even when not strictly 
required.
   
   Did you mean: 
           check_arg "MASTER_FE_EDIT_PORT" "$MASTER_FE_EDIT_PORT"
   
   
   In docker/runtime/fe/resource/init_fe.sh line 150:
           check_arg "CURRENT_FE_IP" $CURRENT_FE_IP
                                     ^------------^ SC2086 (info): Double quote 
to prevent globbing and word splitting.
                                     ^------------^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
           check_arg "CURRENT_FE_IP" "$CURRENT_FE_IP"
   
   
   In docker/runtime/fe/resource/init_fe.sh line 152:
           check_arg "CURRENT_FE_EDIT_PORT" $CURRENT_FE_EDIT_PORT
                                            ^-------------------^ SC2086 
(info): Double quote to prevent globbing and word splitting.
                                            ^-------------------^ SC2250 
(style): Prefer putting braces around variable references even when not 
strictly required.
   
   Did you mean: 
           check_arg "CURRENT_FE_EDIT_PORT" "$CURRENT_FE_EDIT_PORT"
   
   
   In docker/runtime/fe/resource/init_fe.sh line 154:
           if [ ${MASTER_FE_IP} == ${CURRENT_FE_IP} ]; then
              ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
                ^-------------^ SC2086 (info): Double quote to prevent globbing 
and word splitting.
                                   ^--------------^ SC2086 (info): Double quote 
to prevent globbing and word splitting.
   
   Did you mean: 
           if [[ "${MASTER_FE_IP}" == "${CURRENT_FE_IP}" ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 161:
           check_arg "PRIORITY_NETWORKS" $PRIORITY_NETWORKS
                                         ^----------------^ SC2086 (info): 
Double quote to prevent globbing and word splitting.
                                         ^----------------^ SC2250 (style): 
Prefer putting braces around variable references even when not strictly 
required.
   
   Did you mean: 
           check_arg "PRIORITY_NETWORKS" "$PRIORITY_NETWORKS"
   
   
   In docker/runtime/fe/resource/init_fe.sh line 169:
       elif [ $RUN_TYPE == "ASSIGN" ]; then
            ^-----------------------^ SC2292 (style): Prefer [[ ]] over [ ] for 
tests in Bash/Ksh.
              ^-------^ SC2248 (style): Prefer double quoting even when 
variables don't contain special characters.
              ^-------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
       elif [[ "$RUN_TYPE" == "ASSIGN" ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 171:
           check_arg "MASTER_FE_IP" $MASTER_FE_IP
                                    ^-----------^ SC2086 (info): Double quote 
to prevent globbing and word splitting.
                                    ^-----------^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
           check_arg "MASTER_FE_IP" "$MASTER_FE_IP"
   
   
   In docker/runtime/fe/resource/init_fe.sh line 173:
           check_arg "MASTER_FE_EDIT_PORT" $MASTER_FE_EDIT_PORT
                                           ^------------------^ SC2086 (info): 
Double quote to prevent globbing and word splitting.
                                           ^------------------^ SC2250 (style): 
Prefer putting braces around variable references even when not strictly 
required.
   
   Did you mean: 
           check_arg "MASTER_FE_EDIT_PORT" "$MASTER_FE_EDIT_PORT"
   
   
   In docker/runtime/fe/resource/init_fe.sh line 175:
           check_arg "CURRENT_FE_IP" $CURRENT_FE_IP
                                     ^------------^ SC2086 (info): Double quote 
to prevent globbing and word splitting.
                                     ^------------^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
           check_arg "CURRENT_FE_IP" "$CURRENT_FE_IP"
   
   
   In docker/runtime/fe/resource/init_fe.sh line 177:
           check_arg "CURRENT_FE_EDIT_PORT" $CURRENT_FE_EDIT_PORT
                                            ^-------------------^ SC2086 
(info): Double quote to prevent globbing and word splitting.
                                            ^-------------------^ SC2250 
(style): Prefer putting braces around variable references even when not 
strictly required.
   
   Did you mean: 
           check_arg "CURRENT_FE_EDIT_PORT" "$CURRENT_FE_EDIT_PORT"
   
   
   In docker/runtime/fe/resource/init_fe.sh line 179:
           if [ ${MASTER_FE_IP} == ${CURRENT_FE_IP} ]; then
              ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
                ^-------------^ SC2086 (info): Double quote to prevent globbing 
and word splitting.
                                   ^--------------^ SC2086 (info): Double quote 
to prevent globbing and word splitting.
   
   Did you mean: 
           if [[ "${MASTER_FE_IP}" == "${CURRENT_FE_IP}" ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 186:
           check_arg "PRIORITY_NETWORKS" $PRIORITY_NETWORKS
                                         ^----------------^ SC2086 (info): 
Double quote to prevent globbing and word splitting.
                                         ^----------------^ SC2250 (style): 
Prefer putting braces around variable references even when not strictly 
required.
   
   Did you mean: 
           check_arg "PRIORITY_NETWORKS" "$PRIORITY_NETWORKS"
   
   
   In docker/runtime/fe/resource/init_fe.sh line 196:
       echo "priority_networks = ${1}" >>${DORIS_HOME}/fe/conf/fe.conf
                                         ^-----------^ SC2248 (style): Prefer 
double quoting even when variables don't contain special characters.
   
   Did you mean: 
       echo "priority_networks = ${1}" >>"${DORIS_HOME}"/fe/conf/fe.conf
   
   
   In docker/runtime/fe/resource/init_fe.sh line 203:
       mysql -uroot -P9030 -h${MASTER_FE_IP} --comments "$@" 2>/dev/null
                             ^-------------^ SC2086 (info): Double quote to 
prevent globbing and word splitting.
   
   Did you mean: 
       mysql -uroot -P9030 -h"${MASTER_FE_IP}" --comments "$@" 2>/dev/null
   
   
   In docker/runtime/fe/resource/init_fe.sh line 210:
       if [ ${CURRENT_FE_IS_MASTER} == true ]; then
          ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
            ^---------------------^ SC2248 (style): Prefer double quoting even 
when variables don't contain special characters.
   
   Did you mean: 
       if [[ "${CURRENT_FE_IS_MASTER}" == true ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 217:
           if [[ $register_fe_status == 0 ]]; then
                 ^-----------------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
           if [[ ${register_fe_status} == 0 ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 223:
               if [ -n "$CURRENT_FE_ALREADY_EXISTS" ]; then
                  ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in 
Bash/Ksh.
                        ^------------------------^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
               if [[ -n "${CURRENT_FE_ALREADY_EXISTS}" ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 227:
               if [[ $(($i % 20)) == 1 ]]; then
                        ^-- SC2004 (style): $/${} is unnecessary on arithmetic 
variables.
                        ^-- SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
               if [[ $((${i} % 20)) == 1 ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 232:
           if [[ $(($i % 20)) == 1 ]]; then
                    ^-- SC2004 (style): $/${} is unnecessary on arithmetic 
variables.
                    ^-- SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
           if [[ $((${i} % 20)) == 1 ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 237:
       if ! [[ $is_fe_start ]]; then
               ^----------^ SC2244 (style): Prefer explicit -n to check 
non-empty string (or use =/-ne to check boolean/integer).
               ^----------^ SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
       if ! [[ -n $is_fe_start ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 245:
       if [ -z $2 ]; then
          ^-------^ SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
               ^-- SC2086 (info): Double quote to prevent globbing and word 
splitting.
   
   Did you mean: 
       if [[ -z "$2" ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 274:
               if [[ $(($i % 20)) == 1 ]]; then
                        ^-- SC2004 (style): $/${} is unnecessary on arithmetic 
variables.
                        ^-- SC2250 (style): Prefer putting braces around 
variable references even when not strictly required.
   
   Did you mean: 
               if [[ $((${i} % 20)) == 1 ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 282:
           if [[ $(($i % 20)) == 1 ]]; then
                    ^-- SC2004 (style): $/${} is unnecessary on arithmetic 
variables.
                    ^-- SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
           if [[ $((${i} % 20)) == 1 ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 291:
       if [[ $RUN_TYPE == "K8S" ]]; then
             ^-------^ SC2250 (style): Prefer putting braces around variable 
references even when not strictly required.
   
   Did you mean: 
       if [[ ${RUN_TYPE} == "K8S" ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 297:
           if [ -z "$DATABASE_ALREADY_EXISTS" ]; then
              ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
                    ^----------------------^ SC2250 (style): Prefer putting 
braces around variable references even when not strictly required.
   
   Did you mean: 
           if [[ -z "${DATABASE_ALREADY_EXISTS}" ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 298:
               add_priority_networks $PRIORITY_NETWORKS
                                     ^----------------^ SC2086 (info): Double 
quote to prevent globbing and word splitting.
                                     ^----------------^ SC2250 (style): Prefer 
putting braces around variable references even when not strictly required.
   
   Did you mean: 
               add_priority_networks "$PRIORITY_NETWORKS"
   
   
   In docker/runtime/fe/resource/init_fe.sh line 305:
           if [ $CURRENT_FE_IS_MASTER == true ]; then
              ^-- SC2292 (style): Prefer [[ ]] over [ ] for tests in Bash/Ksh.
                ^-------------------^ SC2248 (style): Prefer double quoting 
even when variables don't contain special characters.
                ^-------------------^ SC2250 (style): Prefer putting braces 
around variable references even when not strictly required.
   
   Did you mean: 
           if [[ "$CURRENT_FE_IS_MASTER" == true ]]; then
   
   
   In docker/runtime/fe/resource/init_fe.sh line 308:
               start_fe.sh --helper ${MASTER_FE_IP}:${MASTER_FE_EDIT_PORT}
                                    ^-------------^ SC2086 (info): Double quote 
to prevent globbing and word splitting.
                                                    ^--------------------^ 
SC2086 (info): Double quote to prevent globbing and word splitting.
   
   Did you mean: 
               start_fe.sh --helper "${MASTER_FE_IP}":"${MASTER_FE_EDIT_PORT}"
   
   For more information:
     https://www.shellcheck.net/wiki/SC1090 -- ShellCheck can't follow 
non-const...
     https://www.shellcheck.net/wiki/SC2034 -- BUILD_TYPE_K8S appears unused. 
Ve...
     https://www.shellcheck.net/wiki/SC2154 -- BE_ADDR is referenced but not 
ass...
   ----------
   
   You can address the above issues in one of three ways:
   1. Manually correct the issue in the offending shell script;
   2. Disable specific issues by adding the comment:
     # shellcheck disable=NNNN
   above the line that contains the issue, where NNNN is the error code;
   3. Add '-e NNNN' to the SHELLCHECK_OPTS setting in your .yml action file.
   
   
   
   ```
   </details>
   
   <details>
   <summary>shfmt errors</summary>
   
   ```
   
   'shfmt ' returned error 1 finding the following formatting issues:
   
   ----------
   --- docker/runtime/be/resource/init_be.sh.orig
   +++ docker/runtime/be/resource/init_be.sh
   @@ -28,194 +28,194 @@
    #    ie: doris_warn "task may be risky!"
    #   out: 2023-01-08T19:08:16+08:00 [Warn] [Entrypoint]: task may be risky!
    doris_log() {
   -  local type="$1"
   -  shift
   -  # accept argument string or stdin
   -  local text="$*"
   -  if [ "$#" -eq 0 ]; then text="$(cat)"; fi
   -  local dt="$(date -Iseconds)"
   -  printf '%s [%s] [Entrypoint]: %s\n' "$dt" "$type" "$text"
   +    local type="$1"
   +    shift
   +    # accept argument string or stdin
   +    local text="$*"
   +    if [ "$#" -eq 0 ]; then text="$(cat)"; fi
   +    local dt="$(date -Iseconds)"
   +    printf '%s [%s] [Entrypoint]: %s\n' "$dt" "$type" "$text"
    }
    doris_note() {
   -  doris_log Note "$@"
   +    doris_log Note "$@"
    }
    doris_warn() {
   -  doris_log Warn "$@" >&2
   +    doris_log Warn "$@" >&2
    }
    doris_error() {
   -  doris_log ERROR "$@" >&2
   -  exit 1
   +    doris_log ERROR "$@" >&2
   +    exit 1
    }
    
    # check to see if this file is being run or sourced from another script
    _is_sourced() {
   -  [ "${#FUNCNAME[@]}" -ge 2 ] &&
   -    [ "${FUNCNAME[0]}" = '_is_sourced' ] &&
   -    [ "${FUNCNAME[1]}" = 'source' ]
   +    [ "${#FUNCNAME[@]}" -ge 2 ] &&
   +        [ "${FUNCNAME[0]}" = '_is_sourced' ] &&
   +        [ "${FUNCNAME[1]}" = 'source' ]
    }
    
    docker_setup_env() {
   -  declare -g DATABASE_ALREADY_EXISTS
   -  if [ -d "${DORIS_HOME}/be/storage/data" ]; then
   -    DATABASE_ALREADY_EXISTS='true'
   -  fi
   +    declare -g DATABASE_ALREADY_EXISTS
   +    if [ -d "${DORIS_HOME}/be/storage/data" ]; then
   +        DATABASE_ALREADY_EXISTS='true'
   +    fi
    }
    
    # Check the variables required for startup
    docker_required_variables_env() {
   -  if [[ $FE_SERVERS =~ 
^.+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4}(,.+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4})*$
 ]]; then
   -    doris_warn "FE_SERVERS" $FE_SERVERS
   -  else
   -    doris_error "FE_SERVERS rule error!example: 
\$FE_NAME:\$FE_HOST_IP:\$FE_EDIT_LOG_PORT[,\$FE_NAME:\$FE_HOST_IP:\$FE_EDIT_LOG_PORT]..."
   -  fi
   -  if [[ $BE_ADDR =~ 
^[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4}$
 ]]; then
   -    doris_warn "BE_ADDR" $BE_ADDR
   -  else
   -    doris_error "BE_ADDR rule error!example: 
\$BE_HOST_IP:\$HEARTBEAT_SERVICE_PORT"
   -  fi
   +    if [[ $FE_SERVERS =~ 
^.+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4}(,.+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4})*$
 ]]; then
   +        doris_warn "FE_SERVERS" $FE_SERVERS
   +    else
   +        doris_error "FE_SERVERS rule error!example: 
\$FE_NAME:\$FE_HOST_IP:\$FE_EDIT_LOG_PORT[,\$FE_NAME:\$FE_HOST_IP:\$FE_EDIT_LOG_PORT]..."
   +    fi
   +    if [[ $BE_ADDR =~ 
^[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4}$
 ]]; then
   +        doris_warn "BE_ADDR" $BE_ADDR
   +    else
   +        doris_error "BE_ADDR rule error!example: 
\$BE_HOST_IP:\$HEARTBEAT_SERVICE_PORT"
   +    fi
    }
    
    get_doris_be_args() {
   -  local feServerArray=($(echo "${FE_SERVERS}" | awk '{gsub (/,/," "); print 
$0}'))
   -  for i in "${feServerArray[@]}"; do
   -    val=${i}
   -    val=${val// /}
   -    tmpFeId=$(echo "${val}" | awk -F ':' '{ sub(/fe/, ""); sub(/ /, ""); 
print$1}')
   -    tmpFeIp=$(echo "${val}" | awk -F ':' '{ sub(/ /, ""); print$2}')
   -    tmpFeEditLogPort=$(echo "${val}" | awk -F ':' '{ sub(/ /, ""); 
print$3}')
   -    check_arg "tmpFeIp" $tmpFeIp
   -    feIpArray[$tmpFeId]=${tmpFeIp}
   -    check_arg "tmpFeEditLogPort" $tmpFeEditLogPort
   -    feEditLogPortArray[$tmpFeId]=${tmpFeEditLogPort}
   -  done
   +    local feServerArray=($(echo "${FE_SERVERS}" | awk '{gsub (/,/," "); 
print $0}'))
   +    for i in "${feServerArray[@]}"; do
   +        val=${i}
   +        val=${val// /}
   +        tmpFeId=$(echo "${val}" | awk -F ':' '{ sub(/fe/, ""); sub(/ /, 
""); print$1}')
   +        tmpFeIp=$(echo "${val}" | awk -F ':' '{ sub(/ /, ""); print$2}')
   +        tmpFeEditLogPort=$(echo "${val}" | awk -F ':' '{ sub(/ /, ""); 
print$3}')
   +        check_arg "tmpFeIp" $tmpFeIp
   +        feIpArray[$tmpFeId]=${tmpFeIp}
   +        check_arg "tmpFeEditLogPort" $tmpFeEditLogPort
   +        feEditLogPortArray[$tmpFeId]=${tmpFeEditLogPort}
   +    done
    
   -  declare -g MASTER_FE_IP BE_HOST_IP BE_HEARTBEAT_PORT PRIORITY_NETWORKS
   -  MASTER_FE_IP=${feIpArray[1]}
   -  check_arg "MASTER_FE_IP" $MASTER_FE_IP
   -  BE_HOST_IP=$(echo "${BE_ADDR}" | awk -F ':' '{ sub(/ /, ""); print$1}')
   -  check_arg "BE_HOST_IP" $BE_HOST_IP
   -  BE_HEARTBEAT_PORT=$(echo "${BE_ADDR}" | awk -F ':' '{ sub(/ /, ""); 
print$2}')
   -  check_arg "BE_HEARTBEAT_PORT" $BE_HEARTBEAT_PORT
   +    declare -g MASTER_FE_IP BE_HOST_IP BE_HEARTBEAT_PORT PRIORITY_NETWORKS
   +    MASTER_FE_IP=${feIpArray[1]}
   +    check_arg "MASTER_FE_IP" $MASTER_FE_IP
   +    BE_HOST_IP=$(echo "${BE_ADDR}" | awk -F ':' '{ sub(/ /, ""); print$1}')
   +    check_arg "BE_HOST_IP" $BE_HOST_IP
   +    BE_HEARTBEAT_PORT=$(echo "${BE_ADDR}" | awk -F ':' '{ sub(/ /, ""); 
print$2}')
   +    check_arg "BE_HEARTBEAT_PORT" $BE_HEARTBEAT_PORT
    
   -  PRIORITY_NETWORKS=$(echo "${BE_HOST_IP}" | awk -F '.' 
'{print$1"."$2"."$3".0/24"}')
   -  check_arg "priority_networks" $PRIORITY_NETWORKS
   +    PRIORITY_NETWORKS=$(echo "${BE_HOST_IP}" | awk -F '.' 
'{print$1"."$2"."$3".0/24"}')
   +    check_arg "priority_networks" $PRIORITY_NETWORKS
    
   -  doris_note "feIpArray = ${feIpArray[*]}"
   -  doris_note "feEditLogPortArray = ${feEditLogPortArray[*]}"
   -  doris_note "masterFe = ${feIpArray[1]}:${feEditLogPortArray[1]}"
   -  doris_note "be_addr = ${BE_HOST_IP}:${BE_HEARTBEAT_PORT}"
   -  doris_note "priority_networks = ${PRIORITY_NETWORKS}"
   -  # wait fe start
   -  check_be_status true
   +    doris_note "feIpArray = ${feIpArray[*]}"
   +    doris_note "feEditLogPortArray = ${feEditLogPortArray[*]}"
   +    doris_note "masterFe = ${feIpArray[1]}:${feEditLogPortArray[1]}"
   +    doris_note "be_addr = ${BE_HOST_IP}:${BE_HEARTBEAT_PORT}"
   +    doris_note "priority_networks = ${PRIORITY_NETWORKS}"
   +    # wait fe start
   +    check_be_status true
    }
    
    add_priority_networks() {
   -  doris_note "add priority_networks ${1} to ${DORIS_HOME}/be/conf/be.conf"
   -  echo "priority_networks = ${1}" >>${DORIS_HOME}/be/conf/be.conf
   +    doris_note "add priority_networks ${1} to ${DORIS_HOME}/be/conf/be.conf"
   +    echo "priority_networks = ${1}" >>${DORIS_HOME}/be/conf/be.conf
    }
    
    # Execute sql script, passed via stdin
    # usage: docker_process_sql sql_script
    docker_process_sql() {
   -  set +e
   -  mysql -uroot -P9030 -h${MASTER_FE_IP} --comments "$@" 2>/dev/null
   +    set +e
   +    mysql -uroot -P9030 -h${MASTER_FE_IP} --comments "$@" 2>/dev/null
    }
    
   -node_role_conf(){
   -  if [[ ${NODE_ROLE} == 'computation' ]]; then
   -    doris_note "this node role is computation"
   -    echo "be_node_role=computation" >>${DORIS_HOME}/be/conf/be.conf
   -  else
   -    doris_note "this node role is mix"
   -  fi
   +node_role_conf() {
   +    if [[ ${NODE_ROLE} == 'computation' ]]; then
   +        doris_note "this node role is computation"
   +        echo "be_node_role=computation" >>${DORIS_HOME}/be/conf/be.conf
   +    else
   +        doris_note "this node role is mix"
   +    fi
    }
    
    register_be_to_fe() {
   -  set +e
   -  # check fe status
   -  local is_fe_start=false
   -  for i in {1..300}; do
   -    docker_process_sql <<<"alter system add backend 
'${BE_HOST_IP}:${BE_HEARTBEAT_PORT}'"
   -    register_be_status=$?
   -    if [[ $register_be_status == 0 ]]; then
   -      doris_note "BE successfully registered to FE!"
   -      is_fe_start=true
   -      break
   -    else
   -      check_be_status
   -      if [ -n "$BE_ALREADY_EXISTS" ]; then
   -        doris_warn "Same backend already exists! No need to register again!"
   -        break
   -      fi
   -      if [[ $(( $i % 20 )) == 1 ]]; then
   -          doris_warn "register_be_status: ${register_be_status}"
   -          doris_warn "BE failed registered to FE!"
   -      fi
   +    set +e
   +    # check fe status
   +    local is_fe_start=false
   +    for i in {1..300}; do
   +        docker_process_sql <<<"alter system add backend 
'${BE_HOST_IP}:${BE_HEARTBEAT_PORT}'"
   +        register_be_status=$?
   +        if [[ $register_be_status == 0 ]]; then
   +            doris_note "BE successfully registered to FE!"
   +            is_fe_start=true
   +            break
   +        else
   +            check_be_status
   +            if [ -n "$BE_ALREADY_EXISTS" ]; then
   +                doris_warn "Same backend already exists! No need to 
register again!"
   +                break
   +            fi
   +            if [[ $(($i % 20)) == 1 ]]; then
   +                doris_warn "register_be_status: ${register_be_status}"
   +                doris_warn "BE failed registered to FE!"
   +            fi
   +        fi
   +        if [[ $(($i % 20)) == 1 ]]; then
   +            doris_note "Register BE to FE is failed. retry."
   +        fi
   +        sleep 1
   +    done
   +    if ! [[ $is_fe_start ]]; then
   +        doris_error "Failed to register BE to FE!Tried 30 times!Maybe FE 
Start Failed!"
        fi
   -    if [[ $(( $i % 20 )) == 1 ]]; then
   -      doris_note "Register BE to FE is failed. retry."
   -    fi
   -    sleep 1
   -  done
   -  if ! [[ $is_fe_start ]]; then
   -    doris_error "Failed to register BE to FE!Tried 30 times!Maybe FE Start 
Failed!"
   -  fi
    }
    
    # Check whether the passed parameters are empty to avoid subsequent task 
execution failures. At the same time,
    # enumeration checks can be added, such as checking whether a certain 
parameter appears repeatedly, etc.
    check_arg() {
   -  if [ -z $2 ]; then
   -    doris_error "$1 is null!"
   -  fi
   +    if [ -z $2 ]; then
   +        doris_error "$1 is null!"
   +    fi
    }
    
    check_be_status() {
   -  set +e
   -  for i in {1..300}; do
   -    if [[ $1 == true ]]; then
   -      docker_process_sql <<<"show frontends" | grep 
"[[:space:]]${MASTER_FE_IP}[[:space:]]"
   -    else
   -      docker_process_sql <<<"show backends" | grep 
"[[:space:]]${BE_HOST_IP}[[:space:]]" | grep 
"[[:space:]]${BE_HEARTBEAT_PORT}[[:space:]]"
   -    fi
   -    be_join_status=$?
   -    if [[ "${be_join_status}" == 0 ]]; then
   -      if [[ $1 == true ]]; then
   -        doris_note "MASTER FE is started!"
   -      else
   -        doris_note "Init Check - Verify that BE is registered to FE 
successfully"
   -        BE_ALREADY_EXISTS=true
   -      fi
   -      break
   -    fi
   -    if [[ $(( $i % 20 )) == 1 ]]; then
   -      if [[ $1 == true ]]; then
   -        doris_note "MASTER FE is not started. retry."
   -      else
   -        doris_note "BE is not register. retry."
   -      fi
   -    fi
   -    sleep 1
   -  done
   +    set +e
   +    for i in {1..300}; do
   +        if [[ $1 == true ]]; then
   +            docker_process_sql <<<"show frontends" | grep 
"[[:space:]]${MASTER_FE_IP}[[:space:]]"
   +        else
   +            docker_process_sql <<<"show backends" | grep 
"[[:space:]]${BE_HOST_IP}[[:space:]]" | grep 
"[[:space:]]${BE_HEARTBEAT_PORT}[[:space:]]"
   +        fi
   +        be_join_status=$?
   +        if [[ "${be_join_status}" == 0 ]]; then
   +            if [[ $1 == true ]]; then
   +                doris_note "MASTER FE is started!"
   +            else
   +                doris_note "Init Check - Verify that BE is registered to FE 
successfully"
   +                BE_ALREADY_EXISTS=true
   +            fi
   +            break
   +        fi
   +        if [[ $(($i % 20)) == 1 ]]; then
   +            if [[ $1 == true ]]; then
   +                doris_note "MASTER FE is not started. retry."
   +            else
   +                doris_note "BE is not register. retry."
   +            fi
   +        fi
   +        sleep 1
   +    done
    }
    
    _main() {
   -  docker_setup_env
   -  docker_required_variables_env
   -  get_doris_be_args
   +    docker_setup_env
   +    docker_required_variables_env
   +    get_doris_be_args
    
   -  if [ -z "$DATABASE_ALREADY_EXISTS" ]; then
   -    add_priority_networks $PRIORITY_NETWORKS
   -    node_role_conf
   -  fi
   +    if [ -z "$DATABASE_ALREADY_EXISTS" ]; then
   +        add_priority_networks $PRIORITY_NETWORKS
   +        node_role_conf
   +    fi
    
   -  register_be_to_fe
   -  check_be_status
   -  doris_note "Ready to start BE!"
   -  start_be.sh
   -  exec "$@"
   +    register_be_to_fe
   +    check_be_status
   +    doris_note "Ready to start BE!"
   +    start_be.sh
   +    exec "$@"
    }
    
    if ! _is_sourced; then
   -  _main "$@"
   +    _main "$@"
    fi
   --- docker/runtime/broker/resource/init_broker.sh.orig
   +++ docker/runtime/broker/resource/init_broker.sh
   @@ -28,165 +28,165 @@
    #    ie: doris_warn "task may BROKER risky!"
    #   out: 2023-01-08T19:08:16+08:00 [Warn] [Entrypoint]: task may BROKER 
risky!
    doris_log() {
   -  local type="$1"
   -  shift
   -  # accept argument string or stdin
   -  local text="$*"
   -  if [ "$#" -eq 0 ]; then text="$(cat)"; fi
   -  local dt="$(date -Iseconds)"
   -  printf '%s [%s] [Entrypoint]: %s\n' "$dt" "$type" "$text"
   +    local type="$1"
   +    shift
   +    # accept argument string or stdin
   +    local text="$*"
   +    if [ "$#" -eq 0 ]; then text="$(cat)"; fi
   +    local dt="$(date -Iseconds)"
   +    printf '%s [%s] [Entrypoint]: %s\n' "$dt" "$type" "$text"
    }
    doris_note() {
   -  doris_log Note "$@"
   +    doris_log Note "$@"
    }
    doris_warn() {
   -  doris_log Warn "$@" >&2
   +    doris_log Warn "$@" >&2
    }
    doris_error() {
   -  doris_log ERROR "$@" >&2
   -  exit 1
   +    doris_log ERROR "$@" >&2
   +    exit 1
    }
    
    # check to see if this file is BROKERing run or sourced from another script
    _is_sourced() {
   -  [ "${#FUNCNAME[@]}" -ge 2 ] &&
   -    [ "${FUNCNAME[0]}" = '_is_sourced' ] &&
   -    [ "${FUNCNAME[1]}" = 'source' ]
   +    [ "${#FUNCNAME[@]}" -ge 2 ] &&
   +        [ "${FUNCNAME[0]}" = '_is_sourced' ] &&
   +        [ "${FUNCNAME[1]}" = 'source' ]
    }
    
    # Check the variables required for startup
    docker_required_variables_env() {
   -  if [[ $FE_SERVERS =~ 
^.+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4}(,.+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4})*$
 ]]; then
   -    doris_warn "FE_SERVERS" $FE_SERVERS
   -  else
   -    doris_error "FE_SERVERS rule error!example: 
\$FE_NAME:\$FE_HOST_IP:\$FE_EDIT_LOG_PORT[,\$FE_NAME:\$FE_HOST_IP:\$FE_EDIT_LOG_PORT]..."
   -  fi
   -  if [[ $BROKER_ADDR =~ 
^[a-zA-Z0-9]+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4}$
 ]]; then
   -    doris_warn "BROKER_ADDR" $BROKER_ADDR
   -  else
   -    doris_error "BROKER_ADDR rule error!example: 
\$BROKER_NAME:\$BROKER_HOST_IP:\$BROKER_IPC_PORT"
   -  fi
   +    if [[ $FE_SERVERS =~ 
^.+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4}(,.+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4})*$
 ]]; then
   +        doris_warn "FE_SERVERS" $FE_SERVERS
   +    else
   +        doris_error "FE_SERVERS rule error!example: 
\$FE_NAME:\$FE_HOST_IP:\$FE_EDIT_LOG_PORT[,\$FE_NAME:\$FE_HOST_IP:\$FE_EDIT_LOG_PORT]..."
   +    fi
   +    if [[ $BROKER_ADDR =~ 
^[a-zA-Z0-9]+:[1-2]{0,1}[0-9]{0,1}[0-9]{1}(\.[1-2]{0,1}[0-9]{0,1}[0-9]{1}){3}:[1-6]{0,1}[0-9]{1,4}$
 ]]; then
   +        doris_warn "BROKER_ADDR" $BROKER_ADDR
   +    else
   +        doris_error "BROKER_ADDR rule error!example: 
\$BROKER_NAME:\$BROKER_HOST_IP:\$BROKER_IPC_PORT"
   +    fi
    }
    
    get_doris_broker_args() {
   -  local feServerArray=($(echo "${FE_SERVERS}" | awk '{gsub (/,/," "); print 
$0}'))
   -  for i in "${feServerArray[@]}"; do
   -    val=${i}
   -    val=${val// /}
   -    tmpFeId=$(echo "${val}" | awk -F ':' '{ sub(/fe/, ""); sub(/ /, ""); 
print$1}')
   -    tmpFeIp=$(echo "${val}" | awk -F ':' '{ sub(/ /, ""); print$2}')
   -    tmpFeEditLogPort=$(echo "${val}" | awk -F ':' '{ sub(/ /, ""); 
print$3}')
   -    check_arg "tmpFeIp" $tmpFeIp
   -    feIpArray[$tmpFeId]=${tmpFeIp}
   -    check_arg "tmpFeEditLogPort" $tmpFeEditLogPort
   -    feEditLogPortArray[$tmpFeId]=${tmpFeEditLogPort}
   -  done
   +    local feServerArray=($(echo "${FE_SERVERS}" | awk '{gsub (/,/," "); 
print $0}'))
   +    for i in "${feServerArray[@]}"; do
   +        val=${i}
   +        val=${val// /}
   +        tmpFeId=$(echo "${val}" | awk -F ':' '{ sub(/fe/, ""); sub(/ /, 
""); print$1}')
   +        tmpFeIp=$(echo "${val}" | awk -F ':' '{ sub(/ /, ""); print$2}')
   +        tmpFeEditLogPort=$(echo "${val}" | awk -F ':' '{ sub(/ /, ""); 
print$3}')
   +        check_arg "tmpFeIp" $tmpFeIp
   +        feIpArray[$tmpFeId]=${tmpFeIp}
   +        check_arg "tmpFeEditLogPort" $tmpFeEditLogPort
   +        feEditLogPortArray[$tmpFeId]=${tmpFeEditLogPort}
   +    done
    
   -  declare -g MASTER_FE_IP BROKER_HOST_IP BROKER_IPC_PORT BROKER_NAME
   -  MASTER_FE_IP=${feIpArray[1]}
   -  check_arg "MASTER_FE_IP" $MASTER_FE_IP
   -  BROKER_NAME=$(echo "${BROKER_ADDR}" | awk -F ':' '{ sub(/ /, ""); 
print$1}')
   -  check_arg "BROKER_NAME" $BROKER_NAME
   -  BROKER_HOST_IP=$(echo "${BROKER_ADDR}" | awk -F ':' '{ sub(/ /, ""); 
print$2}')
   -  check_arg "BROKER_HOST_IP" $BROKER_HOST_IP
   -  BROKER_IPC_PORT=$(echo "${BROKER_ADDR}" | awk -F ':' '{ sub(/ /, ""); 
print$3}')
   -  check_arg "BROKER_IPC_PORT" $BROKER_IPC_PORT
   +    declare -g MASTER_FE_IP BROKER_HOST_IP BROKER_IPC_PORT BROKER_NAME
   +    MASTER_FE_IP=${feIpArray[1]}
   +    check_arg "MASTER_FE_IP" $MASTER_FE_IP
   +    BROKER_NAME=$(echo "${BROKER_ADDR}" | awk -F ':' '{ sub(/ /, ""); 
print$1}')
   +    check_arg "BROKER_NAME" $BROKER_NAME
   +    BROKER_HOST_IP=$(echo "${BROKER_ADDR}" | awk -F ':' '{ sub(/ /, ""); 
print$2}')
   +    check_arg "BROKER_HOST_IP" $BROKER_HOST_IP
   +    BROKER_IPC_PORT=$(echo "${BROKER_ADDR}" | awk -F ':' '{ sub(/ /, ""); 
print$3}')
   +    check_arg "BROKER_IPC_PORT" $BROKER_IPC_PORT
    
   -  doris_note "feIpArray = ${feIpArray[*]}"
   -  doris_note "feEditLogPortArray = ${feEditLogPortArray[*]}"
   -  doris_note "masterFe = ${feIpArray[1]}:${feEditLogPortArray[1]}"
   -  doris_note "brokerAddr = 
${BROKER_NAME}:${BROKER_HOST_IP}:${BROKER_IPC_PORT}"
   -  # wait fe start
   -  check_broker_status true
   +    doris_note "feIpArray = ${feIpArray[*]}"
   +    doris_note "feEditLogPortArray = ${feEditLogPortArray[*]}"
   +    doris_note "masterFe = ${feIpArray[1]}:${feEditLogPortArray[1]}"
   +    doris_note "brokerAddr = 
${BROKER_NAME}:${BROKER_HOST_IP}:${BROKER_IPC_PORT}"
   +    # wait fe start
   +    check_broker_status true
    }
    
    # Execute sql script, passed via stdin
    # usage: docker_process_sql sql_script
    docker_process_sql() {
   -  set +e
   -  mysql -uroot -P9030 -h${MASTER_FE_IP} --comments "$@" 2>/dev/null
   +    set +e
   +    mysql -uroot -P9030 -h${MASTER_FE_IP} --comments "$@" 2>/dev/null
    }
    
    # register broker
    register_broker_to_fe() {
   -  set +e
   -  # check fe status
   -  local is_fe_start=false
   -  for i in {1..300}; do
   -    if [[ $(( $i % 20 )) == 1 ]]; then
   -      doris_note "Register BROKER to FE is failed. retry."
   +    set +e
   +    # check fe status
   +    local is_fe_start=false
   +    for i in {1..300}; do
   +        if [[ $(($i % 20)) == 1 ]]; then
   +            doris_note "Register BROKER to FE is failed. retry."
   +        fi
   +        docker_process_sql <<<"alter system add broker ${BROKER_NAME} 
'${BROKER_HOST_IP}:${BROKER_IPC_PORT}'"
   +        register_broker_status=$?
   +        if [[ $register_broker_status == 0 ]]; then
   +            doris_note "BROKER successfully registered to FE!"
   +            is_fe_start=true
   +            break
   +        else
   +            check_broker_status
   +            if [ -n "$BROKER_ALREADY_EXISTS" ]; then
   +                doris_warn "Same backend already exists! No need to 
register again!"
   +                break
   +            fi
   +            if [[ $(($i % 20)) == 1 ]]; then
   +                doris_warn "BROKER failed registered to FE!"
   +            fi
   +        fi
   +        sleep 1
   +    done
   +    if ! [[ $is_fe_start ]]; then
   +        doris_error "Failed to register BROKER to FE!Tried 30 times!MayBe 
FE Start Failed!"
        fi
   -    docker_process_sql <<<"alter system add broker ${BROKER_NAME} 
'${BROKER_HOST_IP}:${BROKER_IPC_PORT}'"
   -    register_broker_status=$?
   -    if [[ $register_broker_status == 0 ]]; then
   -      doris_note "BROKER successfully registered to FE!"
   -      is_fe_start=true
   -      break
   -    else
   -      check_broker_status
   -      if [ -n "$BROKER_ALREADY_EXISTS" ]; then
   -        doris_warn "Same backend already exists! No need to register again!"
   -        break
   -      fi
   -      if [[ $(( $i % 20 )) == 1 ]]; then
   -          doris_warn "BROKER failed registered to FE!"
   -      fi
   -    fi
   -    sleep 1
   -  done
   -  if ! [[ $is_fe_start ]]; then
   -    doris_error "Failed to register BROKER to FE!Tried 30 times!MayBe FE 
Start Failed!"
   -  fi
    }
    
    # Check whether the passed parameters are empty to avoid subsequent task 
execution failures. At the same time,
    # enumeration checks can BROKER added, such as checking whether a certain 
parameter appears repeatedly, etc.
    check_arg() {
   -  if [ -z $2 ]; then
   -    doris_error "$1 is null!"
   -  fi
   +    if [ -z $2 ]; then
   +        doris_error "$1 is null!"
   +    fi
    }
    
    check_broker_status() {
   -  set +e
   -  for i in {1..300}; do
   -    if [[ $1 == true ]]; then
   -      docker_process_sql <<<"show frontends" | grep 
"[[:space:]]${MASTER_FE_IP}[[:space:]]"
   -    else
   -      docker_process_sql <<<"show proc '/brokers'" | grep 
"[[:space:]]${BROKER_HOST_IP}[[:space:]]" | grep 
"[[:space:]]${BROKER_IPC_PORT}[[:space:]]"
   -    fi
   -    broker_join_status=$?
   -    doris_warn "broker_join_status: " $broker_join_status
   -    if [[ "${broker_join_status}" == 0 ]]; then
   -      if [[ $1 == true ]]; then
   -        doris_note "MASTER FE is started!"
   -      else
   -        doris_note "Init Check - Verify that BROKER is registered to FE 
successfully"
   -        BROKER_ALREADY_EXISTS=true
   -      fi
   -      break
   -    fi
   -    if [[ $(( $i % 20 )) == 1 ]]; then
   -      if [[ $1 == true ]]; then
   -        doris_note "MASTER FE is not started. retry."
   -      else
   -        doris_note "BROKER is not register. retry."
   -      fi
   -    fi
   -    sleep 1
   -  done
   +    set +e
   +    for i in {1..300}; do
   +        if [[ $1 == true ]]; then
   +            docker_process_sql <<<"show frontends" | grep 
"[[:space:]]${MASTER_FE_IP}[[:space:]]"
   +        else
   +            docker_process_sql <<<"show proc '/brokers'" | grep 
"[[:space:]]${BROKER_HOST_IP}[[:space:]]" | grep 
"[[:space:]]${BROKER_IPC_PORT}[[:space:]]"
   +        fi
   +        broker_join_status=$?
   +        doris_warn "broker_join_status: " $broker_join_status
   +        if [[ "${broker_join_status}" == 0 ]]; then
   +            if [[ $1 == true ]]; then
   +                doris_note "MASTER FE is started!"
   +            else
   +                doris_note "Init Check - Verify that BROKER is registered 
to FE successfully"
   +                BROKER_ALREADY_EXISTS=true
   +            fi
   +            break
   +        fi
   +        if [[ $(($i % 20)) == 1 ]]; then
   +            if [[ $1 == true ]]; then
   +                doris_note "MASTER FE is not started. retry."
   +            else
   +                doris_note "BROKER is not register. retry."
   +            fi
   +        fi
   +        sleep 1
   +    done
    }
    
    _main() {
   -  docker_required_variables_env
   -  get_doris_broker_args
   -  register_broker_to_fe
   -  check_broker_status
   -  doris_note "Ready to start BROKER!"
   -  start_broker.sh
   -  exec "$@"
   +    docker_required_variables_env
   +    get_doris_broker_args
   +    register_broker_to_fe
   +    check_broker_status
   +    doris_note "Ready to start BROKER!"
   +    start_broker.sh
   +    exec "$@"
    }
    
    if ! _is_sourced; then
   -  _main "$@"
   +    _main "$@"
    fi
   --- docker/runtime/fe/resource/init_fe.sh.orig
   +++ docker/runtime/fe/resource/init_fe.sh
   @@ -122,7 +122,7 @@
                     FE_SERVERS & FE_ID
                     plan 3:
                     FE_MASTER_IP & FE_MASTER_PORT & FE_CURRENT_IP & 
FE_CURRENT_PORT"
   -                EOF
   +    EOF
    
    }
    
   @@ -247,7 +247,6 @@
        fi
    }
    
   -
    check_fe_status() {
        set +e
        declare -g CURRENT_FE_ALREADY_EXISTS
   ----------
   
   You can reformat the above files to meet shfmt's requirements by typing:
   
     shfmt  -w filename
   
   
   ```
   </details>
   
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


Reply via email to