falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prag...@apache.org
Subject falcon git commit: FALCON-2133 Disable the LogMover from FeedReplication on secure mode.
Date Thu, 01 Sep 2016 17:49:18 GMT
Repository: falcon
Updated Branches:
  refs/heads/master d2c8adfad -> 864458918


FALCON-2133 Disable the LogMover from FeedReplication on secure mode.

LogMover is only supported in case of un-secure mode. It has to be disable in the secure mode.
In FeedReplication test cases, LogMover assertions will be done after the functionality tested
covered. In this cases, we need to verify the functionality but only disable LogMover.

Author: Murali Ramasami <mramasami@hortonworks.com>

Reviewers: "Pragya Mittal <mittal.pragya23@gmail.com>"

Closes #277 from muraliramasami/master and squashes the following commits:

8e5a37a [Murali Ramasami] FALCON-2133: Disable the LogMover assertions from FeedReplication
on Secure Mode
c1a8b60 [Murali Ramasami] FALCON-2133: Disable the LogMover assertions from FeedReplication
on Secure Mode


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

Branch: refs/heads/master
Commit: 864458918f11c6b63088393e1a573a56146af5d9
Parents: d2c8adf
Author: Murali Ramasami <mramasami@hortonworks.com>
Authored: Thu Sep 1 23:18:22 2016 +0530
Committer: Pragya Mittal <mittal.pragya23@gmail.com>
Committed: Thu Sep 1 23:18:22 2016 +0530

----------------------------------------------------------------------
 .../falcon/regression/FeedReplicationTest.java  | 26 ++++++++++++++------
 .../apache/falcon/regression/LogMoverTest.java  | 10 ++++++++
 2 files changed, 28 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/86445891/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedReplicationTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedReplicationTest.java
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedReplicationTest.java
index 3367817..ffdb9dc 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedReplicationTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedReplicationTest.java
@@ -23,6 +23,7 @@ import org.apache.falcon.entity.v0.feed.ActionType;
 import org.apache.falcon.entity.v0.feed.ClusterType;
 import org.apache.falcon.regression.Entities.FeedMerlin;
 import org.apache.falcon.regression.core.bundle.Bundle;
+import org.apache.falcon.regression.core.enumsAndConstants.MerlinConstants;
 import org.apache.falcon.regression.core.helpers.ColoHelper;
 import org.apache.falcon.regression.core.supportClasses.ExecResult;
 import org.apache.falcon.regression.core.util.AssertUtil;
@@ -176,8 +177,10 @@ public class FeedReplicationTest extends BaseTestClass {
         //_SUCCESS should exist in target
         Assert.assertEquals(HadoopUtil.getSuccessFolder(cluster2FS, toTarget, ""), true);
 
-        AssertUtil.assertLogMoverPath(true, Util.readEntityName(feed.toString()),
-            cluster2FS, "feed", "Success logs are not present");
+        if (!MerlinConstants.IS_SECURE){
+            AssertUtil.assertLogMoverPath(true, Util.readEntityName(feed.toString()),
+                    cluster2FS, "feed", "Success logs are not present");
+        }
 
         ExecResult execResult = cluster1.getFeedHelper().getCLIMetrics(feed.getName());
         AssertUtil.assertCLIMetrics(execResult, feed.getName(), 1, dataFlag);
@@ -280,8 +283,10 @@ public class FeedReplicationTest extends BaseTestClass {
         Assert.assertEquals(HadoopUtil.getSuccessFolder(cluster2FS, toTarget, ""), true);
         Assert.assertEquals(HadoopUtil.getSuccessFolder(cluster3FS, toTarget, ""), true);
 
-        AssertUtil.assertLogMoverPath(true, Util.readEntityName(feed.toString()),
-            cluster2FS, "feed", "Success logs are not present");
+        if (!MerlinConstants.IS_SECURE){
+            AssertUtil.assertLogMoverPath(true, Util.readEntityName(feed.toString()),
+                    cluster2FS, "feed", "Success logs are not present");
+        }
 
         ExecResult execResult = cluster1.getFeedHelper().getCLIMetrics(feed.getName());
         AssertUtil.assertCLIMetrics(execResult, feed.getName(), 1, dataFlag);
@@ -390,8 +395,10 @@ public class FeedReplicationTest extends BaseTestClass {
         //availabilityFlag should exist in target
         Assert.assertEquals(HadoopUtil.getSuccessFolder(cluster2FS, toTarget, availabilityFlagName),
true);
 
-        AssertUtil.assertLogMoverPath(true, Util.readEntityName(feed.toString()),
-            cluster2FS, "feed", "Success logs are not present");
+        if (!MerlinConstants.IS_SECURE){
+            AssertUtil.assertLogMoverPath(true, Util.readEntityName(feed.toString()),
+                    cluster2FS, "feed", "Success logs are not present");
+        }
 
         ExecResult execResult = cluster1.getFeedHelper().getCLIMetrics(feed.getName());
         AssertUtil.assertCLIMetrics(execResult, feed.getName(), 1, dataFlag);
@@ -563,8 +570,11 @@ public class FeedReplicationTest extends BaseTestClass {
         InstanceUtil.waitTillInstanceReachState(cluster2OC, feed.getName(), 1,
                 CoordinatorAction.Status.KILLED, EntityType.FEED);
 
-        AssertUtil.assertLogMoverPath(false, Util.readEntityName(feed.toString()),
-                cluster2FS, "feed", "Success logs are not present");
+        if (!MerlinConstants.IS_SECURE){
+            AssertUtil.assertLogMoverPath(true, Util.readEntityName(feed.toString()),
+                    cluster2FS, "feed", "Success logs are not present");
+        }
+
     }
 
     /* Flag value denotes whether to add data for replication or not.

http://git-wip-us.apache.org/repos/asf/falcon/blob/86445891/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/LogMoverTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/LogMoverTest.java
b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/LogMoverTest.java
index cb194f8..b63ac74 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/LogMoverTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/LogMoverTest.java
@@ -22,6 +22,7 @@ import org.apache.falcon.entity.v0.EntityType;
 import org.apache.falcon.entity.v0.Frequency.TimeUnit;
 import org.apache.falcon.regression.Entities.ProcessMerlin;
 import org.apache.falcon.regression.core.bundle.Bundle;
+import org.apache.falcon.regression.core.enumsAndConstants.MerlinConstants;
 import org.apache.falcon.regression.core.helpers.ColoHelper;
 import org.apache.falcon.regression.core.util.AssertUtil;
 import org.apache.falcon.regression.core.util.BundleUtil;
@@ -37,7 +38,9 @@ import org.apache.log4j.Logger;
 import org.apache.oozie.client.CoordinatorAction;
 import org.apache.oozie.client.Job;
 import org.apache.oozie.client.OozieClient;
+import org.testng.SkipException;
 import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 
@@ -65,6 +68,13 @@ public class LogMoverTest extends BaseTestClass {
     private String startDate;
     private String endDate;
 
+    @BeforeClass
+    public void checkEnvironment() throws Exception {
+        if (MerlinConstants.IS_SECURE) {
+            throw new SkipException("Skipping tests because LogMover Functionality is not
Supported on secure mode.");
+        }
+    }
+
     @BeforeMethod(alwaysRun = true)
     public void setUp() throws Exception {
         LOGGER.info("in @BeforeMethod");


Mime
View raw message