It seems a simple task: change
/etc/hadoop/conf/hadoop-env.sh to use a different version of Java.
However, Ambari will, it seems, overwrite any changes you make in the hadoop-env.sh, by using it's templating scheme.
The template seems to contain following line:
So, now if this is used to generate and replace the environment on each node, how do I define the