Skip to main content
rajisridhar
Silver ⭐️
Mar 27, 2020 10:12 AM UTC
Solved

get oozie workflow name with start and end time in mail

Hi,i want to trigger mail with oozie workflow name and start and end time.

jagadeesan
Platinum ⭐️
Mar 27, 2020 6:11 PM UTC

Hi @rajisridhar 

 

You can use a command like this to get the start and end time and then store it where you wish to or configure mail accordingly to your requirements.

Example:

$ oozie job -oozie http://localhost:11000/oozie -info 14-20090525161321-oozie-joe
.
.----------------------------------------------------------------------------------------------------------------------------------------------------------------
Workflow Name : map-reduce-wf
App Path : hdfs://localhost:8020/user/joe/workflows/map-reduce
Status : SUCCEEDED
Run : 0
User : joe
Group : users
Created : 2009-05-26 05:01 +0000
Started : 2009-05-26 05:01 +0000
Ended : 2009-05-26 05:01 +0000
Actions
.----------------------------------------------------------------------------------------------------------------------------------------------------------------
Action Name Type Status Transition External Id External Status Error Code Start End
.----------------------------------------------------------------------------------------------------------------------------------------------------------------
hadoop1 map-reduce OK end job_200904281535_0254 SUCCEEDED - 2009-05-26 05:01 +0000 2009-05-26 05:01 +0000
.----------------------------------------------------------------------------------------------------------------------------------------------------------------

For detailed information see this:

https://oozie.apache.org/docs/3.3.2/DG_CommandLineTool.html#Jobs_Operations

View solution in original post

 

Hope this helps. Please accept the answer and vote up if it did.

2 replies

jagadeesan
Platinum ⭐️
Platinum ⭐️
Mar 27, 2020 6:11 PM UTC

Hi @rajisridhar 

 

You can use a command like this to get the start and end time and then store it where you wish to or configure mail accordingly to your requirements.

Example:

$ oozie job -oozie http://localhost:11000/oozie -info 14-20090525161321-oozie-joe
.
.----------------------------------------------------------------------------------------------------------------------------------------------------------------
Workflow Name : map-reduce-wf
App Path : hdfs://localhost:8020/user/joe/workflows/map-reduce
Status : SUCCEEDED
Run : 0
User : joe
Group : users
Created : 2009-05-26 05:01 +0000
Started : 2009-05-26 05:01 +0000
Ended : 2009-05-26 05:01 +0000
Actions
.----------------------------------------------------------------------------------------------------------------------------------------------------------------
Action Name Type Status Transition External Id External Status Error Code Start End
.----------------------------------------------------------------------------------------------------------------------------------------------------------------
hadoop1 map-reduce OK end job_200904281535_0254 SUCCEEDED - 2009-05-26 05:01 +0000 2009-05-26 05:01 +0000
.----------------------------------------------------------------------------------------------------------------------------------------------------------------

For detailed information see this:

https://oozie.apache.org/docs/3.3.2/DG_CommandLineTool.html#Jobs_Operations

View solution in original post

 

Hope this helps. Please accept the answer and vote up if it did.

Translate
rajisridhar
Silver ⭐️
Mar 30, 2020 7:11 AM UTC

Hi @jagadeesan ,

 

i want result like this

workflow name and status,start and end time.we have 200 jobs.daily we doing manually.so need to update automatically.

workflownameIngestionDaily Completed9.00 PM7.36 AM
Translate