Repository: oozie
Updated Branches:
  refs/heads/master 5228eb8fe -> 0f4b0181b


http://git-wip-us.apache.org/repos/asf/oozie/blob/0f4b0181/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobGetActionIdsForDatesJPAExecutor.java
----------------------------------------------------------------------
diff --git 
a/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobGetActionIdsForDatesJPAExecutor.java
 
b/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobGetActionIdsForDatesJPAExecutor.java
deleted file mode 100644
index 9d92256..0000000
--- 
a/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobGetActionIdsForDatesJPAExecutor.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.executor.jpa;
-
-import java.util.Date;
-import java.util.List;
-
-import org.apache.hadoop.fs.Path;
-import org.apache.oozie.CoordinatorJobBean;
-import org.apache.oozie.client.CoordinatorAction;
-import org.apache.oozie.client.CoordinatorJob;
-import org.apache.oozie.local.LocalOozie;
-import org.apache.oozie.service.JPAService;
-import org.apache.oozie.service.Services;
-import org.apache.oozie.test.XDataTestCase;
-import org.apache.oozie.util.DateUtils;
-
-public class TestCoordJobGetActionIdsForDatesJPAExecutor extends XDataTestCase 
{
-    Services services;
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        services = new Services();
-        services.init();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        services.destroy();
-        super.tearDown();
-    }
-
-    public void testCoordActionGet() throws Exception {
-        int actionNum = 1;
-        CoordinatorJobBean job = 
addRecordToCoordJobTable(CoordinatorJob.Status.RUNNING, false, false);
-        addRecordToCoordActionTable(job.getId(), actionNum, 
CoordinatorAction.Status.FAILED, "coord-action-get.xml", 0);
-
-        Path appPath = new Path(getFsTestCaseDir(), "coord");
-        String actionXml = getCoordActionXml(appPath, "coord-action-get.xml");
-        String actionNomialTime = getActionNominalTime(actionXml);
-        Date nominalTime = DateUtils.parseDateOozieTZ(actionNomialTime);
-
-        Date d1 = new Date(nominalTime.getTime() - 1000);
-        Date d2 = new Date(nominalTime.getTime() + 1000);
-        _testGetActionForDates(job.getId(), d1, d2, 1);
-
-        d1 = new Date(nominalTime.getTime() + 1000);
-        d2 = new Date(nominalTime.getTime() + 2000);
-        _testGetActionForDates(job.getId(), d1, d2, 0);
-
-        cleanUpDBTables();
-        job = addRecordToCoordJobTable(CoordinatorJob.Status.RUNNING, false, 
false);
-        addRecordToCoordActionTable(job.getId(), actionNum, 
CoordinatorAction.Status.WAITING, "coord-action-get.xml", 0);
-        _testGetActionForDates(job.getId(), d1, d2, 0);
-    }
-
-    private void _testGetActionForDates(String jobId, Date d1, Date d2, int 
expected) throws Exception {
-        JPAService jpaService = Services.get().get(JPAService.class);
-        assertNotNull(jpaService);
-        CoordJobGetActionIdsForDateRangeJPAExecutor actionGetCmd = new 
CoordJobGetActionIdsForDateRangeJPAExecutor(jobId, d1, d2);
-        List<String> actionIds = jpaService.execute(actionGetCmd);
-        assertEquals(expected, actionIds.size());
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/oozie/blob/0f4b0181/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobGetActionsForDatesJPAExecutor.java
----------------------------------------------------------------------
diff --git 
a/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobGetActionsForDatesJPAExecutor.java
 
b/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobGetActionsForDatesJPAExecutor.java
deleted file mode 100644
index 293d925..0000000
--- 
a/core/src/test/java/org/apache/oozie/executor/jpa/TestCoordJobGetActionsForDatesJPAExecutor.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.oozie.executor.jpa;
-
-import java.util.Date;
-import java.util.List;
-
-import org.apache.hadoop.fs.Path;
-import org.apache.oozie.CoordinatorActionBean;
-import org.apache.oozie.CoordinatorJobBean;
-import org.apache.oozie.client.CoordinatorAction;
-import org.apache.oozie.client.CoordinatorJob;
-import org.apache.oozie.local.LocalOozie;
-import org.apache.oozie.service.JPAService;
-import org.apache.oozie.service.Services;
-import org.apache.oozie.test.XDataTestCase;
-import org.apache.oozie.util.DateUtils;
-
-public class TestCoordJobGetActionsForDatesJPAExecutor extends XDataTestCase {
-    Services services;
-
-    @Override
-    protected void setUp() throws Exception {
-        super.setUp();
-        services = new Services();
-        services.init();
-    }
-
-    @Override
-    protected void tearDown() throws Exception {
-        services.destroy();
-        super.tearDown();
-    }
-
-    public void testCoordActionGet() throws Exception {
-        int actionNum = 1;
-        CoordinatorJobBean job = 
addRecordToCoordJobTable(CoordinatorJob.Status.RUNNING, false, false);
-        addRecordToCoordActionTable(job.getId(), actionNum, 
CoordinatorAction.Status.FAILED, "coord-action-get.xml", 0);
-
-        Path appPath = new Path(getFsTestCaseDir(), "coord");
-        String actionXml = getCoordActionXml(appPath, "coord-action-get.xml");
-        String actionNomialTime = getActionNominalTime(actionXml);
-        Date nominalTime = DateUtils.parseDateOozieTZ(actionNomialTime);
-
-        Date d1 = new Date(nominalTime.getTime() - 1000);
-        Date d2 = new Date(nominalTime.getTime() + 1000);
-        _testGetActionForDates(job.getId(), d1, d2, 1);
-
-        d1 = new Date(nominalTime.getTime() + 1000);
-        d2 = new Date(nominalTime.getTime() + 2000);
-        _testGetActionForDates(job.getId(), d1, d2, 0);
-
-        cleanUpDBTables();
-        job = addRecordToCoordJobTable(CoordinatorJob.Status.RUNNING, false, 
false);
-        addRecordToCoordActionTable(job.getId(), actionNum, 
CoordinatorAction.Status.WAITING, "coord-action-get.xml", 0);
-        _testGetActionForDates(job.getId(), d1, d2, 0);
-    }
-
-    private void _testGetActionForDates(String jobId, Date d1, Date d2, int 
expected) throws Exception {
-        JPAService jpaService = Services.get().get(JPAService.class);
-        assertNotNull(jpaService);
-        CoordJobGetActionsForDatesJPAExecutor actionGetCmd = new 
CoordJobGetActionsForDatesJPAExecutor(jobId, d1, d2);
-        List<CoordinatorActionBean> actions = jpaService.execute(actionGetCmd);
-        assertEquals(expected, actions.size());
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/oozie/blob/0f4b0181/core/src/test/java/org/apache/oozie/service/TestHASLAService.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/oozie/service/TestHASLAService.java 
b/core/src/test/java/org/apache/oozie/service/TestHASLAService.java
index 5aa911b..795db37 100644
--- a/core/src/test/java/org/apache/oozie/service/TestHASLAService.java
+++ b/core/src/test/java/org/apache/oozie/service/TestHASLAService.java
@@ -23,6 +23,7 @@ import java.util.ArrayList;
 import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.oozie.AppType;
@@ -30,11 +31,13 @@ import org.apache.oozie.CoordinatorActionBean;
 import org.apache.oozie.CoordinatorJobBean;
 import org.apache.oozie.WorkflowJobBean;
 import org.apache.oozie.client.CoordinatorAction;
+import org.apache.oozie.client.OozieClient;
 import org.apache.oozie.client.WorkflowJob;
 import org.apache.oozie.client.event.JobEvent.EventStatus;
 import org.apache.oozie.client.event.SLAEvent;
 import org.apache.oozie.client.event.SLAEvent.SLAStatus;
 import org.apache.oozie.client.rest.JsonBean;
+import org.apache.oozie.client.rest.RestConstants;
 import org.apache.oozie.event.EventQueue;
 import org.apache.oozie.executor.jpa.BatchQueryExecutor;
 import org.apache.oozie.executor.jpa.CoordActionQueryExecutor;
@@ -52,6 +55,8 @@ import org.apache.oozie.sla.TestSLAService;
 import org.apache.oozie.sla.listener.SLAEventListener;
 import org.apache.oozie.sla.service.SLAService;
 import org.apache.oozie.test.ZKXTestCase;
+import org.apache.oozie.util.JobUtils;
+import org.apache.oozie.util.Pair;
 import org.apache.oozie.workflow.WorkflowInstance;
 
 public class TestHASLAService extends ZKXTestCase {
@@ -358,6 +363,72 @@ public class TestHASLAService extends ZKXTestCase {
         }
     }
 
+    public void testSLAAlertCommandWithHA() throws Exception {
+
+        //Test SLA ALERT commands in HA mode.
+        //slaCalcMem1 is for server 1 and slaCalcMem2 is for server2
+
+        String id = "0000001-130521183438837-oozie-test-C@1";
+        Date expectedStartTS = new Date(System.currentTimeMillis() - 2 * 3600 
* 1000); // 2 hrs passed
+        Date expectedEndTS1 = new Date(System.currentTimeMillis() + 1 * 3600 * 
1000); // 1 hour ahead
+        // Coord Action of jobs 1-4 not started yet
+        createDBEntry(id, expectedStartTS, expectedEndTS1);
+
+        SLAService slas = Services.get().get(SLAService.class);
+        SLACalculatorMemory slaCalcMem1 = (SLACalculatorMemory) 
slas.getSLACalculator();
+        
slaCalcMem1.init(Services.get().get(ConfigurationService.class).getConf());
+        List<String> idList = new ArrayList<String>();
+        idList.add(id);
+        slaCalcMem1.disableAlert(idList);
+        
assertTrue(slaCalcMem1.get(id).getSLAConfigMap().containsKey(OozieClient.SLA_DISABLE_ALERT));
+
+        DummyZKOozie dummyOozie_1 = null;
+        try {
+            // start another dummy oozie instance (dummy sla and event handler 
services)
+            dummyOozie_1 = new DummyZKOozie("a", "http://blah";);
+            DummySLACalculatorMemory slaCalcMem2 = new 
DummySLACalculatorMemory();
+            EventHandlerService dummyEhs = new EventHandlerService();
+            slaCalcMem2.setEventHandlerService(dummyEhs);
+
+            // So that job sla updated doesn't run automatically
+            
Services.get().get(ConfigurationService.class).getConf().setInt(SLAService.CONF_SLA_CHECK_INTERVAL,
 100000);
+            
Services.get().get(ConfigurationService.class).getConf().setInt(SLAService.CONF_SLA_CHECK_INITIAL_DELAY,
 100000);
+            dummyEhs.init(Services.get());
+            
slaCalcMem2.init(Services.get().get(ConfigurationService.class).getConf());
+
+            slaCalcMem2.updateAllSlaStatus();
+            
assertTrue(slaCalcMem2.get(id).getSLAConfigMap().containsKey(OozieClient.SLA_DISABLE_ALERT));
+
+            String newParams = RestConstants.SLA_MAX_DURATION + "=5";
+            List<Pair<String, Map<String, String>>> jobIdsSLAPair = new 
ArrayList<Pair<String, Map<String, String>>>();
+            jobIdsSLAPair.add(new Pair<String, Map<String, String>>(id, 
JobUtils.parseChangeValue(newParams)));
+            slaCalcMem1.changeDefinition(jobIdsSLAPair);
+            assertEquals(slaCalcMem1.get(id).getExpectedDuration(), 5 * 60 * 
1000);
+
+            //Before update, default is 10.
+            assertEquals(slaCalcMem2.get(id).getExpectedDuration(), 10 * 60 * 
1000);
+
+            slaCalcMem2.updateAllSlaStatus();
+            assertEquals(slaCalcMem2.get(id).getExpectedDuration(), 5 * 60 * 
1000);
+
+            newParams = RestConstants.SLA_MAX_DURATION + "=15";
+            jobIdsSLAPair.clear();
+            jobIdsSLAPair.add(new Pair<String, Map<String, String>>(id, 
JobUtils.parseChangeValue(newParams)));
+            slaCalcMem1.changeDefinition(jobIdsSLAPair);
+
+            // Before update
+            assertEquals(slaCalcMem2.get(id).getExpectedDuration(), 5 * 60 * 
1000);
+            slaCalcMem2.updateAllSlaStatus();
+            assertEquals(slaCalcMem2.get(id).getExpectedDuration(), 15 * 60 * 
1000);
+
+        }
+        finally {
+            if (dummyOozie_1 != null) {
+                dummyOozie_1.teardown();
+            }
+        }
+    }
+
     private void createDBEntry(String actionId, Date expectedStartTS, Date 
expectedEndTS) throws Exception {
         ArrayList<JsonBean> insertList = new ArrayList<JsonBean>();
         CoordinatorActionBean coordAction = new CoordinatorActionBean();

http://git-wip-us.apache.org/repos/asf/oozie/blob/0f4b0181/core/src/test/java/org/apache/oozie/servlet/TestV2SLAServlet.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/oozie/servlet/TestV2SLAServlet.java 
b/core/src/test/java/org/apache/oozie/servlet/TestV2SLAServlet.java
index 5f51b22..1886f48 100644
--- a/core/src/test/java/org/apache/oozie/servlet/TestV2SLAServlet.java
+++ b/core/src/test/java/org/apache/oozie/servlet/TestV2SLAServlet.java
@@ -39,8 +39,6 @@ import org.apache.oozie.client.rest.JsonTags;
 import org.apache.oozie.client.rest.RestConstants;
 import org.apache.oozie.executor.jpa.BatchQueryExecutor;
 import org.apache.oozie.executor.jpa.JPAExecutorException;
-import org.apache.oozie.service.JPAService;
-import org.apache.oozie.service.Services;
 import org.apache.oozie.sla.SLASummaryBean;
 import org.apache.oozie.util.DateUtils;
 import org.json.simple.JSONArray;

http://git-wip-us.apache.org/repos/asf/oozie/blob/0f4b0181/core/src/test/java/org/apache/oozie/sla/TestSLACalculatorMemory.java
----------------------------------------------------------------------
diff --git 
a/core/src/test/java/org/apache/oozie/sla/TestSLACalculatorMemory.java 
b/core/src/test/java/org/apache/oozie/sla/TestSLACalculatorMemory.java
index c70ef79..432efef 100644
--- a/core/src/test/java/org/apache/oozie/sla/TestSLACalculatorMemory.java
+++ b/core/src/test/java/org/apache/oozie/sla/TestSLACalculatorMemory.java
@@ -20,8 +20,10 @@ package org.apache.oozie.sla;
 
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.log4j.Level;
@@ -31,28 +33,36 @@ import org.apache.oozie.AppType;
 import org.apache.oozie.CoordinatorActionBean;
 import org.apache.oozie.WorkflowActionBean;
 import org.apache.oozie.WorkflowJobBean;
+import org.apache.oozie.client.CoordinatorAction;
+import org.apache.oozie.client.OozieClient;
 import org.apache.oozie.client.WorkflowAction;
 import org.apache.oozie.client.WorkflowJob;
-import org.apache.oozie.client.CoordinatorAction;
-import org.apache.oozie.client.event.SLAEvent;
 import org.apache.oozie.client.event.JobEvent.EventStatus;
+import org.apache.oozie.client.event.SLAEvent;
 import org.apache.oozie.client.event.SLAEvent.SLAStatus;
 import org.apache.oozie.client.rest.JsonBean;
+import org.apache.oozie.client.rest.RestConstants;
+import org.apache.oozie.executor.jpa.BatchQueryExecutor;
 import org.apache.oozie.executor.jpa.BatchQueryExecutor.UpdateEntry;
 import org.apache.oozie.executor.jpa.CoordActionInsertJPAExecutor;
+import org.apache.oozie.executor.jpa.CoordActionQueryExecutor;
+import org.apache.oozie.executor.jpa.CoordActionQueryExecutor.CoordActionQuery;
 import org.apache.oozie.executor.jpa.SLARegistrationQueryExecutor;
 import org.apache.oozie.executor.jpa.SLARegistrationQueryExecutor.SLARegQuery;
-import org.apache.oozie.executor.jpa.SLASummaryQueryExecutor.SLASummaryQuery;
-import org.apache.oozie.executor.jpa.BatchQueryExecutor;
 import org.apache.oozie.executor.jpa.SLASummaryQueryExecutor;
+import org.apache.oozie.executor.jpa.SLASummaryQueryExecutor.SLASummaryQuery;
 import org.apache.oozie.executor.jpa.WorkflowActionInsertJPAExecutor;
 import org.apache.oozie.executor.jpa.WorkflowJobQueryExecutor;
 import org.apache.oozie.executor.jpa.WorkflowJobQueryExecutor.WorkflowJobQuery;
+import org.apache.oozie.service.ConfigurationService;
 import org.apache.oozie.service.EventHandlerService;
 import org.apache.oozie.service.JPAService;
 import org.apache.oozie.service.Services;
 import org.apache.oozie.sla.service.SLAService;
 import org.apache.oozie.test.XDataTestCase;
+import org.apache.oozie.util.DateUtils;
+import org.apache.oozie.util.JobUtils;
+import org.apache.oozie.util.Pair;
 import org.apache.oozie.workflow.WorkflowInstance;
 import org.junit.After;
 import org.junit.Before;
@@ -67,9 +77,10 @@ public class TestSLACalculatorMemory extends XDataTestCase {
     protected void setUp() throws Exception {
         super.setUp();
         Services services = new Services();
-        Configuration conf = services.getConf();
+        Configuration conf = 
services.get(ConfigurationService.class).getConf();
         conf.set(Services.CONF_SERVICE_EXT_CLASSES, 
"org.apache.oozie.service.EventHandlerService,"
                 + "org.apache.oozie.sla.service.SLAService");
+        conf.setInt(SLAService.CONF_SLA_CHECK_INTERVAL, 600);
         services.init();
         jpaService = Services.get().get(JPAService.class);
     }
@@ -96,7 +107,7 @@ public class TestSLACalculatorMemory extends XDataTestCase {
     @Test
     public void testLoadOnRestart() throws Exception {
         SLACalculatorMemory slaCalcMemory = new SLACalculatorMemory();
-        slaCalcMemory.init(Services.get().getConf());
+        
slaCalcMemory.init(Services.get().get(ConfigurationService.class).getConf());
         SLARegistrationBean slaRegBean1 = _createSLARegistration("job-1", 
AppType.WORKFLOW_JOB);
         String jobId1 = slaRegBean1.getId();
         SLARegistrationBean slaRegBean2 = _createSLARegistration("job-2", 
AppType.WORKFLOW_JOB);
@@ -156,7 +167,7 @@ public class TestSLACalculatorMemory extends XDataTestCase {
         BatchQueryExecutor.getInstance().executeBatchInsertUpdateDelete(null, 
updateList, null);
 
         slaCalcMemory = new SLACalculatorMemory();
-        slaCalcMemory.init(Services.get().getConf());
+        
slaCalcMemory.init(Services.get().get(ConfigurationService.class).getConf());
 
         assertEquals(2, slaCalcMemory.size());
 
@@ -201,7 +212,7 @@ public class TestSLACalculatorMemory extends XDataTestCase {
     public void testWorkflowJobSLAStatusOnRestart() throws Exception {
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd");
         SLACalculatorMemory slaCalcMemory = new SLACalculatorMemory();
-        slaCalcMemory.init(Services.get().getConf());
+        
slaCalcMemory.init(Services.get().get(ConfigurationService.class).getConf());
         SLARegistrationBean slaRegBean1 = _createSLARegistration("job-1", 
AppType.WORKFLOW_JOB);
         String jobId1 = slaRegBean1.getId();
         slaRegBean1.setExpectedEnd(sdf.parse("2013-03-07"));
@@ -228,7 +239,7 @@ public class TestSLACalculatorMemory extends XDataTestCase {
         WorkflowJobQueryExecutor.getInstance().insert(wjb);
 
         slaCalcMemory = new SLACalculatorMemory();
-        slaCalcMemory.init(Services.get().getConf());
+        
slaCalcMemory.init(Services.get().get(ConfigurationService.class).getConf());
 
         // As job succeeded, it should not be in memory
         assertEquals(0, slaCalcMemory.size());
@@ -257,7 +268,7 @@ public class TestSLACalculatorMemory extends XDataTestCase {
         
SLASummaryQueryExecutor.getInstance().executeUpdate(SLASummaryQuery.UPDATE_SLA_SUMMARY_ALL,
 slaSummaryBean);
 
         slaCalcMemory = new SLACalculatorMemory();
-        slaCalcMemory.init(Services.get().getConf());
+        
slaCalcMemory.init(Services.get().get(ConfigurationService.class).getConf());
 
         assertEquals(0, slaCalcMemory.size());
         slaSummary = 
SLASummaryQueryExecutor.getInstance().get(SLASummaryQuery.GET_SLA_SUMMARY, 
jobId1);
@@ -281,7 +292,7 @@ public class TestSLACalculatorMemory extends XDataTestCase {
         
SLASummaryQueryExecutor.getInstance().executeUpdate(SLASummaryQuery.UPDATE_SLA_SUMMARY_ALL,
 slaSummaryBean);
 
         slaCalcMemory = new SLACalculatorMemory();
-        slaCalcMemory.init(Services.get().getConf());
+        
slaCalcMemory.init(Services.get().get(ConfigurationService.class).getConf());
 
         assertEquals(1, slaCalcMemory.size());
         SLACalcStatus calc = slaCalcMemory.get(jobId1);
@@ -297,7 +308,7 @@ public class TestSLACalculatorMemory extends XDataTestCase {
     public void testWorkflowActionSLAStatusOnRestart() throws Exception {
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd");
         SLACalculatorMemory slaCalcMemory = new SLACalculatorMemory();
-        slaCalcMemory.init(Services.get().getConf());
+        
slaCalcMemory.init(Services.get().get(ConfigurationService.class).getConf());
         SLARegistrationBean slaRegBean1 = _createSLARegistration("job@1", 
AppType.WORKFLOW_ACTION);
         String jobId1 = slaRegBean1.getId();
         slaRegBean1.setExpectedEnd(sdf.parse("2013-03-07"));
@@ -322,7 +333,7 @@ public class TestSLACalculatorMemory extends XDataTestCase {
         jpaService.execute(wfInsertCmd);
 
         slaCalcMemory = new SLACalculatorMemory();
-        slaCalcMemory.init(Services.get().getConf());
+        
slaCalcMemory.init(Services.get().get(ConfigurationService.class).getConf());
 
         // As job succeeded, it should not be in memory
         assertEquals(0, slaCalcMemory.size());
@@ -343,7 +354,7 @@ public class TestSLACalculatorMemory extends XDataTestCase {
     public void testCoordinatorActionSLAStatusOnRestart() throws Exception {
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd");
         SLACalculatorMemory slaCalcMemory = new SLACalculatorMemory();
-        slaCalcMemory.init(Services.get().getConf());
+        
slaCalcMemory.init(Services.get().get(ConfigurationService.class).getConf());
         SLARegistrationBean slaRegBean1 = _createSLARegistration("job@1", 
AppType.COORDINATOR_ACTION);
         String jobId1 = slaRegBean1.getId();
         slaRegBean1.setExpectedEnd(sdf.parse("2013-03-07"));
@@ -373,7 +384,7 @@ public class TestSLACalculatorMemory extends XDataTestCase {
         WorkflowJobQueryExecutor.getInstance().insert(wjb);
 
         slaCalcMemory = new SLACalculatorMemory();
-        slaCalcMemory.init(Services.get().getConf());
+        
slaCalcMemory.init(Services.get().get(ConfigurationService.class).getConf());
 
         // As job succeeded, it should not be in memory
         assertEquals(0, slaCalcMemory.size());
@@ -394,7 +405,7 @@ public class TestSLACalculatorMemory extends XDataTestCase {
     public void testSLAEvents1() throws Exception {
         SLACalculatorMemory slaCalcMemory = new SLACalculatorMemory();
         EventHandlerService ehs = 
Services.get().get(EventHandlerService.class);
-        slaCalcMemory.init(Services.get().getConf());
+        
slaCalcMemory.init(Services.get().get(ConfigurationService.class).getConf());
         WorkflowJobBean job1 = addRecordToWfJobTable(WorkflowJob.Status.PREP, 
WorkflowInstance.Status.PREP);
         SLARegistrationBean slaRegBean = _createSLARegistration(job1.getId(), 
AppType.WORKFLOW_JOB);
         slaRegBean.setExpectedStart(new Date(System.currentTimeMillis() - 1 * 
1 * 3600 * 1000)); // 1 hour
@@ -445,7 +456,7 @@ public class TestSLACalculatorMemory extends XDataTestCase {
     public void testSLAEvents2() throws Exception {
         SLACalculatorMemory slaCalcMemory = new SLACalculatorMemory();
         EventHandlerService ehs = 
Services.get().get(EventHandlerService.class);
-        slaCalcMemory.init(Services.get().getConf());
+        
slaCalcMemory.init(Services.get().get(ConfigurationService.class).getConf());
 
         WorkflowJobBean job1 = addRecordToWfJobTable(WorkflowJob.Status.PREP, 
WorkflowInstance.Status.PREP);
         SLARegistrationBean slaRegBean = _createSLARegistration(job1.getId(), 
AppType.WORKFLOW_JOB);
@@ -505,7 +516,7 @@ public class TestSLACalculatorMemory extends XDataTestCase {
         // test start-miss
         EventHandlerService ehs = 
Services.get().get(EventHandlerService.class);
         SLACalculatorMemory slaCalcMemory = new SLACalculatorMemory();
-        slaCalcMemory.init(Services.get().getConf());
+        
slaCalcMemory.init(Services.get().get(ConfigurationService.class).getConf());
         WorkflowJobBean job1 = addRecordToWfJobTable(WorkflowJob.Status.PREP, 
WorkflowInstance.Status.PREP);
         SLARegistrationBean slaRegBean = _createSLARegistration(job1.getId(), 
AppType.WORKFLOW_JOB);
         Date startTime = new Date(System.currentTimeMillis() - 1 * 1 * 3600 * 
1000); // 1 hour back
@@ -534,7 +545,7 @@ public class TestSLACalculatorMemory extends XDataTestCase {
     public void testDuplicateEndMiss() throws Exception {
         EventHandlerService ehs = 
Services.get().get(EventHandlerService.class);
         SLACalculatorMemory slaCalcMemory = new SLACalculatorMemory();
-        slaCalcMemory.init(Services.get().getConf());
+        
slaCalcMemory.init(Services.get().get(ConfigurationService.class).getConf());
         WorkflowJobBean job1 = 
addRecordToWfJobTable(WorkflowJob.Status.RUNNING, 
WorkflowInstance.Status.RUNNING);
         SLARegistrationBean slaRegBean = _createSLARegistration(job1.getId(), 
AppType.WORKFLOW_JOB);
         Date startTime = new Date(System.currentTimeMillis() + 1 * 1 * 3600 * 
1000); // 1 hour ahead
@@ -577,7 +588,7 @@ public class TestSLACalculatorMemory extends XDataTestCase {
     public void testSLAHistorySet() throws Exception {
             EventHandlerService ehs = 
Services.get().get(EventHandlerService.class);
             SLACalculatorMemory slaCalcMemory = new SLACalculatorMemory();
-            slaCalcMemory.init(Services.get().getConf());
+            
slaCalcMemory.init(Services.get().get(ConfigurationService.class).getConf());
             WorkflowJobBean job1 = 
addRecordToWfJobTable(WorkflowJob.Status.PREP, WorkflowInstance.Status.PREP);
             SLARegistrationBean slaRegBean = 
_createSLARegistration(job1.getId(), AppType.WORKFLOW_JOB);
             Date startTime = new Date(System.currentTimeMillis() - 1 * 1 * 
3600 * 1000);
@@ -612,9 +623,8 @@ public class TestSLACalculatorMemory extends XDataTestCase {
     }
 
     public void testHistoryPurge() throws Exception{
-        EventHandlerService ehs = 
Services.get().get(EventHandlerService.class);
         SLACalculatorMemory slaCalcMemory = new SLACalculatorMemory();
-        slaCalcMemory.init(Services.get().getConf());
+        
slaCalcMemory.init(Services.get().get(ConfigurationService.class).getConf());
         WorkflowJobBean job1 = addRecordToWfJobTable(WorkflowJob.Status.PREP, 
WorkflowInstance.Status.PREP);
         SLARegistrationBean slaRegBean = _createSLARegistration(job1.getId(), 
AppType.WORKFLOW_JOB);
         Date startTime = new Date(System.currentTimeMillis() - 1 * 1 * 3600 * 
1000);
@@ -662,4 +672,75 @@ public class TestSLACalculatorMemory extends XDataTestCase 
{
 
     }
 
+    @SuppressWarnings("serial")
+    public void testDisablingAlertsEvents() throws Exception {
+        SLAService slaService = Services.get().get(SLAService.class);
+        EventHandlerService ehs = 
Services.get().get(EventHandlerService.class);
+        SLACalculator slaCalculator = slaService.getSLACalculator();
+        // create dummy sla records and coord action records
+        String id1 = _setupSlaMap(slaCalculator, "00020-1234567-wrkf-C", 1);
+        String id2 = _setupSlaMap(slaCalculator, "00020-1234567-wrkf-C", 2);
+
+        SLACalcStatus slaCalcObj1 = slaCalculator.get(id1);
+        
assertFalse(slaCalcObj1.getSLAConfigMap().containsKey(OozieClient.SLA_DISABLE_ALERT));
+        SLACalcStatus slaCalcObj2 = slaCalculator.get(id2);
+        
assertFalse(slaCalcObj2.getSLAConfigMap().containsKey(OozieClient.SLA_DISABLE_ALERT));
+        slaCalculator.updateAllSlaStatus();
+        assertTrue(ehs.getEventQueue().size() > 0);
+
+        // check that SLACalculator sends no event
+        ehs.getEventQueue().clear();
+        SLASummaryBean persistentSla = new SLASummaryBean(slaCalcObj1);
+        // reset eventProcessed for the sla calc objects
+        persistentSla.setEventProcessed(0);
+        
SLASummaryQueryExecutor.getInstance().executeUpdate(SLASummaryQuery.UPDATE_SLA_SUMMARY_EVENTPROCESSED,
+                persistentSla);
+        persistentSla = new SLASummaryBean(slaCalcObj2);
+        persistentSla.setEventProcessed(0);
+        
SLASummaryQueryExecutor.getInstance().executeUpdate(SLASummaryQuery.UPDATE_SLA_SUMMARY_EVENTPROCESSED,
+                persistentSla);
+        // CASE I : list of sla ids, no new params
+        slaService.enableChildJobAlert(Arrays.asList(id1, id2));
+        slaCalculator.updateAllSlaStatus();
+        assertTrue(ehs.getEventQueue().isEmpty());
+
+        // CASE II : ALL
+        _setupSlaMap(slaCalculator, "00020-1234567-wrkf-C", 3);
+        _setupSlaMap(slaCalculator, "00020-1234567-wrkf-C", 4);
+        
slaCalculator.enableChildJobAlert(Arrays.asList("00020-1234567-wrkf-C"));
+        slaCalculator.updateAllSlaStatus();
+        assertFalse(ehs.getEventQueue().isEmpty());
+
+        // CASE III : resume w/ new params
+        final String id5 = _setupSlaMap(slaCalculator, "00020-1234567-wrkf-C", 
5);
+        Date now = new Date();
+        now.setTime(now.getTime() - 10 * 60 * 1000);
+       final  String newParams = RestConstants.SLA_NOMINAL_TIME + "=" + 
DateUtils.formatDateOozieTZ(now) + ";"
+                + RestConstants.SLA_SHOULD_END + "=5";
+        slaCalculator.changeDefinition(new 
ArrayList<Pair<String,Map<String,String>>>(){
+            {
+            add(new Pair<String,Map<String,String>>(id5, 
JobUtils.parseChangeValue(newParams)));
+            }
+        });
+
+        slaCalculator.updateAllSlaStatus();
+        assertTrue(ehs.getEventQueue().size() > 0);
+
+    }
+
+    private String _setupSlaMap(SLACalculator slaCalculator, String id, int 
actionNum) throws Exception {
+        CoordinatorActionBean action = addRecordToCoordActionTable(id, 
actionNum,
+                CoordinatorAction.Status.TIMEDOUT, "coord-action-get.xml", 0);
+        action.setExternalId(null);
+        
CoordActionQueryExecutor.getInstance().executeUpdate(CoordActionQuery.UPDATE_COORD_ACTION_FOR_START,
 action);
+        SLARegistrationBean slaRegBean = 
_createSLARegistration(action.getId(), AppType.COORDINATOR_ACTION);
+        Date startTime = new Date(System.currentTimeMillis() - 2 * 3600 * 
1000);
+        slaRegBean.setExpectedStart(startTime); // 2 hours back
+        slaRegBean.setExpectedDuration(1000);
+        slaRegBean.setExpectedEnd(new Date(System.currentTimeMillis() - 1 * 
3600 * 1000)); // 1 hr back
+        slaRegBean.setParentId(id);
+        slaCalculator.addRegistration(slaRegBean.getId(), slaRegBean);
+        return action.getId();
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/oozie/blob/0f4b0181/core/src/test/java/org/apache/oozie/sla/TestSLAEventGeneration.java
----------------------------------------------------------------------
diff --git 
a/core/src/test/java/org/apache/oozie/sla/TestSLAEventGeneration.java 
b/core/src/test/java/org/apache/oozie/sla/TestSLAEventGeneration.java
index ea82baa..7a710c2 100644
--- a/core/src/test/java/org/apache/oozie/sla/TestSLAEventGeneration.java
+++ b/core/src/test/java/org/apache/oozie/sla/TestSLAEventGeneration.java
@@ -112,6 +112,7 @@ public class TestSLAEventGeneration extends XDataTestCase {
         conf.setInt(EventHandlerService.CONF_WORKER_INTERVAL, 10000);
         conf.setInt(EventHandlerService.CONF_WORKER_THREADS, 0);
         conf.setInt(EventHandlerService.CONF_BATCH_SIZE, 1);
+        conf.setInt(OozieClient.SLA_DISABLE_ALERT_OLDER_THAN, -1);
         services.init();
         jpa = services.get(JPAService.class);
         ehs = services.get(EventHandlerService.class);
@@ -409,6 +410,9 @@ public class TestSLAEventGeneration extends XDataTestCase {
         Date nominal = cal.getTime();
         String nominalTime = DateUtils.formatDateOozieTZ(nominal);
         conf.set("nominal_time", nominalTime);
+        conf.set("start", "2009-01-02T08:01Z");
+        conf.set("frequency", "coord:days(1)");
+        conf.set("end", "2009-01-03T08:00Z");
         cal.setTime(nominal);
         cal.add(Calendar.MINUTE, 10); // as per the sla xml
         String expectedStart = DateUtils.formatDateOozieTZ(cal.getTime());

http://git-wip-us.apache.org/repos/asf/oozie/blob/0f4b0181/core/src/test/java/org/apache/oozie/sla/TestSLARegistrationGetJPAExecutor.java
----------------------------------------------------------------------
diff --git 
a/core/src/test/java/org/apache/oozie/sla/TestSLARegistrationGetJPAExecutor.java
 
b/core/src/test/java/org/apache/oozie/sla/TestSLARegistrationGetJPAExecutor.java
index fe9002c..d56e06a 100644
--- 
a/core/src/test/java/org/apache/oozie/sla/TestSLARegistrationGetJPAExecutor.java
+++ 
b/core/src/test/java/org/apache/oozie/sla/TestSLARegistrationGetJPAExecutor.java
@@ -61,11 +61,27 @@ public class TestSLARegistrationGetJPAExecutor extends 
XDataTestCase {
         assertEquals(jobId, bean.getId());
         assertEquals(AppType.WORKFLOW_JOB, bean.getAppType());
         assertEquals(current, bean.getExpectedStart());
-        assertEquals(2, bean.getSlaConfigMap().size());
+        assertEquals(2, bean.getSLAConfigMap().size());
         assertEquals("END_MISS", bean.getAlertEvents());
         assertEquals("[email protected]", bean.getAlertContact());
     }
 
+    public void testSLARegistrationBulkConfigMap() throws Exception {
+        Date current = new Date();
+        String jobId = "0000000-" + current.getTime() + 
"-TestSLARegGetJPAExecutor-C@1";
+        List<String> jobIds = new ArrayList<String>();
+        jobIds.add(jobId);
+        _addRecordToSLARegistrationTable(jobId, AppType.COORDINATOR_ACTION, 
current, new Date(), "END_MISS",
+                "[email protected]");
+        jobId = "0000000-" + current.getTime() + 
"-TestSLARegGetJPAExecutor-C@2";
+        jobIds.add(jobId);
+        _addRecordToSLARegistrationTable(jobId, AppType.COORDINATOR_ACTION, 
current, new Date(), "END_MISS",
+                "[email protected]");
+        List<SLARegistrationBean> bean = 
SLARegistrationQueryExecutor.getInstance().getList(
+                SLARegQuery.GET_SLA_CONFIGS, jobIds);
+        assertEquals(bean.size(), 2);
+    }
+
     private void _addRecordToSLARegistrationTable(String jobId, AppType 
appType, Date start, Date end,
             String alertEvent, String alertContact) throws Exception {
         SLARegistrationBean reg = new SLARegistrationBean();
@@ -92,7 +108,7 @@ public class TestSLARegistrationGetJPAExecutor extends 
XDataTestCase {
         String slaConfig = 
"{[email protected]},{alert_events=START_MISS,DURATION_MISS,END_MISS},";
         SLARegistrationBean bean = new SLARegistrationBean();
         bean.setSlaConfig(slaConfig);
-        assertEquals(bean.getSlaConfigMap().size(), 2);
+        assertEquals(bean.getSLAConfigMap().size(), 2);
         assertEquals(bean.getAlertEvents(), 
"START_MISS,DURATION_MISS,END_MISS");
         assertEquals(bean.getAlertContact(), "[email protected]");
     }

http://git-wip-us.apache.org/repos/asf/oozie/blob/0f4b0181/core/src/test/resources/coord-action-sla.xml
----------------------------------------------------------------------
diff --git a/core/src/test/resources/coord-action-sla.xml 
b/core/src/test/resources/coord-action-sla.xml
index 8b301fd..f3f1bc0 100644
--- a/core/src/test/resources/coord-action-sla.xml
+++ b/core/src/test/resources/coord-action-sla.xml
@@ -16,7 +16,7 @@
   limitations under the License.
 -->
 <coordinator-app name="test-coord-sla" frequency="${coord:days(1)}"
-                 start="2009-01-02T08:01Z" end="2009-01-03T08:00Z"
+                 start="${start}" end="${end}"
                  timezone="America/Los_Angeles"
                  xmlns="uri:oozie:coordinator:0.4"
                  xmlns:sla="uri:oozie:sla:0.2">

http://git-wip-us.apache.org/repos/asf/oozie/blob/0f4b0181/docs/src/site/twiki/DG_CommandLineTool.twiki
----------------------------------------------------------------------
diff --git a/docs/src/site/twiki/DG_CommandLineTool.twiki 
b/docs/src/site/twiki/DG_CommandLineTool.twiki
index 0f1768b..bd53bf9 100644
--- a/docs/src/site/twiki/DG_CommandLineTool.twiki
+++ b/docs/src/site/twiki/DG_CommandLineTool.twiki
@@ -91,7 +91,10 @@ usage:
                 -value <arg>          new endtime/concurrency/pausetime value 
for changing a
                                       coordinator job
                 -verbose              verbose mode
-.
+                -sladisable           disables sla alerts for the job and its 
children
+                -slaenable            enables sla alerts for the job and its 
children
+                -slachange            Update sla param for jobs, supported 
param are should-start, should-end and max-duration
+
       oozie jobs <OPTIONS> : jobs status
                  -auth <arg>          select authentication type 
[SIMPLE|KERBEROS]
                  -doas <arg>          doAs user, impersonates as the specified 
user.
@@ -889,6 +892,23 @@ All other arguments are optional:
    * =interval=  allows specifying the polling interval in minutes (default is 
5)
    * =timeout= allows specifying the timeout in minutes (default is 30 
minutes); negative values indicate no timeout
 
+---+++ Changing job SLA definition and alerting
+   * slaenable command can be used to enable job sla alerts.
+   * sladisable command can be used to disable job sla alerts.
+   * slachange command can be used to change sla job definition.
+   * Supported parameters for sla change command are should-start, should-end 
and max-duration. Please specify the value in single quotes instead of double 
quotes in command line to avoid bash interpreting braces in EL functions and 
causing error.
+   * All sla commands takes -action or -date parameter. For bundle jobs 
additional -coordinator (coord_name/id) parameter can be passed. Sla change 
command need extra parameter -value to specify new sla definition.
+   * Sla commands without -action or -date parameter is applied to all non 
terminated actions and all future actions.
+   * Sla commands with -action or -date parameter will be applied to only non 
terminated actions.
+
+  Eg.
+  <verbatim>
+  $oozie job -slaenable <coord_Job_id> [-action 1,3-4,7-40] [-date 
2009-01-01T01:00Z::2009-05-31T23:59Z,2009-11-10T01:00Z::2009-12-31T22:00Z]
+  $oozie job -sladisable <coord_Job_id> [-action 1,3-4,7-40] [-date 
2009-01-01T01:00Z::2009-05-31T23:59Z,2009-11-10T01:00Z::2009-12-31T22:00Z]
+  $oozie job -slachange <coord_Job_id> [-action 1,3-4,7-40] [-date 
2009-01-01T01:00Z::2009-05-31T23:59Z,2009-11-10T01:00Z::2009-12-31T22:00Z] 
-value 'sla-max-duration=${10 * MINUTES};sla-should-end=${30 * 
MINUTES};sla-max-duration=${30 * MINUTES}'
+  $oozie job -slaenable <bundle_job_id> [-action 1,3-4,7-40] [-date 
2009-01-01T01:00Z::2009-05-31T23:59Z,2009-11-10T01:00Z::2009-12-31T22:00Z] 
[-coordinator <List_of_coord_names/ids]
+  </verbatim>
+
 ---++ Jobs Operations
 
 ---+++ Checking the Status of multiple Workflow Jobs

http://git-wip-us.apache.org/repos/asf/oozie/blob/0f4b0181/docs/src/site/twiki/DG_SLAMonitoring.twiki
----------------------------------------------------------------------
diff --git a/docs/src/site/twiki/DG_SLAMonitoring.twiki 
b/docs/src/site/twiki/DG_SLAMonitoring.twiki
index acf8ac1..1413945 100644
--- a/docs/src/site/twiki/DG_SLAMonitoring.twiki
+++ b/docs/src/site/twiki/DG_SLAMonitoring.twiki
@@ -294,6 +294,52 @@ SLA Details:
   Actual Duration (in mins) - -1
 </verbatim>
 
+---+++ Changing job SLA definition and alerting
+Following properties can be specified in job.xml to enable/disable SLA alerts.
+
+=oozie.sla.disable.alerts.older.than= this property can be specified in hours, 
the SLA notification for coord actions will be disabled whose nominal is time 
older then this value. Default is 24 hours.
+<verbatim>
+<property>
+    <name>oozie.sla.disable.alerts.older.than</name>
+    <value>12</value>
+</property>
+</verbatim>
+
+=oozie.sla.disable.alerts= List of coord actions to be disabled. Value can be 
specified as list of coord actions or date range.
+<verbatim>
+<property>
+    <name>oozie.sla.disable.alerts</name>
+    <value>1,3-4,7-10</value>
+</property>
+</verbatim>
+Will disable alert for coord actions 1,3,5,7,8,9,10
+
+=oozie.sla.enable.alerts= List of coord actions to be disabled. Value can be 
specified as list of coord actions or date range.
+<verbatim>
+<property>
+    <name>oozie.sla.disable.alerts</name>
+    <value>2009-01-01T01:00Z::2009-05-31T23:59Z</value>
+</property>
+</verbatim>
+This will enable SLA alert for coord actions whose nominal time is in between 
(inclusive) 2009-01-01T01:00Z and 2009-05-31T23:59Z.
+
+ALL keyword can be specified to specify all actions. Below property will 
disable SLA notifications for all coord actions.
+<verbatim>
+<property>
+    <name>oozie.sla.disable.alerts</name>
+    <value>ALL</value>
+</property>
+</verbatim>
+
+SLA alert enabling or disabling can also be modified through commandline or 
REST API after submission for running jobs.
+
+Refer [[DG_CommandLineTool#Changing_job_SLA_definition_and_alerting][Changing 
job SLA definition and alerting]] for commandline usage.
+Refer the REST API 
[[WebServicesAPI#Changing_job_SLA_definition_and_alerting][Changing job SLA 
definition and alerting]].
+
+SLA definition of should-start, should-end, nominal-time and max-duration can 
be changed for running jobs through commandline or REST API.
+Refer [[DG_CommandLineTool#Changing_job_SLA_definition_and_alerting][Changing 
job SLA definition and alerting]] for commandline usage.
+Refer the REST API 
[[WebServicesAPI#Changing_job_SLA_definition_and_alerting][Changing job SLA 
definition and alerting]].
+
 ---++ Known issues
 There are two known issues when you define SLA for a workflow action.
    * If there are decision nodes and SLA is defined for a workflow action not 
in the execution path because of the decision node, you will still get an 
SLA_MISS notification.

http://git-wip-us.apache.org/repos/asf/oozie/blob/0f4b0181/docs/src/site/twiki/WebServicesAPI.twiki
----------------------------------------------------------------------
diff --git a/docs/src/site/twiki/WebServicesAPI.twiki 
b/docs/src/site/twiki/WebServicesAPI.twiki
index c301b78..3dc359a 100644
--- a/docs/src/site/twiki/WebServicesAPI.twiki
+++ b/docs/src/site/twiki/WebServicesAPI.twiki
@@ -1520,6 +1520,48 @@ Content-Type: application/json;charset=UTF-8
 
 It accepts any valid Workflow Job ID, Coordinator Job ID, Coordinator Action 
ID, or Bundle Job ID.
 
+---++++ Changing job SLA definition and alerting
+An =HTTP PUT= request to change job SLA alert status/SLA definition.
+
+   * All sla commands takes actions-list or date parameter.
+   * =date=: a comma-separated list of date ranges. Each date range element is 
specified with dates separated by =::=
+   * =action-list=: a comma-separated list of action ranges. Each action range 
is specified with two action numbers separated by =-=
+   * For bundle jobs additional =coordinators= (coord_name/id) parameter can 
be passed.
+   * Sla change command need extra parameter =value= to specify new sla 
definition.
+
+
+   * Changing SLA definition
+   SLA definition of should-start, should-end, nominal-time and max-duration 
can be changed.
+
+<verbatim>
+PUT 
/oozie/v2/job/0000003-140319184715726-oozie-puru-C?action=sla-change&value=<key>=<value>;...;<key>=<value>
+</verbatim>
+
+   * Disabling SLA alert
+
+<verbatim>
+PUT 
/oozie/v2/job/0000003-140319184715726-oozie-puru-C?action=sla-disable&action-list=3-4
+</verbatim>
+Will disable SLA alert for actions 3 and 4.
+
+<verbatim>
+PUT 
/oozie/v1/job/0000003-140319184715726-oozie-puru-C?action=sla-disable&date=2009-02-01T00:10Z::2009-03-01T00:10Z
+</verbatim>
+Will disable SLA alert for actions whose nominal time is in-between 
2009-02-01T00:10Z 2009-03-01T00:10Z (inclusive).
+
+
+<verbatim>
+PUT 
/oozie/v1/job/0000004-140319184715726-oozie-puru-B?action=sla-disable&date=2009-02-01T00:10Z::2009-03-01T00:10Z&coordinators=abc
+</verbatim>
+For bundle jobs additional coordinators (list of comma separated 
coord_name/id) parameter can be passed.
+
+   * Enabling SLA alert
+
+<verbatim>
+PUT 
/oozie/v2/job/0000003-140319184715726-oozie-puru-C?action=sla-enable&action-list=1,14,17-20
+</verbatim>
+Will enable SLA alert for actions 1,14,17,18,19,20.
+
 ---++++ Jobs Information
 
 A HTTP GET request retrieves workflow and coordinator jobs information.

http://git-wip-us.apache.org/repos/asf/oozie/blob/0f4b0181/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index be11f2c..24d594d 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -1,5 +1,6 @@
 -- Oozie 4.2.0 release (trunk - unreleased)
 
+OOZIE-1913 Devise a way to turn off SLA alerts for bundle/coordinator flexibly 
(puru)
 OOZIE-2071 Add a Spark example (pavan kumar via rkanter)
 OOZIE-2145 ZooKeeper paths should start with a "/" (rkanter)
 OOZIE-2113 Oozie Command Line Utilities are failing as hadoop-auth jar not 
found (shwethags)

http://git-wip-us.apache.org/repos/asf/oozie/blob/0f4b0181/webapp/src/main/webapp/console/sla/js/oozie-sla-table.js
----------------------------------------------------------------------
diff --git a/webapp/src/main/webapp/console/sla/js/oozie-sla-table.js 
b/webapp/src/main/webapp/console/sla/js/oozie-sla-table.js
index 1a88671..7ae604c 100644
--- a/webapp/src/main/webapp/console/sla/js/oozie-sla-table.js
+++ b/webapp/src/main/webapp/console/sla/js/oozie-sla-table.js
@@ -34,6 +34,7 @@ var columnsToShow = [
               { "mData": "jobStatus", "sDefaultContent": ""},
               { "mData": "parentId", "sDefaultContent": "", "bVisible": false},
               { "mData": "appName", "bVisible": false},
+              { "mData": "slaAlertStatus", "bVisible": false},
              ];
 
 $.fn.dataTableExt.oApi.fnGetTds  = function ( oSettings, mTr )

http://git-wip-us.apache.org/repos/asf/oozie/blob/0f4b0181/webapp/src/main/webapp/console/sla/oozie-sla.html
----------------------------------------------------------------------
diff --git a/webapp/src/main/webapp/console/sla/oozie-sla.html 
b/webapp/src/main/webapp/console/sla/oozie-sla.html
index 23e8af2..e5bf627 100644
--- a/webapp/src/main/webapp/console/sla/oozie-sla.html
+++ b/webapp/src/main/webapp/console/sla/oozie-sla.html
@@ -101,6 +101,7 @@
                             <th>Job Status</th>
                             <th>Parent Id</th>
                             <th>AppName</th>
+                            <th>Sla Alert</th>
                         </tr>
                     </thead>
                 </table>

Reply via email to