Reply
New Contributor
Posts: 5
Registered: ‎09-02-2015

Oozie email workflow with attachment

I would like to know whether we can attach a file in the email workflow of oozie.  If so, can you explain with example.

Highlighted
Posts: 1,892
Kudos: 432
Solutions: 302
Registered: ‎07-31-2013

Re: Oozie email workflow with attachment

An ability to attach files to email actions will arrive in CDH 5.5 onwards.
Current CDH5 releases do not have this recently added Oozie feature.

For a preliminary version of the new documentation, see
http://nightly.cloudera.com/cdh5/cdh/5/oozie/DG_EmailActionExtension.html

New Contributor
Posts: 5
Registered: ‎09-02-2015

Re: Oozie email workflow with attachment

Hi,

 

 Thanks for your quick reply. Is there any workaround to show the content of log file in the mail after the workflow completed.

Contributor
Posts: 58
Registered: ‎10-19-2014

Re: Oozie email workflow with attachment

I think it depends on how much of the log file you want to see.

 

If it's just a few lines, you can read the log file in a shell script and print out those lines as LINE1=... , LINE2=... etc. Then check the "Capture output" flag on the Oozie shell action, which will create variables that you can then pick up in your email action with the syntax ${wf:actionData('YourShellAction')['LINE1']} etc.

 

Hope this helps.

 

Martin

 

New Contributor
Posts: 4
Registered: ‎07-30-2015

Re: Oozie email workflow with attachment

Hello 

 

Is it possible to disable this feature, where we dont want to allow the users to attache HDFS files to emails. 

 

Thanks in advacne for the reply. 

Abraham 

Posts: 1,892
Kudos: 432
Solutions: 302
Registered: ‎07-31-2013

Re: Oozie email workflow with attachment

Yes, apply 'oozie.email.attachment.enabled' as false in your Server's
oozie-site.xml.

Attachments are disabled by default too.
New Contributor
Posts: 4
Registered: ‎07-30-2015

Re: Oozie email workflow with attachment

Hello Harsh

 

Thanks for reply. 

 

We are using Cloundera Manager. 

Can you please let me know how this can be done via Cloudera Manager. 

 

I checked the file in the Oozie server host via Oozie-Server-->Processes-->Oozie-site.xml

and couldnt find the field in the file. 

oozie.email.attachment.enabled

 

Regards

Abraham 

Announcements