Get oozie job information in oozie workflow Get oozie job information in oozie workflow shell shell

Get oozie job information in oozie workflow


I hope you are running your command on a cluster from where you have access to fetch info/kill/start oozie job. If that is the case then your command should work fine. I tried below commands and I was able to see the results.

cluster:~$ oozie job -info job-id -oozie http://gateway-url/oozie/ > a.txtcluster:~$ cat a.txt

The output was :

Job ID : job-id------------------------------------------------------------------------------------------------------------------------------------Workflow Name : workflow-nameApp Path      : hdfs://path/to/workflow.xmlStatus        : RUNNINGRun           : 0User          : user-idGroup         : -Created       : 2018-07-05 22:30 GMTStarted       : 2018-07-05 22:30 GMTLast Modified : 2018-07-06 05:17 GMTEnded         : -CoordAction ID: coordinator-id@410Actions------------------------------------------------------------------------------------------------------------------------------------ID                                        Status    Ext ID                    Ext Status                  Err Code------------------------------------------------------------------------------------------------------------------------------------job-id@:start:                            OK        -                         OK                           -------------------------------------------------------------------------------------------------------------------------------------job-id@action1                            OK        -                         action2                      -------------------------------------------------------------------------------------------------------------------------------------job-id@action2                            OK        -                         OK                           -------------------------------------------------------------------------------------------------------------------------------------job-id@action3                            OK        -                         action4                      -------------------------------------------------------------------------------------------------------------------------------------job-id@action4                            OK        MR_job_id1                SUCCEEDED                    -------------------------------------------------------------------------------------------------------------------------------------job-id@action5                            OK        MR_job_id2                SUCCEEDED                    -------------------------------------------------------------------------------------------------------------------------------------job-id@action6                            OK        -                         action7                      -------------------------------------------------------------------------------------------------------------------------------------job-id@action7                            OK        MR_job_id3                SUCCEEDED                    -------------------------------------------------------------------------------------------------------------------------------------job-id@action8                            OK        MR_job_id4                SUCCEEDED                    -------------------------------------------------------------------------------------------------------------------------------------job-id@action9                            RUNNING   MR_job_id5                RUNNING                      ------------------------------------------------------------------------------------------------------------------------------------- 


  1. Are you sure you have checked the results on the right node in the cluster? You can upload it to the HDFS for easy access:

    hadoop fs -put /tmp/job_id.txt /tmp# and thenhadoop fs -cat hdfs:///tmp/job_id.txt
  2. You can collect more debug data, if you run oozie job with -debug option. Then check, if an url generated by Oozie is correct (e.g. by pasting it to the browser). Maybe there is something wrong with your Oozie url?

  3. Validate, if your input parameter (job id) for the shell script is set correctly. To get access to job id in your Oozie workflow you can use ${wf:id()}.