Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

hive.exec.post.hooks Class not found:org.apache.atlas.hive.hook.HiveHook FAILED: Hive Internal Error: java.lang.ClassNotFoundException(org.apache.atlas.hive.hook.HiveHook)

avatar
Guru

Hi Team,

My hive action with oozie is failing with below error.

hive.exec.post.hooks Class not found:org.apache.atlas.hive.hook.HiveHook FAILED: Hive Internal Error: java.lang.ClassNotFoundException(org.apache.atlas.hive.hook.HiveHook)

Please note that this error started after upgrade only from 2.2 to 2.3.

I have implemented below solution as well but still getting error, can anyone please help me to get it resolve.

http://stackoverflow.com/questions/32759933/hive-internal-error-java-lang-classnotfoundexceptionorg-...

1 ACCEPTED SOLUTION

avatar
Master Guru

@Saurabh

I have resolved this kind of error for multiple customers by following below steps:

#Command 1:

hadoop fs -put /usr/hdp/current/atlas-server/hook/hive/* hdfs://<NN>/user/oozie/share/lib/lib_<Timestamp>/hive/ 

#Command 2(Please run below command on Oozie server as 'oozie' user):

oozie admin -oozie http://<oozie-server:11000/oozie -sharelibupdate 

Re-run your Oozie workflow, It should succeed without any issue.

Hope this helps!

Note - Update Oozie sharelib part is missing in the stackoverflow's answer.

View solution in original post

7 REPLIES 7

avatar
Master Guru

One quick fix is to remove the Atlas Hook from the hive-site.xml

Find all the hook parameters ( below is the post hook ) and remove the Atlas class from this.

hive.exec.post.hooks

Or do you want to use Atlas? In that case adding the atlas libraries to shared should help. Did you restart oozie after adding the libraries to the shared folder?

You can also check in the output of the hive action if he actually put the atlas jars into the execution directory of the action.

avatar
Guru

@Benjamin Leonhardi: You mean remove from hive_env.sh file ?

avatar
Master Guru

No from the hive.xxx.hooks parameters in the hive-site.xml. They define hooks. If atlas is not added there he doesn't even look for the class ( because the hook is never called )

avatar
Master Mentor

I can almost guarantee you need this oozie.action.sharelib.for.hive=pig,hcatalog,atlas,hive

It's a guess but knowing all oozie pain points I have a good feeling. Make sure atlas is in sharelib. That would also explain that it worked before as Atlas was added recently to our stack.

avatar
Master Mentor

avatar
Guru

@Artem Ervits: I have added oozie.action.sharelib.for.hive = hive,hcatalog,sqoop but still getting same error.

And when I removed atlas property then it is working fine. But now other user's jobs are failing which are dependent on atlas. So not understanding where is the root cause.

avatar
Master Guru

@Saurabh

I have resolved this kind of error for multiple customers by following below steps:

#Command 1:

hadoop fs -put /usr/hdp/current/atlas-server/hook/hive/* hdfs://<NN>/user/oozie/share/lib/lib_<Timestamp>/hive/ 

#Command 2(Please run below command on Oozie server as 'oozie' user):

oozie admin -oozie http://<oozie-server:11000/oozie -sharelibupdate 

Re-run your Oozie workflow, It should succeed without any issue.

Hope this helps!

Note - Update Oozie sharelib part is missing in the stackoverflow's answer.