In addition to Hive, Spark2x, and Loader jobs, MapReduce, Java, Shell, HDFS, SSH, SubWorkflow, Streaming, and scheduled jobs can be submitted using the Oozie client.
You are advised to download the latest client.
This user must belong to the hadoop and supergroup groups and be assigned the Oozie role operation permission. The Shell script must have the execution permission on each NodeManager.
This user must belong to the hadoop and supergroup groups and be assigned the Oozie role operation permission. The mutual trust configuration is complete.
This user must belong to the hadoop and supergroup groups and be assigned the Oozie role operation permission and other required permissions.
source /opt/client/bigdata_env
For example, the oozieuser user is authenticated using the following command:
kinit oozieuser
Job Type |
Example Directory |
---|---|
MapReduce job |
Client installation directory/Oozie/oozie-client-*/examples/apps/map-reduce |
Java job |
Client installation directory/Oozie/oozie-client-*/examples/apps/java-main |
Shell job |
Client installation directory/Oozie/oozie-client-*/examples/apps/shell |
Streaming job |
Client installation directory/Oozie/oozie-client-*/examples/apps/streaming |
SubWorkflow job |
Client installation directory/Oozie/oozie-client-*/examples/apps/subwf |
SSH job |
Client installation directory/Oozie/oozie-client-*/examples/apps/ssh |
Scheduled job |
Client installation directory/Oozie/oozie-client-*/examples/apps/cron |
The examples of other jobs contain HDFS job examples.
Table 2 lists the files that you need to pay attention to in the example directory.
File |
Description |
---|---|
job.properties |
Parameter definition file of a workflow |
workflow.xml |
Rule definition file of a workflow |
lib |
Directory of the JAR file on which a workflow depends |
coordinator.xml |
Scheduled job configuration file which can be used to set a scheduled policy. The file is in the cron directory. |
oozie_shell.sh |
Shell script file required for submitting shell jobs. The file is in the shell directory. |
vi job.properties
Perform the following modifications:
Change the value of userName to the name of the human-machine user who submits the job, for example, userName=oozieuser.
oozie job -oozie https://Host name of the oozie role:21003/oozie -config File path of job.properties -run
Example:
oozie job -oozie https://10-1-130-10:21003/oozie -config
/opt/client/Oozie/oozie-client-*/examples/apps/map-reduce/job.properties -run
-oozie URL of the Oozie server that executes a job
-config Workflow property file
-run Executing a workflow
Log in to the Oozie web UI at https://IP address of the Oozie role:21003/oozie as user oozieuser.
On the Oozie web UI, you can view the submitted workflow information based on the job ID in the table on the page.