Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List and Execute Oozie jobs from the command line

Tags:

oozie

I just deployed a oozie job. Now when I go to the oozie web ui ... i just cannot see the job I deployed.

Is there a command line tool which will allow me to do two things

  1. List all the jobs which are deployed (not running, active, killed)... but deployed. like an inventory of all jobs.

  2. execute a job from the command line. (on demand, not based on schedule).

like image 207
Knows Not Much Avatar asked Mar 10 '16 18:03

Knows Not Much


People also ask

How do I check my Oozie job?

Note : The job. properties file needs to be a local file during submissions, and not a HDFS path. To check the workflow job status via the Oozie web console, with a browser go to http://localhost:11000/oozie .

How do I run a coordinator job in Oozie?

To run this coordinator, use the following command. oozie. wf. application.


1 Answers

As already mentioned in one of the comments that ooziein itself is a command line tool.

Therefore, to answer both of your questions:

  1. List all jobs
    • For listing all workflow jobs use the following command
      1. oozie jobs
      2. oozie jobs -jobtype wf
    • For listing all coordinator jobs use the following command from the console
      1. oozie jobs -jobtype coordinator
  2. Execute a job from command line
    • oozie job --oozie http://oozie-url:11000/oozie -config job.properties -run

Mind you that if you want to keep on starting on demand job either you have to run the above command manually (also only for workflow jobs, not for coordinator jobs as coordinator jobs would be scheduled according to the schedule you define) or put in a shell script so that it is triggered under certain situations

For more info check this link - Oozie_Command_Line_Usage

like image 79
Biplob Biswas Avatar answered Sep 28 '22 02:09

Biplob Biswas