Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Change JAVA version for Spark on YARN

Change JAVA version for Spark on YARN

I have installed JAVA 8 on all the servers and changed JAVA HOME DIRECTORY for hosts to point to JAVA 8. But when I start spark-shell it always used JAVA 7. Is there a way to force it to use java 8?



Re: Change JAVA version for Spark on YARN

Master Guru

The CM configuration for JAVA HOME (under CM -> Hosts -> Configuration page) does not cover client tools and commands currently.


You will need an explicit JAVA_HOME in your environment pointing to Java 8, or the symlink of /usr/java/latest and /usr/java/default pointing to Java 8 home directories to make the client programs run the newer JDK.



~> JAVA_HOME=/usr/java/jdk1.8.0_66/ spark-shell
Don't have an account?
Coming from Hortonworks? Activate your account here