Created 06-07-2017 07:32 AM
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)
Created 06-07-2017 07:39 AM
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...
Created 06-07-2017 07:39 AM
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...
Created 06-07-2017 09:18 AM
Thanks, very helpful! the Hive is 112 as opposed to 111. Does that sound like it would be a problem?
Created 06-07-2017 09:22 AM
Actually presumably hive can't find the 112 version, hence the error. I updated to 112 but the error is still there 😞
Created 06-07-2017 07:48 AM
Support Martrix for HDP 2.6 is JDK 1.8+ as below.
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 .