Sathi,

You can do it by configuring SLA for your coordinator action.

Refer documentation here:
http://oozie.apache.org/docs/4.0.1/DG_SLAMonitoring.html
It will also point to the server configuration needed
http://oozie.apache.org/docs/4.0.1/AG_Install.html#Notifications_Configurat
ion

Oozie will send an SLA MISS email notification for following coordinator
action statuses, so your time-out case is covered.
case FAILED:
            case KILLED:
            case TIMEDOUT:


The other way as Mohammad suggested is installing a JMS broker and
configuring Oozie to send JMS notification message. But SLA method
illustrated above requires no additional installation from your side.

―
Mona

On 9/16/14, 3:04 PM, "Mohammad Islam" <[email protected]> wrote:

>Can someone from (specially Yahoo Oozie team ) address Sathi's issue? I
>know Y! people were using this feature.
>
>Regards,
>Mohammad
>
>
>On Tuesday, September 16, 2014 9:21 AM, Sathi Chowdhury
><[email protected]> wrote:
> 
>
>
>Thanks Mohammad,
>
>Alternatively I was trying if I could achieve the same behavior with sla.
>When my job is waiting as it is looking for the availability of input
>dataset ,Instead of timeout if sla miss could kill the job after a defined
>amount of time.
>But did not work …the job kept waiting endless time…btw I am running this
>job for a past date, 7/1/2014 is my start time ..what am I missing?
>
><?xml version="1.0" encoding="UTF-8"?>
><coordinator-app xmlns="uri:oozie:coordinator:0.4"
>xmlns:sla="uri:oozie:sla:0.2" name=“my-weekly-coord"
>frequency="${coord:days(7)}" start="${jobStart}" end="${jobEnd}"
>timezone="UTC">
><!--  <controls>
>    <timeout>10</timeout>
>  </controls>-->
>  <datasets>
>    <dataset name="dailyflags" frequency="${coord:days(1)}"
>initial-instance="${initialDataset}" timezone="UTC">
>      
><uri-template>${dailyworkflowRoot}/status/${YEAR}${MONTH}${DAY}</uri-templ
>a
>te>
>      <done-flag>daily_SUCCESS</done-flag>
>    </dataset>
>  </datasets>
>  <input-events>
>    <data-in name="input" dataset="dailyflags">
>      <start-instance>${coord:current(-7)}</start-instance>
>      <end-instance>${coord:current(-1)}</end-instance>
>    </data-in>
>  </input-events>
>  <action>
>    <workflow>
>      <app-path>${workflowRoot}/my-weekly-pipeline-action.xml</app-path>
>      <configuration>
>        <property>
>          <name>wfInput</name>
>          <value>${coord:dataIn('input')}</value>
>        </property>
>        <property>
>          <name>eventYear</name>
>          <value>${coord:formatTime(coord:dateOffset(coord:nominalTime(),
>-1, 'DAY'), 'yyyy')}</value>
>        </property>
>        <property>
>          <name>eventMonth</name>
>          <value>${coord:formatTime(coord:dateOffset(coord:nominalTime(),
>-1, 'DAY'), 'MM')}</value>
>        </property>
>        <property>
>          <name>eventDay</name>
>          <value>${coord:formatTime(coord:dateOffset(coord:nominalTime(),
>-1, 'DAY'), 'dd')}</value>
>        </property>
>      </configuration>
>    </workflow>
>    <sla:info>
>      <sla:nominal-time>${coord:nominalTime()}</sla:nominal-time>
>      <sla:should-start>${5 * MINUTES}</sla:should-start>
>      <sla:should-end>${15 * MINUTES}</sla:should-end>
>      <sla:alert-events>start_miss,end_miss</sla:alert-events>
>      <sla:alert-contact>[email protected]</sla:alert-contact>
>      <sla:notification-msg>Notifying User for ${coord:nominalTime()}
>nominal time has not started yet(trying notification for
>timeout)</sla:notification-msg>
>    </sla:info>
>  </action>
></coordinator-app>
>
>
>
>
>On 9/16/14, 2:18 AM, "Mohammad Islam" <[email protected]> wrote:
>
>>Hi Sathi,
>>There is no direct way of sending email from coordinator. There are other
>>way such as sending JMS message. I'm sure you don't want to go to that
>>route.
>>
>>Let's see if anyone else has a better answer.
>>
>>
>>Regards,
>>Mohammad
>>
>>
>>On Monday, September 15, 2014 2:34 PM, Sathi Chowdhury
>><[email protected]> wrote:
>> 
>>
>>
>>Hi , 
>>My weekly job looks for 7 prior days daily job done flag.I wanted this
>>weekly job to timeout if input criteria is not met.So I am using
>><controls>
>>    <timeout>10</timeout>
>>    <concurrency>4</concurrency>
>>  </controls>
>>
>>
>>What¹s the best way to send an email notification for a timeout.
>>
>>Thanks
>>Sathi

Reply via email to