0

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
yAsH
  • 3,367
  • 8
  • 36
  • 67

1 Answers1

2

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>
gezapeti
  • 381
  • 1
  • 3
  • I updated the workflow with the above property and the workflow was a success. But, I was not able to find the tables that I was creating. – yAsH Aug 04 '16 at 14:20
  • You may have to insert the hive-site.xml into the workflow's tag and into Spark using the --file pathi/to/hive-site.xml in the tag. – gezapeti Oct 07 '16 at 14:00