Implementing a Pig action job using Oozie
In this recipe, we are going to take a look at how to use a Pig action in order to automate the Pigscripts
executions.
Getting ready
To perform this recipe, you should have a running Hadoop cluster as well as the latest version of Oozie and Pig installed on it.
How to do it...
A Oozie job execution consists of two important things, workflow.xml
and a properties file. The workflow.xml
file is where we need to specify the flow of execution. The following is an example of workflow.xml
, which uses the Pig action:
<workflow-app xmlns="uri:oozie:workflow:0.2" name="pig-wf"> <start to="pig-node"/> <action name="pig-node"> <pig> <job-tracker>${jobTracker}</job-tracker> <name-node>${nameNode}</name-node> <prepare> <delete path="${nameNode}/user/${wf:user()}/${examplesRoot}/output-data/pig"/> </prepare> <configuration> <property> <name>mapred.job.queue.name</name> <value...