Setting the Java executable for the Flink client

You must set the Java_home environment through the command line for the Flink clients manually to avoid error when using Flink. The configuration in Cloudera Manager only applies to services, and not to clients.

Cloudera Manager offers a configuration for the JAVA_HOME environment variable under Hosts > All Hosts > Configuration. However, this only applies to services (for example YARN NodeManager or Flink HistoryServer) and does not propagate to clients such as the JVM created locally by the Flink executable. JVM uses the Bigtop utility under /usr/bin/bigtop-detect-javahome to automatically detect the JAVA_HOME.

Set JAVA_HOME to a fixed value:
> cat /etc/default/bigtop-utils
export JAVA_HOME=/usr/java/default