Setting the Java executable for the Flink client

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