Blog Post: http://blog.cloudera.com/blog/2013/03/how-to-use-oozie-shell-and-java-actions
The Java code used in the Java action is located in the Earthquake-J folder and is a standard maven project.
- cd to Earthquake-J
- Run
mvn clean packageto generatetarget/Earthquake-J-1.0-SNAPSHOT.jar
The Oozie Workflow is located in the Earthquake-WF folder.
- After building it, copy the Earthquake-J-1.0-SNAPSHOT.jar file to the
Earthquake-WF/lib/folder (this allows the WF to find the JAR) - Upload the Earthquake-WF folder somewhere in HDFS (e.g.
/user/${user.name}/Earthquake-WF) - Open job.properties and adjust the various properties as necessary; these four in particular:
oozie.wf.application.pathshould point to where you uploaded Earthquake-WFdataInputDirshould point to where you want the data downloaded tooutputDirshould point to where you want the processed output dataearthquakeMinThresholdthe minimum earthquake magnitude to use
You can now create a Coordinator job to run the workflow every hour. If you'd like to test it out by running the Workflow directly you can follow these instructions (from the Earthquake folder):
- Run
hadoop fs -put Earthquake-WF Earthquake-WF - Run
oozie job -config Earthquake-WF/job.properties -run -oozie http://some.hostname:11000/oozie