Hive Internal Error: java.lang.ClassNotFoundException(org.apache.atlas.hive.hook.HiveHook)
Asked Answered
C

4

8

I am running a hive query throwh oozie using hue..
I am creating a table through hue-oozie work flow...
My job is failing but when I check in hive the table is created.
Log shows below error:

16157 [main] INFO  org.apache.hadoop.hive.ql.hooks.ATSHook  - Created ATS Hook
2015-09-24 11:05:35,801 INFO  [main] hooks.ATSHook (ATSHook.java:<init>(84)) - Created ATS Hook
16159 [main] ERROR org.apache.hadoop.hive.ql.Driver  - hive.exec.post.hooks Class not found:org.apache.atlas.hive.hook.HiveHook
2015-09-24 11:05:35,803 ERROR [main] ql.Driver (SessionState.java:printError(960)) - hive.exec.post.hooks Class not found:org.apache.atlas.hive.hook.HiveHook
16159 [main] ERROR org.apache.hadoop.hive.ql.Driver  - FAILED: Hive Internal Error: java.lang.ClassNotFoundException(org.apache.atlas.hive.hook.HiveHook)
java.lang.ClassNotFoundException: org.apache.atlas.hive.hook.HiveHook
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)   

Not able to identify the issue....
I am usig HDP 2.3.1

Chromium answered 24/9, 2015 at 11:14 Comment(0)
C
8

Basically this error is due to missing atlas jar in oozie share lib. In HDP the Atlas jar is available in /usr/hdp/2.3.0.0-2557/atlas/ Put all the jars related to atlas in hadoop share lib ..

hadoop fs -put /usr/hdp/2.3.0.0-2557/atlas/hook/hive/* /user/oozie/share/lib/lib200344/hive 

Add 'export HIVE_AUX_JARS_PATH=<atlas package>/hook/hive' in hive-env.sh .
Copy <atlas package>/conf/application.propertiesto hive conf directory.

Restart the oozie services. This will solve this problem. If anybody face the problem please comment here so that I can help.

[Comment by Immo Huneke: when using the Hortonworks sandbox VM, I found that just putting the jar files in the share/lib folder under HDFS was enough to resolve the problem. I didn't have to update hive-env.sh or copy the application.properties file. But check the exact path of your share/lib folder by executing the command hdfs dfs -ls /user/oozie/share/lib before copying.]

Chromium answered 28/9, 2015 at 14:1 Comment(0)
S
3

hive>add jar /usr/hdp//atlas/hook/hive/hive-bridge-${VERSION}.jar

it will be ok.

hope help for u.

Seritaserjeant answered 2/11, 2015 at 2:55 Comment(1)
Thanks ..I already did the same thing..and worked out for me..please find the below answer..Chromium
A
1

It Seems You CLASS is not found exception.

Have you installed Oozie Sharedlib, if Yes, please update all the hive dependent Jar in the sharedLib Location, and check if the status

Also check if Hive Client is available in all the Nodes under the cluster and same should be running

Apology answered 25/9, 2015 at 6:40 Comment(1)
Yes.I have updated all the jars which is not there..still having same issueChromium
S
1

​I tried each and every possible solution mentioned in this forum and in stackoverflow, but it did not resolve my issue. Finally, I resolved it by copying all the jars in /hook/hive to lib (create a new lib folder at job.properties level) folder of my oozie workflow

Schouten answered 26/5, 2016 at 20:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.