falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rostafiyc...@apache.org
Subject [4/5] falcon git commit: FALCON-1151 Migrate oozie related methods from InstanceUtil.java to OozieUtil.java. Contributed by Paul Isaychuk
Date Tue, 14 Apr 2015 14:01:34 GMT
http://git-wip-us.apache.org/repos/asf/falcon/blob/d0c9850e/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedClusterUpdateTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedClusterUpdateTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedClusterUpdateTest.java
index dab7335..2a9e205 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedClusterUpdateTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedClusterUpdateTest.java
@@ -27,14 +27,15 @@ import org.apache.falcon.regression.core.response.ServiceResponse;
 import org.apache.falcon.regression.core.util.AssertUtil;
 import org.apache.falcon.regression.core.util.BundleUtil;
 import org.apache.falcon.regression.core.util.HadoopUtil;
-import org.apache.falcon.regression.core.util.InstanceUtil;
 import org.apache.falcon.regression.core.util.OSUtil;
+import org.apache.falcon.regression.core.util.OozieUtil;
 import org.apache.falcon.regression.core.util.TimeUtil;
 import org.apache.falcon.regression.core.util.Util;
 import org.apache.falcon.regression.core.util.XmlUtil;
 import org.apache.falcon.regression.testHelper.BaseTestClass;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.log4j.Logger;
+import org.apache.oozie.client.OozieClient;
 import org.testng.Assert;
 import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeClass;
@@ -53,12 +54,19 @@ public class FeedClusterUpdateTest extends BaseTestClass {
     private ColoHelper cluster1 = servers.get(0);
     private ColoHelper cluster2 = servers.get(1);
     private ColoHelper cluster3 = servers.get(2);
+    private OozieClient cluster1OC = serverOC.get(0);
+    private OozieClient cluster2OC = serverOC.get(1);
+    private OozieClient cluster3OC = serverOC.get(2);
     private FileSystem cluster2FS = serverFS.get(1);
     private FileSystem cluster3FS = serverFS.get(2);
     private String feed;
+    private String feedName;
     private String startTime;
     private String feedOriginalSubmit;
     private String feedUpdated;
+    private String cluster1Name;
+    private String cluster2Name;
+    private String cluster3Name;
     private static final Logger LOGGER = Logger.getLogger(FeedClusterUpdateTest.class);
 
 
@@ -95,6 +103,10 @@ public class FeedClusterUpdateTest extends BaseTestClass {
         feed = bundles[0].getDataSets().get(0);
         feed = FeedMerlin.fromString(feed).clearFeedClusters().toString();
         startTime = TimeUtil.getTimeWrtSystemTime(-50);
+        feedName = Util.readEntityName(feed);
+        cluster1Name = Util.readEntityName(bundles[0].getClusters().get(0));
+        cluster2Name = Util.readEntityName(bundles[1].getClusters().get(0));
+        cluster3Name = Util.readEntityName(bundles[2].getClusters().get(0));
     }
 
     @AfterMethod(alwaysRun = true)
@@ -106,16 +118,14 @@ public class FeedClusterUpdateTest extends BaseTestClass {
     public void addSourceCluster() throws Exception {
         //add one source and one target , schedule only on source
         feedOriginalSubmit = FeedMerlin.fromString(feed)
-            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
-                Util.readEntityName(bundles[1].getClusters().get(0)))
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(cluster2Name)
                 .withRetention("hours(10)", ActionType.DELETE)
-                .withValidity(startTime,
-                    TimeUtil.addMinsToTime(startTime, 65))
+                .withValidity(startTime, TimeUtil.addMinsToTime(startTime, 65))
                 .withClusterType(ClusterType.SOURCE)
                 .build())
             .toString();
         feedOriginalSubmit = FeedMerlin.fromString(feedOriginalSubmit).addFeedCluster(
-            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[0].getClusters().get(0)))
+            new FeedMerlin.FeedClusterBuilder(cluster1Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(TimeUtil.addMinsToTime(startTime, 20),
                     TimeUtil.addMinsToTime(startTime, 85))
@@ -124,7 +134,6 @@ public class FeedClusterUpdateTest extends BaseTestClass {
             .toString();
 
         LOGGER.info("Feed: " + Util.prettyPrintXml(feedOriginalSubmit));
-
         ServiceResponse response = prism.getFeedHelper().submitEntity(feedOriginalSubmit);
         TimeUtil.sleepSeconds(10);
         AssertUtil.assertSucceeded(response);
@@ -134,41 +143,23 @@ public class FeedClusterUpdateTest extends BaseTestClass {
         TimeUtil.sleepSeconds(20);
         AssertUtil.assertSucceeded(response);
 
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit), "RETENTION"), 1);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-                .checkIfFeedCoordExist(cluster3.getFeedHelper(),
-                    Util.readEntityName(feedOriginalSubmit), "RETENTION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "RETENTION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "RETENTION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "RETENTION"), 0);
 
         //prepare updated Feed
         feedUpdated = FeedMerlin.fromString(feed)
-            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
-                Util.readEntityName(bundles[1].getClusters().get(0)))
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(cluster2Name)
                 .withRetention("hours(10)", ActionType.DELETE)
-                .withValidity(startTime,
-                    TimeUtil.addMinsToTime(startTime, 65))
+                .withValidity(startTime, TimeUtil.addMinsToTime(startTime, 65))
                 .withClusterType(ClusterType.SOURCE)
                 .build())
             .toString();
         feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
-            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[0].getClusters().get(0)))
+            new FeedMerlin.FeedClusterBuilder(cluster1Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(TimeUtil.addMinsToTime(startTime, 20),
                     TimeUtil.addMinsToTime(startTime, 85))
@@ -176,7 +167,7 @@ public class FeedClusterUpdateTest extends BaseTestClass {
                 .build())
             .toString();
         feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
-            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[2].getClusters().get(0)))
+            new FeedMerlin.FeedClusterBuilder(cluster3Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(TimeUtil.addMinsToTime(startTime, 40),
                     TimeUtil.addMinsToTime(startTime, 110))
@@ -190,40 +181,26 @@ public class FeedClusterUpdateTest extends BaseTestClass {
         AssertUtil.assertSucceeded(response);
 
         prism.getFeedHelper().submitAndSchedule(feedUpdated);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "RETENTION"), 2);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "RETENTION"), 1);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "REPLICATION"), 1);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "RETENTION"), 2);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "RETENTION"), 2);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "REPLICATION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "RETENTION"), 2);
     }
 
     @Test(enabled = false, groups = {"multiCluster"})
     public void addTargetCluster() throws Exception {
         //add one source and one target , schedule only on source
         feedOriginalSubmit = FeedMerlin.fromString(feed)
-            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
-                Util.readEntityName(bundles[1].getClusters().get(0)))
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(cluster2Name)
                 .withRetention("hours(10)", ActionType.DELETE)
-                .withValidity(startTime,
-                    TimeUtil.addMinsToTime(startTime, 65))
+                .withValidity(startTime, TimeUtil.addMinsToTime(startTime, 65))
                 .withClusterType(ClusterType.SOURCE)
                 .build())
             .toString();
         feedOriginalSubmit = FeedMerlin.fromString(feedOriginalSubmit).addFeedCluster(
-            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[2].getClusters().get(0)))
+            new FeedMerlin.FeedClusterBuilder(cluster3Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(TimeUtil.addMinsToTime(startTime, 40),
                     TimeUtil.addMinsToTime(startTime, 110))
@@ -233,7 +210,6 @@ public class FeedClusterUpdateTest extends BaseTestClass {
             .toString();
 
         LOGGER.info("Feed: " + Util.prettyPrintXml(feedOriginalSubmit));
-
         ServiceResponse response = prism.getFeedHelper().submitEntity(feedOriginalSubmit);
         TimeUtil.sleepSeconds(10);
         AssertUtil.assertSucceeded(response);
@@ -243,44 +219,24 @@ public class FeedClusterUpdateTest extends BaseTestClass {
         TimeUtil.sleepSeconds(20);
         AssertUtil.assertSucceeded(response);
 
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "RETENTION"), 1);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "RETENTION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-                .checkIfFeedCoordExist(cluster1.getFeedHelper(),
-                    Util.readEntityName(feedOriginalSubmit), "RETENTION"),
-            0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "RETENTION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "RETENTION"), 0);
 
         //prepare updated Feed
         feedUpdated = FeedMerlin.fromString(feed)
-            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
-                Util.readEntityName(bundles[1].getClusters().get(0)))
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(cluster2Name)
                 .withRetention("hours(10)", ActionType.DELETE)
-                .withValidity(startTime,
-                    TimeUtil.addMinsToTime(startTime, 65))
+                .withValidity(startTime, TimeUtil.addMinsToTime(startTime, 65))
                 .withClusterType(ClusterType.SOURCE)
                 .withPartition("US/${cluster.colo}")
                 .build())
             .toString();
         feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
-            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[0].getClusters().get(0)))
+            new FeedMerlin.FeedClusterBuilder(cluster1Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(TimeUtil.addMinsToTime(startTime, 20),
                     TimeUtil.addMinsToTime(startTime, 85))
@@ -288,7 +244,7 @@ public class FeedClusterUpdateTest extends BaseTestClass {
                 .build())
             .toString();
         feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
-            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[2].getClusters().get(0)))
+            new FeedMerlin.FeedClusterBuilder(cluster3Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(TimeUtil.addMinsToTime(startTime, 40),
                     TimeUtil.addMinsToTime(startTime, 110))
@@ -298,48 +254,32 @@ public class FeedClusterUpdateTest extends BaseTestClass {
             .toString();
 
         LOGGER.info("Updated Feed: " + Util.prettyPrintXml(feedUpdated));
-
         response = prism.getFeedHelper().update(feedUpdated, feedUpdated);
         TimeUtil.sleepSeconds(20);
         AssertUtil.assertSucceeded(response);
 
         prism.getFeedHelper().submitAndSchedule(feedUpdated);
 
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "RETENTION"), 2);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "RETENTION"), 1);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "REPLICATION"), 2);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "RETENTION"), 2);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "REPLICATION"), 2);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "RETENTION"), 1);
     }
 
     @Test(enabled = false, groups = {"multiCluster"})
     public void add2SourceCluster() throws Exception {
         //add one source and one target , schedule only on source
         feedOriginalSubmit = FeedMerlin.fromString(feed)
-            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
-                Util.readEntityName(bundles[1].getClusters().get(0)))
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(cluster2Name)
                 .withRetention("hours(10)", ActionType.DELETE)
-                .withValidity(startTime,
-                    TimeUtil.addMinsToTime(startTime, 65))
+                .withValidity(startTime, TimeUtil.addMinsToTime(startTime, 65))
                 .withClusterType(ClusterType.SOURCE)
                 .build())
             .toString();
 
         LOGGER.info("Feed: " + Util.prettyPrintXml(feedOriginalSubmit));
-
         ServiceResponse response = prism.getFeedHelper().submitEntity(feedOriginalSubmit);
         TimeUtil.sleepSeconds(10);
         AssertUtil.assertSucceeded(response);
@@ -349,44 +289,24 @@ public class FeedClusterUpdateTest extends BaseTestClass {
         TimeUtil.sleepSeconds(20);
         AssertUtil.assertSucceeded(response);
 
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-                .checkIfFeedCoordExist(cluster2.getFeedHelper(),
-                    Util.readEntityName(feedOriginalSubmit), "RETENTION"),
-            1);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-                .checkIfFeedCoordExist(cluster3.getFeedHelper(),
-                    Util.readEntityName(feedOriginalSubmit), "RETENTION"),
-            0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-                .checkIfFeedCoordExist(cluster1.getFeedHelper(),
-                    Util.readEntityName(feedOriginalSubmit), "RETENTION"),
-            0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "RETENTION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "RETENTION"), 0);
 
         //prepare updated Feed
         feedUpdated = FeedMerlin.fromString(feed)
-            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
-                Util.readEntityName(bundles[1].getClusters().get(0)))
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(cluster2Name)
                 .withRetention("hours(10)", ActionType.DELETE)
-                .withValidity(startTime,
-                    TimeUtil.addMinsToTime(startTime, 65))
+                .withValidity(startTime, TimeUtil.addMinsToTime(startTime, 65))
                 .withClusterType(ClusterType.SOURCE)
                 .withPartition("US/${cluster.colo}")
                 .build())
             .toString();
         feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
-            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[0].getClusters().get(0)))
+            new FeedMerlin.FeedClusterBuilder(cluster1Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(TimeUtil.addMinsToTime(startTime, 20),
                     TimeUtil.addMinsToTime(startTime, 85))
@@ -394,7 +314,7 @@ public class FeedClusterUpdateTest extends BaseTestClass {
                 .build())
             .toString();
         feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
-            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[2].getClusters().get(0)))
+            new FeedMerlin.FeedClusterBuilder(cluster3Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(TimeUtil.addMinsToTime(startTime, 40),
                     TimeUtil.addMinsToTime(startTime, 110))
@@ -404,39 +324,25 @@ public class FeedClusterUpdateTest extends BaseTestClass {
             .toString();
 
         LOGGER.info("Updated Feed: " + Util.prettyPrintXml(feedUpdated));
-
         response = prism.getFeedHelper().update(feedUpdated, feedUpdated);
         TimeUtil.sleepSeconds(20);
         AssertUtil.assertSucceeded(response);
 
         prism.getFeedHelper().submitAndSchedule(feedUpdated);
 
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "RETENTION"), 2);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "RETENTION"), 1);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "RETENTION"), 2);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "RETENTION"), 1);
     }
 
     @Test(enabled = false, groups = {"multiCluster"})
     public void add2TargetCluster() throws Exception {
         //add one source and one target , schedule only on source
         feedOriginalSubmit = FeedMerlin.fromString(feed)
-            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
-                Util.readEntityName(bundles[1].getClusters().get(0)))
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(cluster2Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(startTime, TimeUtil.addMinsToTime(startTime, 65))
                 .withClusterType(ClusterType.SOURCE)
@@ -444,53 +350,32 @@ public class FeedClusterUpdateTest extends BaseTestClass {
             .toString();
 
         LOGGER.info("Feed: " + Util.prettyPrintXml(feedOriginalSubmit));
-
         ServiceResponse response = prism.getFeedHelper().submitEntity(feedOriginalSubmit);
         TimeUtil.sleepSeconds(10);
         AssertUtil.assertSucceeded(response);
 
         //schedule on source
-
         response = cluster2.getFeedHelper().schedule(feedOriginalSubmit);
         TimeUtil.sleepSeconds(20);
         AssertUtil.assertSucceeded(response);
 
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "RETENTION"), 1);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-                .checkIfFeedCoordExist(cluster3.getFeedHelper(),
-                    Util.readEntityName(feedOriginalSubmit), "RETENTION"),
-            0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-                .checkIfFeedCoordExist(cluster1.getFeedHelper(),
-                    Util.readEntityName(feedOriginalSubmit), "RETENTION"),
-            0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "RETENTION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "RETENTION"), 0);
 
         //prepare updated Feed
         feedUpdated = FeedMerlin.fromString(feed)
-            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
-                Util.readEntityName(bundles[1].getClusters().get(0)))
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(cluster2Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(startTime, TimeUtil.addMinsToTime(startTime, 65))
                 .withClusterType(ClusterType.SOURCE)
                 .build())
             .toString();
         feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
-            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[0].getClusters().get(0)))
+            new FeedMerlin.FeedClusterBuilder(cluster1Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(TimeUtil.addMinsToTime(startTime, 20),
                     TimeUtil.addMinsToTime(startTime, 85))
@@ -498,7 +383,7 @@ public class FeedClusterUpdateTest extends BaseTestClass {
                 .build())
             .toString();
         feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
-            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[2].getClusters().get(0)))
+            new FeedMerlin.FeedClusterBuilder(cluster3Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(TimeUtil.addMinsToTime(startTime, 40),
                     TimeUtil.addMinsToTime(startTime, 110))
@@ -507,48 +392,32 @@ public class FeedClusterUpdateTest extends BaseTestClass {
             .toString();
 
         LOGGER.info("Updated Feed: " + Util.prettyPrintXml(feedUpdated));
-
         response = prism.getFeedHelper().update(feedUpdated, feedUpdated);
         TimeUtil.sleepSeconds(20);
         AssertUtil.assertSucceeded(response);
 
         prism.getFeedHelper().submitAndSchedule(feedUpdated);
 
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "RETENTION"), 1);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "REPLICATION"), 1);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "RETENTION"), 1);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "REPLICATION"), 1);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "REPLICATION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "REPLICATION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "RETENTION"), 1);
     }
 
     @Test(enabled = false, groups = {"multiCluster"})
     public void add1Source1TargetCluster() throws Exception {
         //add one source and one target , schedule only on source
         feedOriginalSubmit = FeedMerlin.fromString(feed)
-            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
-                Util.readEntityName(bundles[1].getClusters().get(0)))
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(cluster2Name)
                 .withRetention("hours(10)", ActionType.DELETE)
-                .withValidity(startTime,
-                    TimeUtil.addMinsToTime(startTime, 65))
+                .withValidity(startTime, TimeUtil.addMinsToTime(startTime, 65))
                 .withClusterType(ClusterType.SOURCE)
                 .build())
             .toString();
 
         LOGGER.info("Feed: " + Util.prettyPrintXml(feedOriginalSubmit));
-
         ServiceResponse response = prism.getFeedHelper().submitEntity(feedOriginalSubmit);
         TimeUtil.sleepSeconds(10);
         AssertUtil.assertSucceeded(response);
@@ -558,44 +427,24 @@ public class FeedClusterUpdateTest extends BaseTestClass {
         TimeUtil.sleepSeconds(20);
         AssertUtil.assertSucceeded(response);
 
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-                .checkIfFeedCoordExist(cluster2.getFeedHelper(),
-                    Util.readEntityName(feedOriginalSubmit), "RETENTION"),
-            1);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-                .checkIfFeedCoordExist(cluster3.getFeedHelper(),
-                    Util.readEntityName(feedOriginalSubmit), "RETENTION"),
-            0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "RETENTION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "RETENTION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "RETENTION"), 0);
 
         //prepare updated Feed
         feedUpdated = FeedMerlin.fromString(feed)
-            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
-                Util.readEntityName(bundles[1].getClusters().get(0)))
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(cluster2Name)
                 .withRetention("hours(10)", ActionType.DELETE)
-                .withValidity(startTime,
-                    TimeUtil.addMinsToTime(startTime, 65))
+                .withValidity(startTime, TimeUtil.addMinsToTime(startTime, 65))
                 .withClusterType(ClusterType.SOURCE)
                 .withPartition("US/${cluster.colo}")
                 .build())
             .toString();
         feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
-            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[0].getClusters().get(0)))
+            new FeedMerlin.FeedClusterBuilder(cluster1Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(TimeUtil.addMinsToTime(startTime, 20),
                     TimeUtil.addMinsToTime(startTime, 85))
@@ -603,7 +452,7 @@ public class FeedClusterUpdateTest extends BaseTestClass {
                 .build())
             .toString();
         feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
-            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[2].getClusters().get(0)))
+            new FeedMerlin.FeedClusterBuilder(cluster3Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(TimeUtil.addMinsToTime(startTime, 40),
                     TimeUtil.addMinsToTime(startTime, 110))
@@ -613,39 +462,25 @@ public class FeedClusterUpdateTest extends BaseTestClass {
             .toString();
 
         LOGGER.info("Updated Feed: " + Util.prettyPrintXml(feedUpdated));
-
         response = prism.getFeedHelper().update(feedUpdated, feedUpdated);
         TimeUtil.sleepSeconds(20);
         AssertUtil.assertSucceeded(response);
 
         prism.getFeedHelper().submitAndSchedule(feedUpdated);
 
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "RETENTION"), 2);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "RETENTION"), 1);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "REPLICATION"), 2);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "RETENTION"), 2);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "REPLICATION"), 2);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "RETENTION"), 1);
     }
 
     @Test(enabled = false, groups = {"multiCluster"})
     public void deleteSourceCluster() throws Exception {
         //add one source and one target , schedule only on source
         feedOriginalSubmit = FeedMerlin.fromString(feed)
-            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
-                Util.readEntityName(bundles[1].getClusters().get(0)))
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(cluster2Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(startTime, TimeUtil.addMinsToTime(startTime, 65))
                 .withClusterType(ClusterType.SOURCE)
@@ -653,7 +488,7 @@ public class FeedClusterUpdateTest extends BaseTestClass {
                 .build())
             .toString();
         feedOriginalSubmit = FeedMerlin.fromString(feedOriginalSubmit).addFeedCluster(
-            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[0].getClusters().get(0)))
+            new FeedMerlin.FeedClusterBuilder(cluster1Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(TimeUtil.addMinsToTime(startTime, 20),
                     TimeUtil.addMinsToTime(startTime, 85))
@@ -661,7 +496,7 @@ public class FeedClusterUpdateTest extends BaseTestClass {
                 .build())
             .toString();
         feedOriginalSubmit = FeedMerlin.fromString(feedOriginalSubmit).addFeedCluster(
-            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[2].getClusters().get(0)))
+            new FeedMerlin.FeedClusterBuilder(cluster3Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(TimeUtil.addMinsToTime(startTime, 40),
                     TimeUtil.addMinsToTime(startTime, 110))
@@ -671,53 +506,32 @@ public class FeedClusterUpdateTest extends BaseTestClass {
             .toString();
 
         LOGGER.info("Feed: " + Util.prettyPrintXml(feedOriginalSubmit));
-
         ServiceResponse response = prism.getFeedHelper().submitEntity(feedOriginalSubmit);
         TimeUtil.sleepSeconds(10);
         AssertUtil.assertSucceeded(response);
 
         //schedule on source
-
         response = prism.getFeedHelper().schedule(feedOriginalSubmit);
         TimeUtil.sleepSeconds(20);
         AssertUtil.assertSucceeded(response);
 
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit), "RETENTION"), 1);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "RETENTION"), 1);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "REPLICATION"), 2);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "REPLICATION"), 2);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "RETENTION"), 1);
 
         //prepare updated Feed
         feedUpdated = FeedMerlin.fromString(feed)
-            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
-                Util.readEntityName(bundles[1].getClusters().get(0)))
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(cluster2Name)
                 .withRetention("hours(10)", ActionType.DELETE)
-                .withValidity(startTime,
-                    TimeUtil.addMinsToTime(startTime, 65))
+                .withValidity(startTime, TimeUtil.addMinsToTime(startTime, 65))
                 .withClusterType(ClusterType.SOURCE)
                 .build())
             .toString();
         feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
-            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[0].getClusters().get(0)))
+            new FeedMerlin.FeedClusterBuilder(cluster1Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(TimeUtil.addMinsToTime(startTime, 20),
                     TimeUtil.addMinsToTime(startTime, 85))
@@ -733,29 +547,16 @@ public class FeedClusterUpdateTest extends BaseTestClass {
         AssertUtil.assertFailed(response);
 
         prism.getFeedHelper().submitAndSchedule(feedUpdated);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "RETENTION"), 2);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "RETENTION"), 1);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "RETENTION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "RETENTION"), 2);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "RETENTION"), 0);
     }
 
     @Test(enabled = true, groups = {"multiCluster"})
     public void deleteTargetCluster() throws Exception {
-
         /*
         this test creates a multiCluster feed. Cluster1 is the target cluster
          and cluster3 and Cluster2 are the source cluster.
@@ -777,12 +578,10 @@ public class FeedClusterUpdateTest extends BaseTestClass {
          */
 
         //add two source and one target
-
         feedOriginalSubmit = FeedMerlin.fromString(feed).clearFeedClusters().toString();
 
         feedOriginalSubmit = FeedMerlin.fromString(feedOriginalSubmit)
-            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(
-                Util.readEntityName(bundles[1].getClusters().get(0)))
+            .addFeedCluster(new FeedMerlin.FeedClusterBuilder(cluster2Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(startTime, TimeUtil.addMinsToTime(startTime, 65))
                 .withClusterType(ClusterType.SOURCE)
@@ -790,7 +589,7 @@ public class FeedClusterUpdateTest extends BaseTestClass {
                 .build())
             .toString();
         feedOriginalSubmit = FeedMerlin.fromString(feedOriginalSubmit).addFeedCluster(
-            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[0].getClusters().get(0)))
+            new FeedMerlin.FeedClusterBuilder(cluster1Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(TimeUtil.addMinsToTime(startTime, 20),
                     TimeUtil.addMinsToTime(startTime, 85))
@@ -798,7 +597,7 @@ public class FeedClusterUpdateTest extends BaseTestClass {
                 .build())
             .toString();
         feedOriginalSubmit = FeedMerlin.fromString(feedOriginalSubmit).addFeedCluster(
-            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[2].getClusters().get(0)))
+            new FeedMerlin.FeedClusterBuilder(cluster3Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(TimeUtil.addMinsToTime(startTime, 40),
                     TimeUtil.addMinsToTime(startTime, 110))
@@ -808,7 +607,6 @@ public class FeedClusterUpdateTest extends BaseTestClass {
             .toString();
 
         LOGGER.info("Feed: " + Util.prettyPrintXml(feedOriginalSubmit));
-
         ServiceResponse response = prism.getFeedHelper().submitEntity(feedOriginalSubmit);
         TimeUtil.sleepSeconds(10);
         AssertUtil.assertSucceeded(response);
@@ -818,37 +616,17 @@ public class FeedClusterUpdateTest extends BaseTestClass {
         TimeUtil.sleepSeconds(20);
         AssertUtil.assertSucceeded(response);
 
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-                .checkIfFeedCoordExist(cluster2.getFeedHelper(),
-                    Util.readEntityName(feedOriginalSubmit), "RETENTION"),
-            1);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-                .checkIfFeedCoordExist(cluster3.getFeedHelper(),
-                    Util.readEntityName(feedOriginalSubmit), "RETENTION"),
-            1);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(),
-                Util.readEntityName(feedOriginalSubmit),
-                "REPLICATION"), 2);
-        Assert.assertEquals(InstanceUtil
-                .checkIfFeedCoordExist(cluster1.getFeedHelper(),
-                    Util.readEntityName(feedOriginalSubmit), "RETENTION"),
-            1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "REPLICATION"), 2);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "RETENTION"), 1);
 
         //prepare updated Feed
-
         feedUpdated = FeedMerlin.fromString(feed).clearFeedClusters().toString();
-
         feedUpdated = FeedMerlin.fromString(feedUpdated).addFeedCluster(
-            new FeedMerlin.FeedClusterBuilder(Util.readEntityName(bundles[2].getClusters().get(0)))
+            new FeedMerlin.FeedClusterBuilder(cluster3Name)
                 .withRetention("hours(10)", ActionType.DELETE)
                 .withValidity(TimeUtil.addMinsToTime(startTime, 40),
                     TimeUtil.addMinsToTime(startTime, 110))
@@ -858,12 +636,10 @@ public class FeedClusterUpdateTest extends BaseTestClass {
             .toString();
 
         LOGGER.info("Feed: " + Util.prettyPrintXml(feedUpdated));
-
         response = prism.getFeedHelper().update(feedUpdated, feedUpdated);
         TimeUtil.sleepSeconds(20);
         AssertUtil.assertSucceeded(response);
 
-
         //verify xmls definitions
         response = cluster1.getFeedHelper().getEntityDefinition(feedUpdated);
         AssertUtil.assertFailed(response);
@@ -874,24 +650,12 @@ public class FeedClusterUpdateTest extends BaseTestClass {
         response = prism.getFeedHelper().getEntityDefinition(feedUpdated);
         Assert.assertTrue(XmlUtil.isIdentical(feedUpdated, response.getMessage()));
 
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "RETENTION"), 1);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "REPLICATION"), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "RETENTION"), 2);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "REPLICATION"), 2);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster1.getFeedHelper(), Util.readEntityName(feedUpdated),
-                "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "RETENTION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "REPLICATION"), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feedName, "RETENTION"), 2);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "REPLICATION"), 2);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster1OC, feedName, "RETENTION"), 1);
     }
 
     /*

http://git-wip-us.apache.org/repos/asf/falcon/blob/d0c9850e/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedInstanceListingTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedInstanceListingTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedInstanceListingTest.java
index 6dbe60e..753b39a 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedInstanceListingTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedInstanceListingTest.java
@@ -51,7 +51,6 @@ import java.util.List;
 /**
  * Test for https://issues.apache.org/jira/browse/FALCON-761.
  */
-
 @Test(groups = "embedded", timeOut = 900000)
 public class FeedInstanceListingTest extends BaseTestClass{
     private String baseTestDir = cleanAndGetTestDir();
@@ -90,13 +89,12 @@ public class FeedInstanceListingTest extends BaseTestClass{
     /**
      * Test when all data is available for all instances.
      */
-
     @Test
     public void testFeedListingWhenAllAvailable() throws Exception {
         bundles[0].setProcessValidity("2010-01-02T01:00Z", "2010-01-02T01:21Z");
         bundles[0].setProcessConcurrency(1);
         bundles[0].submitFeedsScheduleProcess(prism);
-        InstanceUtil.waitTillInstancesAreCreated(cluster, bundles[0].getProcessData(), 0);
+        InstanceUtil.waitTillInstancesAreCreated(clusterOC, bundles[0].getProcessData(), 0);
         List<List<String>> missingDependencies = OozieUtil.createMissingDependencies(cluster,
                 EntityType.PROCESS, processName, 0);
         List<String> missingDependencyLastInstance = missingDependencies.get(missingDependencies.size()-1);
@@ -112,13 +110,12 @@ public class FeedInstanceListingTest extends BaseTestClass{
    /**
     *Test when only empty directories exist for all instances.
     */
-
     @Test
     public void testFeedListingWhenAllEmpty() throws Exception {
         bundles[0].setProcessValidity("2010-01-02T01:00Z", "2010-01-02T01:21Z");
         bundles[0].setProcessConcurrency(1);
         bundles[0].submitFeedsScheduleProcess(prism);
-        InstanceUtil.waitTillInstancesAreCreated(cluster, bundles[0].getProcessData(), 0);
+        InstanceUtil.waitTillInstancesAreCreated(clusterOC, bundles[0].getProcessData(), 0);
         OozieUtil.createMissingDependencies(cluster, EntityType.PROCESS, processName, 0);
         InstanceUtil.waitTillInstanceReachState(clusterOC, processName, 1,
                 CoordinatorAction.Status.RUNNING, EntityType.PROCESS, 5);
@@ -131,13 +128,12 @@ public class FeedInstanceListingTest extends BaseTestClass{
    /**
     * Test when no data is present for any instance.
     */
-
     @Test
     public void testFeedListingWhenAllMissing() throws Exception {
         bundles[0].setProcessValidity("2010-01-02T01:00Z", "2010-01-02T01:21Z");
         bundles[0].setProcessConcurrency(1);
         bundles[0].submitFeedsScheduleProcess(prism);
-        InstanceUtil.waitTillInstancesAreCreated(cluster, bundles[0].getProcessData(), 0);
+        InstanceUtil.waitTillInstancesAreCreated(clusterOC, bundles[0].getProcessData(), 0);
         FeedInstanceResult r = prism.getFeedHelper()
                 .getFeedInstanceListing(Util.readEntityName(bundles[0].getDataSets().get(0)),
                         "?start=2010-01-02T01:00Z&end=2010-01-02T01:21Z");
@@ -148,13 +144,12 @@ public class FeedInstanceListingTest extends BaseTestClass{
     * Initially no availability flag is set for the feed. And data is created, so instance status is available.
     * Then, set the availability flag and update the feed. The instance status should change to partial.
     */
-
     @Test
     public void testFeedListingAfterFeedAvailabilityFlagUpdate() throws Exception {
         bundles[0].setProcessValidity("2010-01-02T01:00Z", "2010-01-02T01:21Z");
         bundles[0].setProcessConcurrency(1);
         bundles[0].submitFeedsScheduleProcess(prism);
-        InstanceUtil.waitTillInstancesAreCreated(cluster, bundles[0].getProcessData(), 0);
+        InstanceUtil.waitTillInstancesAreCreated(clusterOC, bundles[0].getProcessData(), 0);
         List<List<String>> missingDependencies = OozieUtil.createMissingDependencies(cluster,
                 EntityType.PROCESS, processName, 0);
         List<String> missingDependencyLastInstance = missingDependencies.get(missingDependencies.size()-1);
@@ -181,13 +176,12 @@ public class FeedInstanceListingTest extends BaseTestClass{
     * Data is created for the feed, so instance status is available.
     * Then, change the data path and update the feed. The instance status should change to partial.
     */
-
     @Test
     public void testFeedListingAfterFeedDataPathUpdate() throws Exception {
         bundles[0].setProcessValidity("2010-01-02T01:00Z", "2010-01-02T01:21Z");
         bundles[0].setProcessConcurrency(1);
         bundles[0].submitFeedsScheduleProcess(prism);
-        InstanceUtil.waitTillInstancesAreCreated(cluster, bundles[0].getProcessData(), 0);
+        InstanceUtil.waitTillInstancesAreCreated(clusterOC, bundles[0].getProcessData(), 0);
         List<List<String>> missingDependencies = OozieUtil.createMissingDependencies(cluster,
                 EntityType.PROCESS, processName, 0);
         List<String> missingDependencyLastInstance = missingDependencies.get(missingDependencies.size()-1);
@@ -213,13 +207,12 @@ public class FeedInstanceListingTest extends BaseTestClass{
    /**
     * Submit the feeds on prism, and request for instance status on server. Request should succeed.
     */
-
     @Test
     public void testFeedListingFeedSubmitOnPrismRequestOnServer() throws Exception {
         bundles[0].setProcessValidity("2010-01-02T01:00Z", "2010-01-02T01:21Z");
         bundles[0].setProcessConcurrency(1);
         bundles[0].submitFeedsScheduleProcess(prism);
-        InstanceUtil.waitTillInstancesAreCreated(cluster, bundles[0].getProcessData(), 0);
+        InstanceUtil.waitTillInstancesAreCreated(clusterOC, bundles[0].getProcessData(), 0);
         FeedInstanceResult r = cluster.getFeedHelper()
                 .getFeedInstanceListing(Util.readEntityName(bundles[0].getDataSets().get(0)),
                         "?start=2010-01-02T01:00Z&end=2010-01-02T01:21Z");

http://git-wip-us.apache.org/repos/asf/falcon/blob/d0c9850e/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedLateRerunTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedLateRerunTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedLateRerunTest.java
index 61ef8f3..d3370b4 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedLateRerunTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedLateRerunTest.java
@@ -112,16 +112,15 @@ public class FeedLateRerunTest extends BaseTestClass {
         AssertUtil.assertSucceeded(prism.getFeedHelper().submitAndSchedule(feed.toString()));
 
         //check if coordinator exists
-        InstanceUtil.waitTillInstancesAreCreated(cluster2, feed.toString(), 0);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(), entityName, "REPLICATION"), 1);
+        InstanceUtil.waitTillInstancesAreCreated(cluster2OC, feed.toString(), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, entityName, "REPLICATION"), 1);
 
         //Finding bundleId of replicated instance on target
-        String bundleId = InstanceUtil.getLatestBundleID(cluster2, entityName, EntityType.FEED);
+        String bundleId = OozieUtil.getLatestBundleID(cluster2OC, entityName, EntityType.FEED);
 
         //Finding and creating missing dependencies
         List<String> missingDependencies = getAndCreateDependencies(
-            cluster1, cluster1FS, cluster2, cluster2OC, bundleId, dataFlag, entityName);
+            cluster1FS, cluster1.getPrefix(), cluster2OC, bundleId, dataFlag, entityName);
         int count = 1;
         for (String location : missingDependencies) {
             if (count==1) {
@@ -140,8 +139,8 @@ public class FeedLateRerunTest extends BaseTestClass {
             LOGGER.info("Waiting...");
             TimeUtil.sleepSeconds(60);
         }
-        String bundleID = InstanceUtil.getLatestBundleID(cluster2, entityName, EntityType.FEED);
-        OozieUtil.validateRetryAttempts(cluster2, bundleID, EntityType.FEED, 1);
+        String bundleID = OozieUtil.getLatestBundleID(cluster2OC, entityName, EntityType.FEED);
+        OozieUtil.validateRetryAttempts(cluster2OC, bundleID, EntityType.FEED, 1);
 
         //check if data has been replicated correctly
         List<Path> cluster1ReplicatedData = HadoopUtil
@@ -170,16 +169,13 @@ public class FeedLateRerunTest extends BaseTestClass {
     }
 
     /* prismHelper1 - source colo, prismHelper2 - target colo */
-    private List<String> getAndCreateDependencies(ColoHelper prismHelper1, FileSystem clusterFS1,
-                                                  ColoHelper prismHelper2,
-                                                  OozieClient oozieClient2, String bundleId,
-                                                  boolean dataFlag, String entityName)
-        throws OozieClientException, IOException {
-        List<String> missingDependencies = OozieUtil.getMissingDependencies(prismHelper2, bundleId);
+    private List<String> getAndCreateDependencies(FileSystem sourceFS, String prefix, OozieClient targetOC,
+            String bundleId, boolean dataFlag, String entityName) throws OozieClientException, IOException {
+        List<String> missingDependencies = OozieUtil.getMissingDependencies(targetOC, bundleId);
         for (int i = 0; i < 10 && missingDependencies == null; ++i) {
             TimeUtil.sleepSeconds(30);
             LOGGER.info("sleeping...");
-            missingDependencies = OozieUtil.getMissingDependencies(prismHelper2, bundleId);
+            missingDependencies = OozieUtil.getMissingDependencies(targetOC, bundleId);
         }
         Assert.assertNotNull(missingDependencies, "Missing dependencies not found.");
         //print missing dependencies
@@ -187,27 +183,27 @@ public class FeedLateRerunTest extends BaseTestClass {
             LOGGER.info("dependency from job: " + dependency);
         }
         // Creating missing dependencies
-        HadoopUtil.createHDFSFolders(prismHelper1, missingDependencies);
+        HadoopUtil.createFolders(sourceFS, prefix, missingDependencies);
         //Adding data to empty folders depending on dataFlag
         if (dataFlag) {
             int tempCount = 1;
             for (String location : missingDependencies) {
                 if (tempCount==1) {
                     LOGGER.info("Transferring data to : " + location);
-                    HadoopUtil.copyDataToFolder(clusterFS1, location, OSUtil.NORMAL_INPUT + "dataFile.xml");
+                    HadoopUtil.copyDataToFolder(sourceFS, location, OSUtil.NORMAL_INPUT + "dataFile.xml");
                     tempCount++;
                 }
             }
         }
         //replication should start, wait while it ends
-        InstanceUtil.waitTillInstanceReachState(oozieClient2, entityName, 1,
+        InstanceUtil.waitTillInstanceReachState(targetOC, entityName, 1,
             CoordinatorAction.Status.SUCCEEDED, EntityType.FEED);
         // Adding data for late rerun
         int tempCounter = 1;
         for (String dependency : missingDependencies) {
             if (tempCounter==1) {
                 LOGGER.info("Transferring late data to : " + dependency);
-                HadoopUtil.copyDataToFolder(clusterFS1, dependency, OSUtil.NORMAL_INPUT + "dataFile.properties");
+                HadoopUtil.copyDataToFolder(sourceFS, dependency, OSUtil.NORMAL_INPUT + "dataFile.properties");
             }
             tempCounter++;
         }

http://git-wip-us.apache.org/repos/asf/falcon/blob/d0c9850e/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 de4f692..9ba5625 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
@@ -29,6 +29,7 @@ import org.apache.falcon.regression.core.util.BundleUtil;
 import org.apache.falcon.regression.core.util.HadoopUtil;
 import org.apache.falcon.regression.core.util.InstanceUtil;
 import org.apache.falcon.regression.core.util.OSUtil;
+import org.apache.falcon.regression.core.util.OozieUtil;
 import org.apache.falcon.regression.core.util.TimeUtil;
 import org.apache.falcon.regression.core.util.Util;
 import org.apache.falcon.regression.testHelper.BaseTestClass;
@@ -152,11 +153,8 @@ public class FeedReplicationTest extends BaseTestClass {
         }
 
         //check if coordinator exists
-        InstanceUtil.waitTillInstancesAreCreated(cluster2, feed.toString(), 0);
-
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(), Util.readEntityName(feed.toString()),
-                "REPLICATION"), 1);
+        InstanceUtil.waitTillInstancesAreCreated(cluster2OC, feed.toString(), 0);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feed.getName(), "REPLICATION"), 1);
 
         //replication should start, wait while it ends
         InstanceUtil.waitTillInstanceReachState(cluster2OC, Util.readEntityName(feed.toString()), 1,
@@ -240,23 +238,18 @@ public class FeedReplicationTest extends BaseTestClass {
         }
 
         //check if all coordinators exist
-        InstanceUtil.waitTillInstancesAreCreated(cluster2, feed.toString(), 0);
-
-        InstanceUtil.waitTillInstancesAreCreated(cluster3, feed.toString(), 0);
+        InstanceUtil.waitTillInstancesAreCreated(cluster2OC, feed.toString(), 0);
+        InstanceUtil.waitTillInstancesAreCreated(cluster3OC, feed.toString(), 0);
 
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster2.getFeedHelper(), feed.getName(),
-                "REPLICATION"), 1);
-        Assert.assertEquals(InstanceUtil
-            .checkIfFeedCoordExist(cluster3.getFeedHelper(), feed.getName(),
-                "REPLICATION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feed.getName(), "REPLICATION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster3OC, feed.getName(), "REPLICATION"), 1);
         //replication on cluster 2 should start, wait till it ends
         InstanceUtil.waitTillInstanceReachState(cluster2OC, feed.getName(), 1,
             CoordinatorAction.Status.SUCCEEDED, EntityType.FEED);
 
         //replication on cluster 3 should start, wait till it ends
         InstanceUtil.waitTillInstanceReachState(cluster3OC, feed.getName(), 1,
-            CoordinatorAction.Status.SUCCEEDED, EntityType.FEED);
+                CoordinatorAction.Status.SUCCEEDED, EntityType.FEED);
 
         //check if data has been replicated correctly
         List<Path> cluster1ReplicatedData = HadoopUtil
@@ -339,11 +332,10 @@ public class FeedReplicationTest extends BaseTestClass {
         }
 
         //check while instance is got created
-        InstanceUtil.waitTillInstancesAreCreated(cluster2, feed.toString(), 0);
+        InstanceUtil.waitTillInstancesAreCreated(cluster2OC, feed.toString(), 0);
 
         //check if coordinator exists
-        Assert.assertEquals(InstanceUtil
-                .checkIfFeedCoordExist(cluster2.getFeedHelper(), feedName, "REPLICATION"), 1);
+        Assert.assertEquals(OozieUtil.checkIfFeedCoordExist(cluster2OC, feedName, "REPLICATION"), 1);
 
         //replication should not start even after time
         TimeUtil.sleepSeconds(60);

http://git-wip-us.apache.org/repos/asf/falcon/blob/d0c9850e/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedSubmitAndScheduleTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedSubmitAndScheduleTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedSubmitAndScheduleTest.java
index dcc5a53..46015dc 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedSubmitAndScheduleTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedSubmitAndScheduleTest.java
@@ -24,7 +24,6 @@ import org.apache.falcon.regression.core.helpers.ColoHelper;
 import org.apache.falcon.regression.core.response.ServiceResponse;
 import org.apache.falcon.regression.core.util.AssertUtil;
 import org.apache.falcon.regression.core.util.BundleUtil;
-import org.apache.falcon.regression.core.util.InstanceUtil;
 import org.apache.falcon.regression.core.util.OozieUtil;
 import org.apache.falcon.regression.core.util.Util;
 import org.apache.falcon.regression.testHelper.BaseTestClass;
@@ -96,8 +95,7 @@ public class FeedSubmitAndScheduleTest extends BaseTestClass {
         AssertUtil.checkStatus(clusterOC, EntityType.FEED, bundles[0], Job.Status.RUNNING);
 
         //get created bundle id
-        String bundleId = InstanceUtil
-            .getLatestBundleID(cluster, Util.readEntityName(feed), EntityType.FEED);
+        String bundleId = OozieUtil.getLatestBundleID(clusterOC, Util.readEntityName(feed), EntityType.FEED);
 
         //try to submit and schedule the same process again
         ServiceResponse response = prism.getFeedHelper().submitAndSchedule(feed);
@@ -105,7 +103,7 @@ public class FeedSubmitAndScheduleTest extends BaseTestClass {
         AssertUtil.checkStatus(clusterOC, EntityType.FEED, bundles[0], Job.Status.RUNNING);
 
         //check that new bundle wasn't created
-        OozieUtil.verifyNewBundleCreation(cluster, bundleId, null, feed, false, false);
+        OozieUtil.verifyNewBundleCreation(clusterOC, bundleId, null, feed, false, false);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/falcon/blob/d0c9850e/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/InstanceParamTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/InstanceParamTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/InstanceParamTest.java
index f3a7b95..4ae73f2 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/InstanceParamTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/InstanceParamTest.java
@@ -102,7 +102,7 @@ public class InstanceParamTest extends BaseTestClass {
         processBundle.addClusterToBundle(bundles[2].getClusters().get(0),
             ClusterType.SOURCE, null, null);
         processBundle.submitFeedsScheduleProcess(prism);
-        InstanceUtil.waitTillInstancesAreCreated(cluster1, processBundle.getProcessData(), 0);
+        InstanceUtil.waitTillInstancesAreCreated(cluster1OC, processBundle.getProcessData(), 0);
         InstancesResult r = prism.getProcessHelper().getInstanceParams(processName,
             "?start=" + startTime);
         r.getMessage();
@@ -121,7 +121,7 @@ public class InstanceParamTest extends BaseTestClass {
         processBundle.addClusterToBundle(bundles[2].getClusters().get(0),
             ClusterType.SOURCE, null, null);
         processBundle.submitFeedsScheduleProcess(prism);
-        InstanceUtil.waitTillInstancesAreCreated(cluster1, processBundle.getProcessData(), 0);
+        InstanceUtil.waitTillInstancesAreCreated(cluster1OC, processBundle.getProcessData(), 0);
         OozieUtil.createMissingDependencies(cluster1, EntityType.PROCESS, processName, 0);
         InstanceUtil.waitTillInstanceReachState(cluster1OC, processName, 1,
             CoordinatorAction.Status.SUCCEEDED, EntityType.PROCESS, 10);
@@ -143,7 +143,7 @@ public class InstanceParamTest extends BaseTestClass {
         processBundle.addClusterToBundle(bundles[2].getClusters().get(0),
             ClusterType.SOURCE, null, null);
         processBundle.submitFeedsScheduleProcess(prism);
-        InstanceUtil.waitTillInstancesAreCreated(cluster1, processBundle.getProcessData(), 0);
+        InstanceUtil.waitTillInstancesAreCreated(cluster1OC, processBundle.getProcessData(), 0);
         OozieUtil.createMissingDependencies(cluster1, EntityType.PROCESS, processName, 0);
         InstanceUtil.waitTillInstanceReachState(cluster1OC, processName, 0,
             CoordinatorAction.Status.SUCCEEDED, EntityType.PROCESS); //change according to test case

http://git-wip-us.apache.org/repos/asf/falcon/blob/d0c9850e/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/InstanceSummaryTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/InstanceSummaryTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/InstanceSummaryTest.java
index 7d8cb00..a3fca09 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/InstanceSummaryTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/InstanceSummaryTest.java
@@ -106,7 +106,7 @@ public class InstanceSummaryTest extends BaseTestClass {
         OozieClientException, AuthenticationException, InterruptedException {
         processBundle.setProcessValidity(startTime, endTime);
         processBundle.submitFeedsScheduleProcess(prism);
-        InstanceUtil.waitTillInstancesAreCreated(cluster3, processBundle.getProcessData(), 0);
+        InstanceUtil.waitTillInstancesAreCreated(serverOC.get(2), processBundle.getProcessData(), 0);
 
         // start only at start time
         InstancesSummaryResult r = prism.getProcessHelper()

http://git-wip-us.apache.org/repos/asf/falcon/blob/d0c9850e/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 47523d8..4af27a2 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
@@ -121,7 +121,7 @@ public class LogMoverTest extends BaseTestClass {
         //Copy data to let pig job succeed
         HadoopUtil.copyDataToFolder(clusterFS, propPath, OSUtil.RESOURCES + "pig");
 
-        InstanceUtil.waitTillInstancesAreCreated(cluster, bundles[0].getProcessData(), 0);
+        InstanceUtil.waitTillInstancesAreCreated(clusterOC, bundles[0].getProcessData(), 0);
         OozieUtil.createMissingDependencies(cluster, EntityType.PROCESS, processName, 0);
         InstanceUtil.waitTillInstanceReachState(clusterOC, bundles[0].getProcessName(), 1,
                 CoordinatorAction.Status.SUCCEEDED, EntityType.PROCESS);
@@ -138,7 +138,7 @@ public class LogMoverTest extends BaseTestClass {
         bundles[0].submitFeedsScheduleProcess(prism);
         AssertUtil.checkStatus(clusterOC, EntityType.PROCESS, process, Job.Status.RUNNING);
 
-        InstanceUtil.waitTillInstancesAreCreated(cluster, bundles[0].getProcessData(), 0);
+        InstanceUtil.waitTillInstancesAreCreated(clusterOC, bundles[0].getProcessData(), 0);
         OozieUtil.createMissingDependencies(cluster, EntityType.PROCESS, processName, 0);
         InstanceUtil.waitTillInstanceReachState(clusterOC, bundles[0].getProcessName(), 1,
                         CoordinatorAction.Status.KILLED, EntityType.PROCESS);

http://git-wip-us.apache.org/repos/asf/falcon/blob/d0c9850e/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/NewRetryTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/NewRetryTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/NewRetryTest.java
index 76d033c..aec7e39 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/NewRetryTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/NewRetryTest.java
@@ -30,7 +30,6 @@ import org.apache.falcon.regression.core.response.ServiceResponse;
 import org.apache.falcon.regression.core.util.AssertUtil;
 import org.apache.falcon.regression.core.util.BundleUtil;
 import org.apache.falcon.regression.core.util.HadoopUtil;
-import org.apache.falcon.regression.core.util.InstanceUtil;
 import org.apache.falcon.regression.core.util.MatrixUtil;
 import org.apache.falcon.regression.core.util.OSUtil;
 import org.apache.falcon.regression.core.util.OozieUtil;
@@ -150,7 +149,7 @@ public class NewRetryTest extends BaseTestClass {
             LOGGER.info("going to update process at:" + DateTime.now(DateTimeZone.UTC));
             prism.getProcessHelper()
                 .update((bundles[0].getProcessData()), bundles[0].getProcessData());
-            String newBundleId = InstanceUtil.getLatestBundleID(cluster,
+            String newBundleId = OozieUtil.getLatestBundleID(clusterOC,
                 bundles[0].getProcessName(), EntityType.PROCESS);
 
             Assert.assertEquals(bundleId, newBundleId, "its creating a new bundle!!!");
@@ -205,7 +204,7 @@ public class NewRetryTest extends BaseTestClass {
                     .update((bundles[0].getProcessData()), bundles[0].getProcessData())
                     .getMessage().contains("updated successfully"),
                     "process was not updated successfully");
-                String newBundleId = InstanceUtil.getLatestBundleID(cluster,
+                String newBundleId = OozieUtil.getLatestBundleID(clusterOC,
                     bundles[0].getProcessName(), EntityType.PROCESS);
 
                 Assert.assertEquals(bundleId, newBundleId, "its creating a new bundle!!!");
@@ -260,7 +259,7 @@ public class NewRetryTest extends BaseTestClass {
                     .update((bundles[0].getProcessData()), bundles[0].getProcessData())
                     .getMessage().contains("updated successfully"),
                 "process was not updated successfully");
-            String newBundleId = InstanceUtil.getLatestBundleID(cluster,
+            String newBundleId = OozieUtil.getLatestBundleID(clusterOC,
                 bundles[0].getProcessName(), EntityType.PROCESS);
 
             Assert.assertEquals(bundleId, newBundleId, "its creating a new bundle!!!");
@@ -316,7 +315,7 @@ public class NewRetryTest extends BaseTestClass {
                     .update((bundles[0].getProcessData()), bundles[0].getProcessData())
                     .getMessage().contains("updated successfully"),
                 "process was not updated successfully");
-            String newBundleId = InstanceUtil.getLatestBundleID(cluster,
+            String newBundleId = OozieUtil.getLatestBundleID(clusterOC,
                 bundles[0].getProcessName(), EntityType.PROCESS);
 
             Assert.assertEquals(bundleId, newBundleId, "its creating a new bundle!!!");
@@ -364,7 +363,7 @@ public class NewRetryTest extends BaseTestClass {
                 .update(bundles[0].getProcessName(),
                     null).getMessage()
                 .contains("updated successfully"), "process was not updated successfully");
-            String newBundleId = InstanceUtil.getLatestBundleID(cluster,
+            String newBundleId = OozieUtil.getLatestBundleID(clusterOC,
                 bundles[0].getProcessName(), EntityType.PROCESS);
 
             Assert.assertEquals(bundleId, newBundleId, "its creating a new bundle!!!");
@@ -412,7 +411,7 @@ public class NewRetryTest extends BaseTestClass {
                 prism.getProcessHelper().update(bundles[0].getProcessName(),
                     bundles[0].getProcessData()).getMessage()
                     .contains("updated successfully"), "process was not updated successfully");
-            String newBundleId = InstanceUtil.getLatestBundleID(cluster,
+            String newBundleId = OozieUtil.getLatestBundleID(clusterOC,
                 bundles[0].getProcessName(), EntityType.PROCESS);
 
             Assert.assertEquals(bundleId, newBundleId, "its creating a new bundle!!!");
@@ -465,8 +464,8 @@ public class NewRetryTest extends BaseTestClass {
                         bundles[0].getProcessData()).getMessage()
                     .contains("updated successfully"),
                 "process was not updated successfully");
-            String newBundleId = InstanceUtil
-                .getLatestBundleID(cluster, bundles[0].getProcessName(),
+            String newBundleId = OozieUtil
+                .getLatestBundleID(clusterOC, bundles[0].getProcessName(),
                     EntityType.PROCESS);
 
             Assert.assertEquals(bundleId, newBundleId, "its creating a new bundle!!!");
@@ -517,7 +516,7 @@ public class NewRetryTest extends BaseTestClass {
                 prism.getProcessHelper().update(bundles[0].getProcessName()
                     , bundles[0].getProcessData()).getMessage().contains("updated successfully"),
                 "process was updated successfully!!!");
-            String newBundleId = InstanceUtil.getLatestBundleID(cluster,
+            String newBundleId = OozieUtil.getLatestBundleID(clusterOC,
                 bundles[0].getProcessName(), EntityType.PROCESS);
 
             Assert.assertEquals(bundleId, newBundleId, "its creating a new bundle!!!");


Mime
View raw message