You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@falcon.apache.org by aj...@apache.org on 2016/01/11 10:47:22 UTC

[2/4] falcon git commit: FALCON-1701 HiveDr, ClusterSetupTest, MirrorSummaryTest fixes. Contributed by Murali Ramasami.

FALCON-1701 HiveDr, ClusterSetupTest, MirrorSummaryTest fixes. Contributed by Murali Ramasami.


Project: http://git-wip-us.apache.org/repos/asf/falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/f8e98f4f
Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/f8e98f4f
Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/f8e98f4f

Branch: refs/heads/master
Commit: f8e98f4f690d3302797edf5fbf7f3ad166236bcb
Parents: f995342
Author: Ajay Yadava <aj...@gmail.com>
Authored: Mon Jan 11 14:45:08 2016 +0530
Committer: Ajay Yadava <aj...@gmail.com>
Committed: Mon Jan 11 14:45:08 2016 +0530

----------------------------------------------------------------------
 falcon-regression/CHANGES.txt                   |  2 +
 .../regression/ui/search/ClusterWizardPage.java | 80 ++++++++++++++++++--
 .../regression/hcat/HCatFeedOperationsTest.java | 29 -------
 .../regression/searchUI/ClusterSetupTest.java   | 59 +++++++++++++++
 .../regression/searchUI/MirrorSummaryTest.java  |  2 +-
 .../hive-disaster-recovery-template.xml         |  1 +
 .../hive-disaster-recovery-workflow.xml         | 42 ----------
 .../hive-disaster-recovery.properties           |  6 +-
 .../hive-disaster-recovery-template.xml         |  1 +
 .../hive-disaster-recovery-workflow.xml         | 50 +-----------
 .../hive-disaster-recovery.properties           |  5 +-
 .../hive-disaster-recovery-secure-template.xml  |  1 +
 .../hive-disaster-recovery-secure-workflow.xml  | 50 +-----------
 .../hive-disaster-recovery-secure.properties    |  5 +-
 14 files changed, 151 insertions(+), 182 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/f8e98f4f/falcon-regression/CHANGES.txt
----------------------------------------------------------------------
diff --git a/falcon-regression/CHANGES.txt b/falcon-regression/CHANGES.txt
index 1888401..a4ae687 100644
--- a/falcon-regression/CHANGES.txt
+++ b/falcon-regression/CHANGES.txt
@@ -385,6 +385,8 @@ Trunk (Unreleased)
    FALCON-681 delete duplicate feed retention test from falcon regression (SamarthG)
 
   BUG FIXES
+   FALCON-1701 HiveDr, ClusterSetupTest, MirrorSummaryTest fixes(Murali Ramasami via Ajay Yadava)
+
    FALCON-1489 Partial status http response code returns 200(Pragya Mittal via Ajay Yadava)
 
    FALCON-1388 Fix merge conflicts produced by FALCON-1002 (Paul Isaychuk)

http://git-wip-us.apache.org/repos/asf/falcon/blob/f8e98f4f/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/ClusterWizardPage.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/ClusterWizardPage.java b/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/ClusterWizardPage.java
index f19fc23..41fc120 100644
--- a/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/ClusterWizardPage.java
+++ b/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/ClusterWizardPage.java
@@ -286,7 +286,46 @@ public class ClusterWizardPage extends EntityWizardPage {
     }
 
     /**
-     * Retrieves hte value of the summary box and parses it to cluster properties.
+     * Method to assert the staging and Working location are same.
+     */
+    public void assertLocationsEqualError(){
+
+        // Assertion for Staging Location.
+        LOGGER.info(" Assertion for Staging Directory ");
+        Assert.assertTrue(checkErrorMessageByElement("input[contains(@id,'location.staging')]//following-sibling::"
+                + "span[contains(@ng-show, 'locationsEqualError')]",
+                "Staging and Working location should be different"));
+
+        // Assertion for Working Location.
+        LOGGER.info("Assertion for Working Directory");
+        Assert.assertTrue(checkErrorMessageByElement("input[contains(@id,'location.working')]//following-sibling::"
+                + "span[contains(@ng-show, 'locationsEqualError')]",
+                "Staging and Working location should be different"));
+    }
+
+    /**
+     * Method to get the Error text message displayed based on Xpath and compares.
+     * with the input string paramater : errMessage
+     * @param elementTag elementTag
+     * @param errMessage errMessage
+     */
+    public boolean checkErrorMessageByElement(String elementTag, String errMessage) {
+
+        List<WebElement> elements = clusterBox.findElements(By.xpath("//" + elementTag));
+        if (!elements.isEmpty()){
+            for (WebElement element : elements) {
+                Assert.assertEquals(element.getText(), errMessage);
+                LOGGER.info("Error Message Displayed : " + element.getText());
+            }
+            return true;
+        }else{
+            LOGGER.info(" No Elements found with the xpath " + elementTag);
+            return false;
+        }
+    }
+
+    /**
+     * Retrieves the value of the summary box and parses it to cluster properties.
      * @param draft empty cluster to contain all properties.
      * @return cluster filled with properties from the summary.
      */
@@ -296,12 +335,16 @@ public class ClusterWizardPage extends EntityWizardPage {
         LOGGER.info("Summary block text : " + summaryBoxText);
 
         String[] slices;
+        String value;
+        String path;
+        String label;
+
         //retrieve basic properties
         String basicProps = summaryBoxText.split("ACL")[0];
         for (String line : basicProps.split("\\n")) {
             slices = line.split(" ");
-            String label = slices[0].replace(":", "").trim();
-            String value = slices[1].trim();
+            label = slices[0].replace(":", "").trim();
+            value = getValueFromSlices(slices, line);
             switch (label) {
             case "Name":
                 cluster.setName(value);
@@ -333,7 +376,7 @@ public class ClusterWizardPage extends EntityWizardPage {
         String interfaces = propsLeft.split(nextLabel)[0].trim();
         for (String line : interfaces.split("\\n")) {
             slices = line.split(" ");
-            String label = slices[0].replace(":", "").trim();
+            label = slices[0].replace(":", "").trim();
             String endpoint = slices[1].trim();
             String version = slices[3].trim();
             switch (label) {
@@ -366,16 +409,16 @@ public class ClusterWizardPage extends EntityWizardPage {
             for (String line : properties.split("\\n")) {
                 int indx = line.indexOf(":");
                 String name = line.substring(0, indx).trim();
-                String value = line.substring(indx + 1, line.length()).trim();
+                value = line.substring(indx + 1, line.length()).trim();
                 cluster.withProperty(name, value);
             }
         }
         //retrieve locations
         propsLeft = propsLeft.split("Locations")[1].trim();
         for (String line : propsLeft.split("\\n")) {
-            slices = line.split(":");
-            String label = slices[0].trim();
-            String path = slices[1].trim();
+            slices = line.split(" ");
+            label = slices[0].replace(":", "").trim();
+            path = getValueFromSlices(slices, line);
             switch (label) {
             case "staging":
                 cluster.addLocation(ClusterLocationType.STAGING, path);
@@ -408,6 +451,14 @@ public class ClusterWizardPage extends EntityWizardPage {
     }
 
     /**
+     *  Click on next button in the cluster creation page.
+     */
+    public void clickJustNext() {
+        next.click();
+        waitForAngularToFinish();
+    }
+
+    /**
      * Click on save button.
      */
     public void clickSave() {
@@ -455,6 +506,19 @@ public class ClusterWizardPage extends EntityWizardPage {
     }
 
     /**
+     * Method preventing the NullPointerException.
+     */
+    public String getValueFromSlices(String[] slices, String line) {
+        String trimValue;
+        if (slices[0].length()==(line.length())) {
+            trimValue = "";
+        }else {
+            trimValue = slices[1].trim();
+        }
+        return trimValue;
+    }
+
+    /**
      * Checks whether registry interface is enabled for input or not.
      */
     public boolean isRegistryEnabled() {

http://git-wip-us.apache.org/repos/asf/falcon/blob/f8e98f4f/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/hcat/HCatFeedOperationsTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/hcat/HCatFeedOperationsTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/hcat/HCatFeedOperationsTest.java
index 27417bd..eb20d7c 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/hcat/HCatFeedOperationsTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/hcat/HCatFeedOperationsTest.java
@@ -152,35 +152,6 @@ public class HCatFeedOperationsTest extends BaseTestClass {
     }
 
     /**
-     * Submit Hcat Replication feed when Hcat table mentioned in table uri does not exist on target. The response is
-     * Partial, with successful with submit/schedule on source.
-     *
-     * @throws Exception
-     */
-    @Test
-    public void submitAndScheduleReplicationFeedWhenTableDoesNotExistOnTarget() throws Exception {
-        Bundle.submitCluster(bundles[0], bundles[1]);
-        final String startDate = "2010-01-01T20:00Z";
-        final String endDate = "2099-01-01T00:00Z";
-        String tableUri = "catalog:" + dbName + ":" + randomTblName + "#year=${YEAR}";
-        bundles[0].setInputFeedPeriodicity(1, Frequency.TimeUnit.hours);
-        bundles[0].setInputFeedValidity(startDate, endDate);
-        bundles[0].setInputFeedTableUri(tableUri);
-
-        feed = bundles[0].getDataSets().get(0);
-        // set cluster 2 as the target.
-        feed = FeedMerlin.fromString(feed).addFeedCluster(
-            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[1].getClusters().get(0)))
-                .withRetention("months(9000)", ActionType.DELETE)
-                .withValidity(startDate, endDate)
-                .withClusterType(ClusterType.TARGET)
-                .withTableUri(tableUri)
-                .build()).toString();
-
-        AssertUtil.assertPartial(prism.getFeedHelper().submitAndSchedule(feed));
-    }
-
-    /**
      * Submit Hcat Replication feed when Hcat table mentioned in table uri exists on both source and target.
      * The response is  Psucceeded, and a replication co-rdinator should apear on target oozie.
      * The test however does not ensure that

http://git-wip-us.apache.org/repos/asf/falcon/blob/f8e98f4f/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/ClusterSetupTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/ClusterSetupTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/ClusterSetupTest.java
index e0b69e1..f43212a 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/ClusterSetupTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/ClusterSetupTest.java
@@ -286,6 +286,65 @@ public class ClusterSetupTest extends BaseUITestClass{
     }
 
     /**
+     * Specify the same directory locations for staging and working location.
+     * Check that user is not allowed to create a cluster with same directory for both with proper error message.
+     */
+    @Test
+    public void testSameLocations() throws IOException {
+
+        //get the staging directory location
+        String staging = sourceCluster.getLocation(ClusterLocationType.STAGING).getPath();
+
+        //set the working directory to staging directory
+        sourceCluster.getLocation(ClusterLocationType.WORKING).setPath(staging);
+
+        clusterSetup.fillForm(sourceCluster);
+        clusterSetup.clickJustNext();
+        clusterSetup.assertLocationsEqualError();
+    }
+
+    /**
+     * Default cluster creation scenario with Optional fields set with Empty values. Click next. Return back and click.
+     * next again. Check that all values are present on Summary page. Save cluster.
+     * Check the cluster definition trough /definition API.
+     */
+    @Test
+    public void testOptionalfields()
+        throws URISyntaxException, AuthenticationException, InterruptedException, IOException {
+
+        // Set the Description value to empty
+        sourceCluster.setDescription("");
+        // Set the temp location value to empty
+        sourceCluster.getLocation(ClusterLocationType.TEMP).setPath("");
+        // Now fill the form with the above values for optional fields
+        clusterSetup.fillForm(sourceCluster);
+
+        clusterSetup.clickNext();
+        clusterSetup.clickPrevious();
+        clusterSetup.clickNext();
+
+        ClusterMerlin summaryBlock = clusterSetup.getSummary(sourceCluster.getEmptyCluster());
+        //summary block should contain the same info as source
+        sourceCluster.assertEquals(summaryBlock);
+        clusterSetup.clickSave();
+
+        String alertText = clusterSetup.getActiveAlertText();
+        Assert.assertEquals(alertText, "falcon/default/Submit successful (cluster) " + sourceCluster.getName());
+
+        //check the same via notifications bar
+        clusterSetup.getPageHeader().validateNotificationCountAndCheckLast(1,
+                "falcon/default/Submit successful (cluster) " + sourceCluster.getName());
+
+        ClusterMerlin definition = new ClusterMerlin(cluster.getClusterHelper().
+                getEntityDefinition(bundles[0].getClusterElement().toString()).getMessage());
+
+        //definition should be the same that the source
+        sourceCluster.assertEquals(definition);
+    }
+
+
+
+    /**
      * Validate alert lifetime.
      */
     @Test

http://git-wip-us.apache.org/repos/asf/falcon/blob/f8e98f4f/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/MirrorSummaryTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/MirrorSummaryTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/MirrorSummaryTest.java
index 0a788f0..ce014ef 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/MirrorSummaryTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/MirrorSummaryTest.java
@@ -60,7 +60,7 @@ public class MirrorSummaryTest extends BaseUITestClass{
         baseMap.put(Summary.MAX_BANDWIDTH, "100");
         baseMap.put(Summary.ACL_OWNER, LoginPage.UI_DEFAULT_USER);
         baseMap.put(Summary.ACL_GROUP, "users");
-        baseMap.put(Summary.ACL_PERMISSIONS, "0x755");
+        baseMap.put(Summary.ACL_PERMISSIONS, "0755");
         baseMap.put(Summary.RETRY_POLICY, "periodic");
         baseMap.put(Summary.RETRY_DELAY, "30 minutes");
         baseMap.put(Summary.RETRY_ATTEMPTS, "3");

http://git-wip-us.apache.org/repos/asf/falcon/blob/f8e98f4f/falcon-regression/merlin/src/test/resources/HdfsRecipe/hive-disaster-recovery-template.xml
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/resources/HdfsRecipe/hive-disaster-recovery-template.xml b/falcon-regression/merlin/src/test/resources/HdfsRecipe/hive-disaster-recovery-template.xml
index c644b99..46546ce 100644
--- a/falcon-regression/merlin/src/test/resources/HdfsRecipe/hive-disaster-recovery-template.xml
+++ b/falcon-regression/merlin/src/test/resources/HdfsRecipe/hive-disaster-recovery-template.xml
@@ -39,5 +39,6 @@
 
     <workflow name="##falcon.recipe.workflow.name##" engine="oozie" path="/apps/data-mirroring/workflows/hdfs-replication-workflow.xml" lib="##workflow.lib.path##"/>
     <retry policy="##falcon.recipe.retry.policy##" delay="##falcon.recipe.retry.delay##" attempts="3"/>
+    <notification type="##falcon.recipe.notification.type##" to="##falcon.recipe.notification.receivers##"/>
     <ACL/>
 </process>

http://git-wip-us.apache.org/repos/asf/falcon/blob/f8e98f4f/falcon-regression/merlin/src/test/resources/HdfsRecipe/hive-disaster-recovery-workflow.xml
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/resources/HdfsRecipe/hive-disaster-recovery-workflow.xml b/falcon-regression/merlin/src/test/resources/HdfsRecipe/hive-disaster-recovery-workflow.xml
index aa4d5b0..7c4c53a 100644
--- a/falcon-regression/merlin/src/test/resources/HdfsRecipe/hive-disaster-recovery-workflow.xml
+++ b/falcon-regression/merlin/src/test/resources/HdfsRecipe/hive-disaster-recovery-workflow.xml
@@ -66,48 +66,6 @@
             <arg>-counterLogDir</arg>
             <arg>${logDir}/job-${nominalTime}</arg>
         </java>
-        <ok to="success"/>
-        <error to="failure"/>
-    </action>
-    <decision name="success">
-        <switch>
-            <case to="successAlert">
-                ${drNotificationReceivers ne 'NA'}
-            </case>
-            <default to="end"/>
-        </switch>
-    </decision>
-    <decision name="failure">
-        <switch>
-            <case to="failureAlert">
-                ${drNotificationReceivers ne 'NA'}
-            </case>
-            <default to="fail"/>
-        </switch>
-    </decision>
-    <action name="successAlert">
-        <email xmlns="uri:oozie:email-action:0.2">
-            <to>${drNotificationReceivers}</to>
-            <subject>INFO: HDFS DR workflow ${entityName} completed successfully</subject>
-            <body>
-                The HDFS DR workflow ${wf:id()} is successful.
-                Source      =   ${drSourceClusterFS}${drSourceDir}
-                Target      =   ${drTargetClusterFS}${drTargetDir}
-            </body>
-        </email>
-        <ok to="end"/>
-        <error to="end"/>
-    </action>
-    <action name="failureAlert">
-        <email xmlns="uri:oozie:email-action:0.2">
-            <to>${drNotificationReceivers}</to>
-            <subject>ERROR: HDFS DR workflow ${entityName} failed</subject>
-            <body>
-                The workflow ${wf:id()} had issues and was killed.  The error message is: ${wf:errorMessage(wf:lastErrorNode())}
-                Source      =   ${drSourceClusterFS}${drSourceDir}
-                Target      =   ${drTargetClusterFS}${drTargetDir}
-            </body>
-        </email>
         <ok to="end"/>
         <error to="fail"/>
     </action>

http://git-wip-us.apache.org/repos/asf/falcon/blob/f8e98f4f/falcon-regression/merlin/src/test/resources/HdfsRecipe/hive-disaster-recovery.properties
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/resources/HdfsRecipe/hive-disaster-recovery.properties b/falcon-regression/merlin/src/test/resources/HdfsRecipe/hive-disaster-recovery.properties
index 99f748d..fb2a4fc 100644
--- a/falcon-regression/merlin/src/test/resources/HdfsRecipe/hive-disaster-recovery.properties
+++ b/falcon-regression/merlin/src/test/resources/HdfsRecipe/hive-disaster-recovery.properties
@@ -71,5 +71,7 @@ distcpMaxMaps=1
 # Change it to specify the bandwidth in MB for each mapper in DistCP
 distcpMapBandwidth=100
 
-##### Email on failure
-drNotificationReceivers=NA
\ No newline at end of file
+##### Email Notification for Falcon instance completion
+falcon.recipe.notification.type=email
+falcon.recipe.notification.receivers=NA
+

http://git-wip-us.apache.org/repos/asf/falcon/blob/f8e98f4f/falcon-regression/merlin/src/test/resources/HiveDrRecipe/hive-disaster-recovery-template.xml
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/resources/HiveDrRecipe/hive-disaster-recovery-template.xml b/falcon-regression/merlin/src/test/resources/HiveDrRecipe/hive-disaster-recovery-template.xml
index 3afbef0..c11c2bb 100644
--- a/falcon-regression/merlin/src/test/resources/HiveDrRecipe/hive-disaster-recovery-template.xml
+++ b/falcon-regression/merlin/src/test/resources/HiveDrRecipe/hive-disaster-recovery-template.xml
@@ -40,5 +40,6 @@
     <workflow name="##workflow.name##" engine="oozie"
               path="/apps/data-mirroring/workflows/hive-disaster-recovery-workflow.xml" lib="##workflow.lib.path##"/>
     <retry policy="##retry.policy##" delay="##retry.delay##" attempts="3"/>
+    <notification type="##falcon.recipe.notification.type##" to="##falcon.recipe.notification.receivers##"/>
     <ACL/>
 </process>

http://git-wip-us.apache.org/repos/asf/falcon/blob/f8e98f4f/falcon-regression/merlin/src/test/resources/HiveDrRecipe/hive-disaster-recovery-workflow.xml
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/resources/HiveDrRecipe/hive-disaster-recovery-workflow.xml b/falcon-regression/merlin/src/test/resources/HiveDrRecipe/hive-disaster-recovery-workflow.xml
index c441998..72d40a3 100644
--- a/falcon-regression/merlin/src/test/resources/HiveDrRecipe/hive-disaster-recovery-workflow.xml
+++ b/falcon-regression/merlin/src/test/resources/HiveDrRecipe/hive-disaster-recovery-workflow.xml
@@ -84,7 +84,7 @@
             <arg>lastevents</arg>
         </java>
         <ok to="export-dr-replication"/>
-        <error to="failure"/>
+        <error to="fail"/>
     </action>
     <!-- Export Replication action -->
     <action name="export-dr-replication">
@@ -160,7 +160,7 @@
             <arg>export</arg>
         </java>
         <ok to="import-dr-replication"/>
-        <error to="failure"/>
+        <error to="fail"/>
     </action>
     <!-- Import Replication action -->
     <action name="import-dr-replication">
@@ -235,52 +235,6 @@
             <arg>-executionStage</arg>
             <arg>import</arg>
         </java>
-        <ok to="success"/>
-        <error to="failure"/>
-    </action>
-    <decision name="success">
-        <switch>
-            <case to="successAlert">
-                ${drNotificationReceivers ne 'NA'}
-            </case>
-            <default to="end"/>
-        </switch>
-    </decision>
-    <decision name="failure">
-        <switch>
-            <case to="failureAlert">
-                ${drNotificationReceivers ne 'NA'}
-            </case>
-            <default to="fail"/>
-        </switch>
-    </decision>
-    <action name="successAlert">
-        <email xmlns="uri:oozie:email-action:0.2">
-            <to>${drNotificationReceivers}</to>
-            <subject>INFO: Hive DR workflow ${drJobName} completed successfully</subject>
-            <body>
-                The Hive DR workflow ${wf:id()} is successful.
-                Source          = ${sourceCluster}
-                Target          = ${targetCluster}
-                DB Name         = ${sourceDatabase}
-                Table Name      = ${sourceTable}
-            </body>
-        </email>
-        <ok to="end"/>
-        <error to="end"/>
-    </action>
-    <action name="failureAlert">
-        <email xmlns="uri:oozie:email-action:0.2">
-            <to>${drNotificationReceivers}</to>
-            <subject>ERROR: Hive DR workflow ${drJobName} failed</subject>
-            <body>
-                The Hive DR workflow ${wf:id()} had issues and was killed.  The error message is: ${wf:errorMessage(wf:lastErrorNode())}
-                Source          = ${sourceCluster}
-                Target          = ${targetCluster}
-                DB Name         = ${sourceDatabase}
-                Table Name      = ${sourceTable}
-            </body>
-        </email>
         <ok to="end"/>
         <error to="fail"/>
     </action>

http://git-wip-us.apache.org/repos/asf/falcon/blob/f8e98f4f/falcon-regression/merlin/src/test/resources/HiveDrRecipe/hive-disaster-recovery.properties
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/resources/HiveDrRecipe/hive-disaster-recovery.properties b/falcon-regression/merlin/src/test/resources/HiveDrRecipe/hive-disaster-recovery.properties
index de7f7f9..dd781a5 100644
--- a/falcon-regression/merlin/src/test/resources/HiveDrRecipe/hive-disaster-recovery.properties
+++ b/falcon-regression/merlin/src/test/resources/HiveDrRecipe/hive-disaster-recovery.properties
@@ -90,6 +90,7 @@ distcpMaxMaps=1
 # Change it to specify the bandwidth in MB for each mapper in DistCP
 distcpMapBandwidth=100
 
-##### Email on failure
-drNotificationReceivers=NA
+##### Email Notification for Falcon instance completion
+falcon.recipe.notification.type=email
+falcon.recipe.notification.receivers=NA
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/f8e98f4f/falcon-regression/merlin/src/test/resources/HiveDrSecureRecipe/hive-disaster-recovery-secure-template.xml
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/resources/HiveDrSecureRecipe/hive-disaster-recovery-secure-template.xml b/falcon-regression/merlin/src/test/resources/HiveDrSecureRecipe/hive-disaster-recovery-secure-template.xml
index 3afbef0..c11c2bb 100644
--- a/falcon-regression/merlin/src/test/resources/HiveDrSecureRecipe/hive-disaster-recovery-secure-template.xml
+++ b/falcon-regression/merlin/src/test/resources/HiveDrSecureRecipe/hive-disaster-recovery-secure-template.xml
@@ -40,5 +40,6 @@
     <workflow name="##workflow.name##" engine="oozie"
               path="/apps/data-mirroring/workflows/hive-disaster-recovery-workflow.xml" lib="##workflow.lib.path##"/>
     <retry policy="##retry.policy##" delay="##retry.delay##" attempts="3"/>
+    <notification type="##falcon.recipe.notification.type##" to="##falcon.recipe.notification.receivers##"/>
     <ACL/>
 </process>

http://git-wip-us.apache.org/repos/asf/falcon/blob/f8e98f4f/falcon-regression/merlin/src/test/resources/HiveDrSecureRecipe/hive-disaster-recovery-secure-workflow.xml
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/resources/HiveDrSecureRecipe/hive-disaster-recovery-secure-workflow.xml b/falcon-regression/merlin/src/test/resources/HiveDrSecureRecipe/hive-disaster-recovery-secure-workflow.xml
index 7362c2e..74902b4 100644
--- a/falcon-regression/merlin/src/test/resources/HiveDrSecureRecipe/hive-disaster-recovery-secure-workflow.xml
+++ b/falcon-regression/merlin/src/test/resources/HiveDrSecureRecipe/hive-disaster-recovery-secure-workflow.xml
@@ -148,7 +148,7 @@
             <arg>lastevents</arg>
         </java>
         <ok to="export-dr-replication"/>
-        <error to="failure"/>
+        <error to="fail"/>
     </action>
     <!-- Export Replication action -->
     <action name="export-dr-replication" cred="hive_src_credentials,hive2_src_credentials">
@@ -246,7 +246,7 @@
             <arg>export</arg>
         </java>
         <ok to="import-dr-replication"/>
-        <error to="failure"/>
+        <error to="fail"/>
     </action>
     <!-- Import Replication action -->
     <action name="import-dr-replication" cred="hive_tgt_credentials,hive2_tgt_credentials">
@@ -343,52 +343,6 @@
             <arg>-executionStage</arg>
             <arg>import</arg>
         </java>
-        <ok to="success"/>
-        <error to="failure"/>
-    </action>
-    <decision name="success">
-        <switch>
-            <case to="successAlert">
-                ${drNotificationReceivers ne 'NA'}
-            </case>
-            <default to="end"/>
-        </switch>
-    </decision>
-    <decision name="failure">
-        <switch>
-            <case to="failureAlert">
-                ${drNotificationReceivers ne 'NA'}
-            </case>
-            <default to="fail"/>
-        </switch>
-    </decision>
-    <action name="successAlert">
-        <email xmlns="uri:oozie:email-action:0.2">
-            <to>${drNotificationReceivers}</to>
-            <subject>INFO: Hive DR workflow ${drJobName} completed successfully</subject>
-            <body>
-                The Hive DR workflow ${wf:id()} is successful.
-                Source          = ${sourceCluster}
-                Target          = ${targetCluster}
-                DB Name         = ${sourceDatabase}
-                Table Name      = ${sourceTable}
-            </body>
-        </email>
-        <ok to="end"/>
-        <error to="end"/>
-    </action>
-    <action name="failureAlert">
-        <email xmlns="uri:oozie:email-action:0.2">
-            <to>${drNotificationReceivers}</to>
-            <subject>ERROR: Hive DR workflow ${drJobName} failed</subject>
-            <body>
-                The Hive DR workflow ${wf:id()} had issues and was killed.  The error message is: ${wf:errorMessage(wf:lastErrorNode())}
-                Source          = ${sourceCluster}
-                Target          = ${targetCluster}
-                DB Name         = ${sourceDatabase}
-                Table Name      = ${sourceTable}
-            </body>
-        </email>
         <ok to="end"/>
         <error to="fail"/>
     </action>

http://git-wip-us.apache.org/repos/asf/falcon/blob/f8e98f4f/falcon-regression/merlin/src/test/resources/HiveDrSecureRecipe/hive-disaster-recovery-secure.properties
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/resources/HiveDrSecureRecipe/hive-disaster-recovery-secure.properties b/falcon-regression/merlin/src/test/resources/HiveDrSecureRecipe/hive-disaster-recovery-secure.properties
index ff2611f..da0bcd1 100644
--- a/falcon-regression/merlin/src/test/resources/HiveDrSecureRecipe/hive-disaster-recovery-secure.properties
+++ b/falcon-regression/merlin/src/test/resources/HiveDrSecureRecipe/hive-disaster-recovery-secure.properties
@@ -100,5 +100,6 @@ distcpMaxMaps=1
 # Change it to specify the bandwidth in MB for each mapper in DistCP
 distcpMapBandwidth=100
 
-##### Email on failure
-drNotificationReceivers=NA
+##### Email Notification for Falcon instance completion
+falcon.recipe.notification.type=email
+falcon.recipe.notification.receivers=NA