Oozie : Sending emails

Oozie has a feature which allows sending emails in Oozie from a workflow application.

For example :-

In your workflow.xml, include the following action.

<action name=”sendEmail”>
<email xmlns=”uri:oozie:email-action:0.1″>
<to>xyz@abc.com</to>
<subject>WF Success</subject>
<body>WF Successfully executed</body>
</email>
<ok to=”end”/>
<error to=”kill”/>
</action>

 

**Multiple Email Addressess: comma separated with space.

xyz@ab.com , zxc@ab.com

Edit your oozie-site.xml to include the following properties

oozie.email.smtp.host : mailer.efg.com

oozie.email.smtp.port : 25

oozie.email.from.address : oozie@whatever.com

The actual syntax to customize your email action :-

<workflow-app name=”[WF-DEF-NAME]” xmlns=”uri:oozie:workflow:0.1″>

<action name=”[NODE-NAME]”>
<email xmlns=”uri:oozie:email-action:0.1″>
<to>[COMMA-SEPARATED-TO-ADDRESSES]</to>
<cc>[COMMA-SEPARATED-CC-ADDRESSES]</cc> <!– cc is optional –>
<subject>[SUBJECT]</subject>
<body>[BODY]</body>
</email>
<ok to=”[NODE-NAME]”/>
<error to=”[NODE-NAME]”/>
</action>

</workflow-app>

Enjoy emailing 😉

Advertisements

About shalishvj : My Experience with BigData

6+ years of experience using Bigdata technologies in Architect, Developer and Administrator roles for various clients. • Experience using Hortonworks, Cloudera, AWS distributions. • Cloudera Certified Developer for Hadoop. • Cloudera Certified Administrator for Hadoop. • Spark Certification from Big Data Spark Foundations. • SCJP, OCWCD. • Experience in setting up Hadoop clusters in PROD, DR, UAT , DEV environments.
This entry was posted in oozie and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s