Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-25762

Native k8s- User defined system properties get overriden when cluster is deployed

    XMLWordPrintableJSON

Details

    • Hide
      exec command order changed

      From:

      exec "$JAVA_RUN" $JVM_ARGS ${FLINK_ENV_JAVA_OPTS} "${log_setting[@]}" -classpath "`manglePathList "$FLINK_TM_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS"`" ${CLASS_TO_RUN} "${ARGS[@]}"

      To

      exec "$JAVA_RUN" $JVM_ARGS "${log_setting[@]}" "${FLINK_ENV_JAVA_OPTS}" -classpath "`manglePathList "$FLINK_TM_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS"`" ${CLASS_TO_RUN} "${ARGS[@]}"
      Show
      exec command order changed From: exec "$JAVA_RUN" $JVM_ARGS ${FLINK_ENV_JAVA_OPTS} "${log_setting[@]}" -classpath "`manglePathList "$FLINK_TM_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS"`" ${CLASS_TO_RUN} "${ARGS[@]}" To exec "$JAVA_RUN" $JVM_ARGS "${log_setting[@]}" "${FLINK_ENV_JAVA_OPTS}" -classpath "`manglePathList "$FLINK_TM_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS"`" ${CLASS_TO_RUN} "${ARGS[@]}"

    Description

      Running Flink 1.14.2 in native k8s mode, User defined system properties get ignores. i.e,  -Dlog4j.configurationFile, it falls back to /opt/flink/conf/log4j-console.properties.

      That happens due to the order of exec command provided in flink-console.sh file.

      https://github.com/apache/flink/blob/release-1.14.2/flink-dist/src/main/flink-bin/bin/flink-console.sh#L114

      exec "$JAVA_RUN" $JVM_ARGS ${FLINK_ENV_JAVA_OPTS} "${log_setting[@]}" -classpath "`manglePathList "$FLINK_TM_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS"`" ${CLASS_TO_RUN} "${ARGS[@]}"

      Apart from logging, All user defined properties(FLINK_ENV_JAVA_OPTS) might get overriden by other args.

      Discussion

      https://lists.apache.org/thread/b24g1nd00q5pln5h9w2mh1s3ocxwb61b

      Attachments

        1. log.png
          35 kB
          Tamir Sagi
        2. stacktrace.png
          228 kB
          Tamir Sagi

        Issue Links

          Activity

            People

              tamirsagi Tamir Sagi
              tamirsagi Tamir Sagi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 24h
                  24h
                  Remaining:
                  Remaining Estimate - 24h
                  24h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified