Github user suez1224 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5867#discussion_r182650740
  
    --- Diff: flink-libraries/flink-sql-client/bin/sql-client.sh ---
    @@ -44,20 +44,32 @@ bin=`dirname "$target"`
     . "$bin"/config.sh
     
     if [ "$FLINK_IDENT_STRING" = "" ]; then
    -        FLINK_IDENT_STRING="$USER"
    +    FLINK_IDENT_STRING="$USER"
     fi
     
     CC_CLASSPATH=`constructFlinkClassPath`
     
    +export FLINK_ROOT_DIR
    +export FLINK_CONF_DIR
    +
     
################################################################################
    -# SQL client specific logic
    +# SQL Client CLI specific logic
     
################################################################################
     
    -log=$FLINK_LOG_DIR/flink-$FLINK_IDENT_STRING-sql-client-$HOSTNAME.log
    +log=$FLINK_LOG_DIR/flink-$FLINK_IDENT_STRING-sql-client-cli-$HOSTNAME.log
     log_setting=(-Dlog.file="$log" 
-Dlog4j.configuration=file:"$FLINK_CONF_DIR"/log4j-cli.properties 
-Dlogback.configurationFile=file:"$FLINK_CONF_DIR"/logback.xml)
     
    -export FLINK_ROOT_DIR
    -export FLINK_CONF_DIR
    +if [[ ! ${FLINK_SCC_HEAP} =~ ${IS_NUMBER} ]] || [[ "${FLINK_SCC_HEAP}" -lt 
"0" ]]; then
    +    echo "[ERROR] Configured SQL Client CLI JVM heap size is not a number. 
Please set '${KEY_SCC_MEM_SIZE}' in ${FLINK_CONF_FILE}."
    +    exit 1
    +fi
    +
    +if [ "${FLINK_SCC_HEAP}" -gt "0" ]; then
    +    export JVM_ARGS="$JVM_ARGS -Xms"$FLINK_SCC_HEAP"m 
-Xmx"$FLINK_SCC_HEAP"m"
    --- End diff --
    
    Do we need to inherit $JVM_ARGS here? The JVM_ARGS from config.sh is used 
for the JVMs of JobManager and TaskManagers as suggested in the comment. The 
sql client might inherit some unwanted JVM options.


---

Reply via email to