The Pig command for running command-line options is shown in the following screenshot:
To run the same Pig Oozie script that we used in Chapter 3, Oozie Fundamentals, use the following command:
oozie pig -file <BOOK_CODE_HOME>/learn_oozie/ch03/pig/replace_delimiters.pig -oozie http://localhost:11000/oozie -P inputPath=/user/hue/learn_oozie/ch03/input/ -P outputPath=/user/hue/learn_oozie/ch05/pig_commandline/output -config job.properties
The path for -file
is a local path from where the command is being submitted, not HDFS. The job we submit runs as soon as it is submitted.
All the JAR files and other files needed by the Pig job needs to be uploaded onto HDFS under libpath
beforehand.
The job.properties
file has following definitions:
# job.properties file jobTracker=sandbox.hortonworks.com:8050 nameNode=hdfs://sandbox.hortonworks.com:8020 oozie.use.system.libpath=True oozie.libpath=hdfs://sandbox.hortonworks.com:8020/user/oozie/share/lib
To see...