Created on 02-25-2016 10:44 AM - edited 09-16-2022 03:05 AM
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.
Created 12-02-2016 02:30 PM
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.
Created 02-25-2016 11:58 AM
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.
Created 02-25-2016 01:03 PM
@Benjamin Leonhardi: You mean remove from hive_env.sh file ?
Created 02-25-2016 02:19 PM
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 )
Created 02-25-2016 12:13 PM
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.
Created 02-25-2016 04:56 PM
@Saurabh Kumar please see my answer, as well as this link https://community.hortonworks.com/content/idea/2391/pig-and-hive-actions-should-include-hive-hcatalo...
Created 02-26-2016 10:44 AM
@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.
Created 12-02-2016 02:30 PM
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.