Support Questions
Find answers, ask questions, and share your expertise

Java version of HDP2.6 conflict?

Expert Contributor

I am trying to use Hive View 2.0 in my cluster (HDP 2.6.0.3 (Ambari 2.5.0.3)) But I get the java.lang.NullPointerException error, and as per this question I have tried everything except checking Java versions.

Can anyone tell me how to check the Java use by HDP/Hive?

And how do I upgrade my java to match?

TIA!

My java:

 java -version
openjdk version "1.8.0_111"
OpenJDK Runtime Environment (build 1.8.0_111-8u111-b14-3~14.04.1-b14)
OpenJDK 64-Bit Server VM (build 25.111-b14, mixed mode)
1 ACCEPTED SOLUTION

Accepted Solutions

Super Mentor

@ed day

Regarding your query "Can anyone tell me how to check the Java use by HDP/Hive?"

You can use the following command to find out which Java Binary it is using .

Example:

# ps -ef | grep ^hive
hive     23474     1  0 Jun02 ?        00:45:46 /usr/jdk64/jdk1.7.0_67/bin/java -Xmx1024m -Dhdp.version=2.5.3.0-37 -Djava.net.preferIPv4Stack=true -Dhdp.version=2.5.3.0-37 -Dhadoop.log.dir=/var/log/hadoop/hive -Dhadoop.log.file=hadoop.log -Dhadoop.home.dir=/usr/hdp/2.5.3.0-37/hadoop -Dhadoop.id.str=hive -Dhadoop.root.logger=INFO,console..........

.

Whatever Java binary path it shows , you can run the version command on it

Example

# /usr/jdk64/jdk1.7.0_67/bin/java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

.

Changing the java version can be achieved as mentioned in ; https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.1.0/bk_ambari-administration/content/ch_changin...

View solution in original post

4 REPLIES 4

Super Mentor

@ed day

Regarding your query "Can anyone tell me how to check the Java use by HDP/Hive?"

You can use the following command to find out which Java Binary it is using .

Example:

# ps -ef | grep ^hive
hive     23474     1  0 Jun02 ?        00:45:46 /usr/jdk64/jdk1.7.0_67/bin/java -Xmx1024m -Dhdp.version=2.5.3.0-37 -Djava.net.preferIPv4Stack=true -Dhdp.version=2.5.3.0-37 -Dhadoop.log.dir=/var/log/hadoop/hive -Dhadoop.log.file=hadoop.log -Dhadoop.home.dir=/usr/hdp/2.5.3.0-37/hadoop -Dhadoop.id.str=hive -Dhadoop.root.logger=INFO,console..........

.

Whatever Java binary path it shows , you can run the version command on it

Example

# /usr/jdk64/jdk1.7.0_67/bin/java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

.

Changing the java version can be achieved as mentioned in ; https://docs.hortonworks.com/HDPDocuments/Ambari-2.5.1.0/bk_ambari-administration/content/ch_changin...

View solution in original post

Expert Contributor

Thanks, very helpful! the Hive is 112 as opposed to 111. Does that sound like it would be a problem?

Expert Contributor

Actually presumably hive can't find the 112 version, hence the error. I updated to 112 but the error is still there 😞

Expert Contributor

Support Martrix for HDP 2.6 is JDK 1.8+ as below.

https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.0/bk_support-matrices/content/ch_matrices-hdp...

Taable 2.2. HDP 2.6.0 JDK Support
JDKVersionOpen SourceJDK8†
OracleJDK 8
JDK7† , deprecated
JDK 7, deprecated

Please update exactly when you getting this error, it give more clarity ?.

Up-grading the jave version is not the solution .