yAsH
yAsH

Reputation: 3405

HiveContext not working from Oozie

I was trying to run some hive queries from my spark code using the HiveContext object. It was working fine when I run it from the command line using spark submit. But, I am getting the below exception when I try to run the same from a oozie workflow.

User class threw exception: java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

Upvotes: 0

Views: 689

Answers (1)

gezapeti
gezapeti

Reputation: 381

You should add the Hive sharelib to the Spark action if Hive classes are used. You can set the following property either in oozie-default.xml, in the workflow or in the action configuration:

<configuration>
   <property>
      <name>oozie.action.sharelib.for.spark</name>
      <value>spark,hive</value>
   </property>
</configuration>

Upvotes: 2

Related Questions