Hue now makes Oozie SLAs easy to use! With SLAs, you can automatically be alerted when some workflows are not done within a certain window of time. Oozie SLAs have been improved a lot in Oozie 4, hence this new feature requires Oozie 4.x.
SLAs can be setup in the Editor in the advanced tabs of:
Workflow action properties
SLAs can be visualized In the Dashboard:
New main SLA tab for searching and graphing
Individual SLA tab for single workflow or coordinator
We do not cover setup of JMS notifications here. JMS enables clients to be alerted in real time of the notifications (instead of pooling like in this tutorial). With Hue, you can visualize the success of your job in a timelime and setup email-notification in case of alerts.
How to enable SLA in Oozie itself?
First make sure you are using Oozie 4. If you need to upgrade from Oozie 3, don’t forget to update the Oozie sharelib with:
sudo -u oozie /usr/lib/oozie/bin/oozie-setup.sh sharelib create -fs hdfs://localhost:8020 -locallib /usr/lib/oozie/oozie-sharelib-yarn.tar.gz
If for some reason you need to reset the Oozie DB, delete it and recreate it with:
sudo -u oozie /usr/lib/oozie/bin/ooziedb.sh create -sqlfile oozie.sql -run
In order to avoid the exception below, you should not have the SLA properties in oozie-site.xml.
Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/MessagingException at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:270)
Then open oozie-site.xml and add these properties and restart Oozie:
oozie.services.ext org.apache.oozie.service.EventHandlerService, org.apache.oozie.sla.service.SLAService oozie.service.EventHandlerService.event.listeners org.apache.oozie.sla.listener.SLAJobEventListener, org.apache.oozie.sla.listener.SLAEmailEventListener