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

Support env.java.opts.all & env.java.opts.cli config for starting Session cluster CLIs

    XMLWordPrintableJSON

Details

    Description

      Problem

      The following configs are supposed to be supported:

      env.java.opts.all
      (none) String Java options to start the JVM of all Flink processes with.
      env.java.opts.client
      (none) String Java options to start the JVM of the Flink Client with.

      However, the two configs do not take effect for starting Flink session clusters using kubernetes-session.sh and yarn-session.sh. This can lead to problems in complex production envs. For example, in my company, some nodes are IPv6-only, and the connection between Flink client and K8s/YARN control plane is via a domain name whose backend is on IPv4/v6 dual stack, and the JVM arg -Djava.net.preferIPv6Addresses=true needs to be set to make Java connect to IPv6 addresses in favor of IPv4 ones otherwise the K8s/YARN control plane is inaccessible.

       

      Proposal

      The fix is straight-forward, simply apply the following changes to the session scripts:

      `
      FLINK_ENV_JAVA_OPTS="${FLINK_ENV_JAVA_OPTS} ${FLINK_ENV_JAVA_OPTS_CLI}"
      exec $JAVA_RUN $JVM_ARGS $FLINK_ENV_JAVA_OPTS xxx
      `

      Attachments

        Issue Links

          Activity

            People

              Zhanghao Chen Zhanghao Chen
              Zhanghao Chen Zhanghao Chen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: