Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to pass the variables in the job.properties to be used in the workflow.xml when running an Oozie workflow through Apache Falcon?

How to pass the variables in the job.properties to be used in the workflow.xml when running an Oozie workflow through Apache Falcon?

New Contributor

I'm trying to run a Java action in Oozie which accepts some arguments and also writes data to Hive using sqoop. It uses the jars in the oozie lib path which I've included in the job.properties as below:

oozie.libpath=/user/oozie/share/lib/hive,/user/oozie/share/lib/hive2,/user/oozie/share/lib/sqoop

Now the problem is when I run this workflow through the Oozie command line it runs fine since it can read the values from the job.properties file but when I run the same workflow through Falcon it fails with the below error:

java.lang.ClassNotFoundException: org.apache.hive.jdbc.HiveDriver
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)

How do I pass the properties in the job.properties files to my workflow from Falcon? Please suggest, I also have a need to make a generic Falcon flow and pass on the arguments which can be used by the jar file instead of hard coding them in the workflow.xml. Is it possible?

@Kuldeep Kulkarni

2 REPLIES 2

Re: How to pass the variables in the job.properties to be used in the workflow.xml when running an Oozie workflow through Apache Falcon?

Contributor

@Shikhar Agarwal

A quick fix would be to add these jars in the oozie share lib itself .

Share lib location is similar to - /user/oozie/share/lib/_20140311155426/*

These would then be automatically picked up by falcon Job.

Re: How to pass the variables in the job.properties to be used in the workflow.xml when running an Oozie workflow through Apache Falcon?

Expert Contributor

@Shikhar Agarwal In Falcon there is properties section in Entities using which you can pass the custom properties. See the following URL :

https://falcon.apache.org/EntitySpecification.html#Feed_Specification and "Custom Properties" section

Don't have an account?
Coming from Hortonworks? Activate your account here