Big Data - Apache Oozie

Back to Course

Lesson Description

Lession - #748 Apache Oozie CLI

We have seen a few commands earlier to run the jobs of workflow, coordinator and bundle. Oozie provides a command line utility, Oozie, to perform job and admin tasks.

oozie version : show client version

Following are some of the other job operations −

oozie job  :
-action  coordinator rerun on action ids (requires -rerun>
; coordinator log retrieval on action ids (requires -log>
-auth select authentication type [SIMPLE|KERBEROS] -change change a coordinator/bundle job -config job configuration file '.xml' or '.properties' -D set/override value for given property -date coordinator/bundle rerun on action dates (requires -rerun>
-definition job definition -doas doAs user, impersonates as the specified user -dryrun Supported in Oozie-2.0 or later versions ONLY - dryrun or test run a coordinator job, job is not queued -info info of a job -kill kill a job -len number of actions (default TOTAL ACTIONS, requires -info>
-localtime use local time (default GMT>
-log job log -nocleanup do not clean up output-events of the coordinator rerun actions (requires -rerun>
-offset job info offset of actions (default '1', requires -info>
-oozie Oozie URL -refresh re-materialize the coordinator rerun actions (requires -rerun>
-rerun rerun a job (coordinator requires -action or -date; bundle requires -coordinator or -date>
-resume resume a job -run run a job -start start a job -submit submit a job -suspend suspend a job -value new endtime/concurrency/pausetime value for changing a coordinator job;new pausetime value for changing a bundle job -verbose verbose mode

To check the status of the job, following commands can be used.

-auth <arg> select authentication type [SIMPLE|KERBEROS]
-doas <arg> doAs user, impersonates as the specified user.
-filter <arg> user = <U>; name = <N>; group = <G>; status = <S>; ...
-jobtype <arg> job type ('Supported in Oozie-2.0 or later versions ONLY -
coordinator' or 'wf' (default>
-len <arg> number of jobs (default '100'>
-localtime use local time (default GMT>
-offset <arg> jobs offset (default '1'>
-oozie <arg> Oozie URL -verbose verbose mode

For example − To check the status of the Oozie system you can run the following command −

oozie admin -oozie http://localhost:8080/oozie -status

Validating a Workflow XML −
oozie validate myApp/workflow.xml

It performs an XML Schema validation on the specified workflow XML file.