falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rostafiyc...@apache.org
Subject [1/2] incubator-falcon git commit: FALCON-927 Refactoring of entity helpers in falcon-regression. Contributed by Ruslan Ostafiychuk
Date Wed, 03 Dec 2014 09:34:23 GMT
Repository: incubator-falcon
Updated Branches:
  refs/heads/master 4f2b524d9 -> 9520370a2


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/9520370a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/interfaces/IEntityManagerHelper.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/interfaces/IEntityManagerHelper.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/interfaces/IEntityManagerHelper.java
deleted file mode 100644
index 7eab15c..0000000
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/interfaces/IEntityManagerHelper.java
+++ /dev/null
@@ -1,604 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.falcon.regression.core.interfaces;
-
-import com.jcraft.jsch.JSchException;
-import org.apache.commons.exec.CommandLine;
-import org.apache.commons.lang.exception.ExceptionUtils;
-import org.apache.falcon.regression.core.response.ServiceResponse;
-import org.apache.falcon.regression.core.supportClasses.ExecResult;
-import org.apache.falcon.regression.core.util.Config;
-import org.apache.falcon.regression.core.util.ExecUtil;
-import org.apache.falcon.regression.core.util.FileUtil;
-import org.apache.falcon.regression.core.util.HCatUtil;
-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.Util;
-import org.apache.falcon.regression.core.util.Util.URLS;
-import org.apache.falcon.resource.InstancesResult;
-import org.apache.falcon.resource.InstancesSummaryResult;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.security.authentication.client.AuthenticationException;
-import org.apache.commons.lang.StringUtils;
-import org.apache.hive.hcatalog.api.HCatClient;
-import org.apache.hive.hcatalog.common.HCatException;
-import org.apache.log4j.Logger;
-import org.apache.oozie.client.AuthOozieClient;
-import org.testng.Assert;
-
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.List;
-
-/** Abstract class for helper classes. */
-public abstract class IEntityManagerHelper {
-
-    public static final boolean AUTHENTICATE = setAuthenticate();
-
-    private static final Logger LOGGER = Logger.getLogger(IEntityManagerHelper.class);
-
-    protected static final String CLIENT_LOCATION = OSUtil.RESOURCES
-        + OSUtil.getPath("IvoryClient", "IvoryCLI.jar");
-    protected static final String BASE_COMMAND = "java -jar " + CLIENT_LOCATION;
-
-    private static boolean setAuthenticate() {
-        String value = Config.getProperty("isAuthenticationSet");
-        value = (null == value) ? "true" : value;
-        return !value.equalsIgnoreCase("false");
-    }
-
-    public String getActiveMQ() {
-        return activeMQ;
-    }
-
-    public String getHadoopLocation() {
-        return hadoopLocation;
-    }
-
-    public String getHadoopURL() {
-        return hadoopURL;
-    }
-
-    public String getClusterReadonly() {
-        return clusterReadonly;
-    }
-
-    public String getClusterWrite() {
-        return clusterWrite;
-    }
-
-    public String getHostname() {
-        return hostname;
-    }
-
-    public String getPassword() {
-        return password;
-    }
-
-    public String getStoreLocation() {
-        return storeLocation;
-    }
-
-    public String getUsername() {
-        return username;
-    }
-
-    public String getHCatEndpoint() {
-        return hcatEndpoint;
-    }
-
-    protected HCatClient hCatClient;
-
-    public HCatClient getHCatClient() {
-        if (null == this.hCatClient) {
-            try {
-                this.hCatClient = HCatUtil.getHCatClient(hcatEndpoint, hiveMetaStorePrincipal);
-            } catch (HCatException e) {
-                Assert.fail("Unable to create hCatClient because of exception:\n"
-                    + ExceptionUtils.getStackTrace(e));
-            }
-        }
-        return this.hCatClient;
-    }
-
-    //basic properties
-    protected String qaHost;
-
-    public String getQaHost() {
-        return qaHost;
-    }
-
-    protected String hostname = "";
-    protected String username = "";
-    protected String password = "";
-    protected String hadoopLocation = "";
-    protected String hadoopURL = "";
-    protected String clusterReadonly = "";
-    protected String clusterWrite = "";
-    private String oozieURL = "";
-    protected String activeMQ = "";
-    protected String storeLocation = "";
-    protected String hadoopGetCommand = "";
-    protected String colo;
-    protected String allColo;
-    protected String coloName;
-    protected String serviceStartCmd;
-    protected String serviceStopCmd;
-    protected String serviceStatusCmd;
-    protected String hcatEndpoint = "";
-
-    public String getNamenodePrincipal() {
-        return namenodePrincipal;
-    }
-
-    public String getHiveMetaStorePrincipal() {
-        return hiveMetaStorePrincipal;
-    }
-
-    protected String namenodePrincipal;
-    protected String hiveMetaStorePrincipal;
-
-    public AuthOozieClient getOozieClient() {
-        if (null == this.oozieClient) {
-            this.oozieClient = OozieUtil.getClient(this.oozieURL);
-        }
-        return this.oozieClient;
-    }
-
-    protected AuthOozieClient oozieClient;
-
-    public FileSystem getHadoopFS() throws IOException {
-        if (null == this.hadoopFS) {
-            Configuration conf = new Configuration();
-            conf.set("fs.default.name", "hdfs://" + this.hadoopURL);
-            this.hadoopFS = FileSystem.get(conf);
-        }
-        return this.hadoopFS;
-    }
-
-    protected FileSystem hadoopFS;
-
-    public String getIdentityFile() {
-        return identityFile;
-    }
-
-    protected String identityFile;
-
-    protected String serviceStatusMsg;
-
-    public String getServiceUser() {
-        return serviceUser;
-    }
-
-    public String getServiceStopCmd() {
-        return serviceStopCmd;
-    }
-
-    public String getServiceStartCmd() {
-        return serviceStartCmd;
-    }
-
-    protected String serviceUser;
-
-    public String getColo() {
-        return colo;
-    }
-
-    public String getColoName() {
-        return coloName;
-    }
-
-    public IEntityManagerHelper(String prefix) {
-        if ((null == prefix) || prefix.isEmpty()) {
-            prefix = "";
-        } else {
-            prefix += ".";
-        }
-        this.qaHost = Config.getProperty(prefix + "qa_host");
-        this.hostname = Config.getProperty(prefix + "ivory_hostname");
-        this.username = Config.getProperty(prefix + "username", System.getProperty("user.name"));
-        this.password = Config.getProperty(prefix + "password", "");
-        this.hadoopLocation = Config.getProperty(prefix + "hadoop_location");
-        this.hadoopURL = Config.getProperty(prefix + "hadoop_url");
-        this.hcatEndpoint = Config.getProperty(prefix + "hcat_endpoint");
-        this.clusterReadonly = Config.getProperty(prefix + "cluster_readonly");
-        this.clusterWrite = Config.getProperty(prefix + "cluster_write");
-        this.oozieURL = Config.getProperty(prefix + "oozie_url");
-        this.activeMQ = Config.getProperty(prefix + "activemq_url");
-        this.storeLocation = Config.getProperty(prefix + "storeLocation");
-        this.hadoopGetCommand = hadoopLocation + "  fs -cat hdfs://" + hadoopURL
-                + "/projects/ivory/staging/ivory/workflows/process";
-        this.allColo = "?colo=" + Config.getProperty(prefix + "colo", "*");
-        this.colo = (!Config.getProperty(prefix + "colo", "").isEmpty()) ? "?colo=" + Config
-            .getProperty(prefix + "colo") : "";
-        this.coloName = this.colo.contains("=") ? this.colo.split("=")[1] : "";
-        this.serviceStartCmd =
-            Config.getProperty(prefix + "service_start_cmd", "/etc/init.d/tomcat6 start");
-        this.serviceStopCmd = Config.getProperty(prefix + "service_stop_cmd",
-            "/etc/init.d/tomcat6 stop");
-        this.serviceUser = Config.getProperty(prefix + "service_user", null);
-        this.serviceStatusMsg = Config.getProperty(prefix + "service_status_msg",
-            "Tomcat servlet engine is running with pid");
-        this.serviceStatusCmd =
-            Config.getProperty(prefix + "service_status_cmd", "/etc/init.d/tomcat6 status");
-        this.identityFile = Config.getProperty(prefix + "identityFile",
-            System.getProperty("user.home") + "/.ssh/id_rsa");
-        this.hadoopFS = null;
-        this.oozieClient = null;
-        this.namenodePrincipal = Config.getProperty(prefix + "namenode.kerberos.principal", "none");
-        this.hiveMetaStorePrincipal = Config.getProperty(
-                prefix + "hive.metastore.kerberos.principal", "none");
-    }
-
-    public abstract String getEntityType();
-
-    public abstract String getEntityName(String entity);
-
-    protected String createUrl(String... parts) {
-        return StringUtils.join(parts, "/");
-    }
-
-    public ServiceResponse listEntities()
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return listEntities(null, null);
-    }
-
-    public ServiceResponse listEntities(String params, String user)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        LOGGER.info("fetching " + getEntityType() + " list");
-        String url = createUrl(this.hostname + URLS.LIST_URL.getValue(),
-            getEntityType() + colo);
-        if (StringUtils.isNotEmpty(params)){
-            url += colo.isEmpty() ? "?" + params : "&" + params;
-        }
-        return Util.sendRequest(createUrl(url), "get", null, user);
-    }
-
-    public ServiceResponse listAllEntities(String params, String user)
-        throws AuthenticationException, IOException, URISyntaxException, InterruptedException {
-        return listEntities((params == null ? "" : params + '&')
-            + "numResults=" + Integer.MAX_VALUE, user);
-    }
-
-    public ServiceResponse submitEntity(String data)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return submitEntity(data, null);
-    }
-
-    public ServiceResponse submitEntity(String data, String user)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        LOGGER.info("Submitting " + getEntityType() + ": \n" + Util.prettyPrintXml(data));
-        return Util.sendRequest(createUrl(this.hostname + URLS.SUBMIT_URL.getValue(),
-            getEntityType() + colo), "post", data, user);
-    }
-
-    public ServiceResponse schedule(String processData)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return schedule(processData, null);
-    }
-
-    public ServiceResponse schedule(String processData, String user)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return Util.sendRequest(createUrl(this.hostname + URLS.SCHEDULE_URL.getValue(),
-            getEntityType(), getEntityName(processData) + colo), "post", user);
-    }
-
-    public ServiceResponse submitAndSchedule(String data)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return submitAndSchedule(data, null);
-    }
-
-    public ServiceResponse submitAndSchedule(String data, String user)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        LOGGER.info("Submitting " + getEntityType() + ": \n" + Util.prettyPrintXml(data));
-        return Util.sendRequest(createUrl(this.hostname + URLS.SUBMIT_AND_SCHEDULE_URL.getValue(),
-            getEntityType()), "post", data, user);
-    }
-
-    public ServiceResponse deleteByName(String entityName, String user)
-        throws AuthenticationException, IOException, URISyntaxException, InterruptedException {
-        return Util.sendRequest(createUrl(this.hostname + URLS.DELETE_URL.getValue(),
-            getEntityType(), entityName + colo), "delete", user);
-    }
-
-    public ServiceResponse delete(String data)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return delete(data, null);
-    }
-
-    public ServiceResponse delete(String data, String user)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return Util.sendRequest(createUrl(this.hostname + URLS.DELETE_URL.getValue(),
-            getEntityType(), getEntityName(data) + colo), "delete", user);
-    }
-
-    public ServiceResponse suspend(String data)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return suspend(data, null);
-    }
-
-    public ServiceResponse suspend(String data, String user)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return Util.sendRequest(createUrl(this.hostname + URLS.SUSPEND_URL.getValue(),
-            getEntityType(), getEntityName(data) + colo), "post", user);
-    }
-
-    public ServiceResponse resume(String data)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return resume(data, null);
-    }
-
-    public ServiceResponse resume(String data, String user)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return Util.sendRequest(createUrl(this.hostname + URLS.RESUME_URL.getValue(),
-            getEntityType(), getEntityName(data) + colo), "post", user);
-    }
-
-    public ServiceResponse getStatus(String data)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return getStatus(data, null);
-    }
-
-    public ServiceResponse getStatus(String data, String user)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return Util.sendRequest(createUrl(this.hostname + URLS.STATUS_URL.getValue(),
-            getEntityType(), getEntityName(data) + colo), "get", user);
-    }
-
-    public ServiceResponse getEntityDefinition(String data)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return getEntityDefinition(data, null);
-    }
-
-    public ServiceResponse getEntityDefinition(String data, String user)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return Util.sendRequest(createUrl(this.hostname + URLS.GET_ENTITY_DEFINITION.getValue(),
-            getEntityType(), getEntityName(data) + colo), "get", user);
-    }
-
-    public ServiceResponse getEntityDependencies(String data, String user)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return Util.sendRequest(createUrl(this.hostname + URLS.DEPENDENCIES.getValue(),
-            getEntityType(), getEntityName(data) + colo), "get", user);
-    }
-
-    public InstancesResult getRunningInstance(String name)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return getRunningInstance(name, null);
-    }
-
-    public InstancesResult getRunningInstance(String name, String user)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        String url = createUrl(this.hostname + URLS.INSTANCE_RUNNING.getValue(), getEntityType(),
-            name + allColo);
-        return (InstancesResult) InstanceUtil.sendRequestProcessInstance(url, user);
-    }
-
-    public InstancesResult getProcessInstanceStatus(String entityName, String params)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return getProcessInstanceStatus(entityName, params, null);
-    }
-
-    public InstancesResult getProcessInstanceStatus(
-        String entityName, String params, String user)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        String url = createUrl(this.hostname + URLS.INSTANCE_STATUS.getValue(), getEntityType(),
-            entityName, "");
-        return (InstancesResult) InstanceUtil
-            .createAndSendRequestProcessInstance(url, params, allColo, user);
-    }
-
-    public InstancesResult getProcessInstanceSuspend(
-        String readEntityName, String params)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return getProcessInstanceSuspend(readEntityName, params, null);
-    }
-
-    public InstancesResult getProcessInstanceSuspend(
-        String entityName, String params, String user)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        String url = createUrl(this.hostname + URLS.INSTANCE_SUSPEND.getValue(), getEntityType(),
-            entityName, "");
-        return (InstancesResult) InstanceUtil
-            .createAndSendRequestProcessInstance(url, params, allColo, user);
-    }
-
-    public ServiceResponse update(String oldEntity, String newEntity)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return update(oldEntity, newEntity, null);
-    }
-
-    public ServiceResponse update(String oldEntity, String newEntity, String user)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        LOGGER.info("Updating " + getEntityType() + ": \n" + Util.prettyPrintXml(oldEntity));
-        LOGGER.info("To " + getEntityType() + ": \n" + Util.prettyPrintXml(newEntity));
-        String url = createUrl(this.hostname + URLS.UPDATE.getValue(), getEntityType(),
-            getEntityName(oldEntity));
-        return Util.sendRequest(url + colo, "post", newEntity, user);
-    }
-
-    public ServiceResponse update(String oldEntity, String newEntity, String updateTime,
-                                  String user)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        LOGGER.info("Updating " + getEntityType() + ": \n" + Util.prettyPrintXml(oldEntity));
-        LOGGER.info("To " + getEntityType() + ": \n" + Util.prettyPrintXml(newEntity));
-        String url = this.hostname + URLS.UPDATE.getValue() + "/" + getEntityType() + "/"
-            + Util.readEntityName(oldEntity);
-        String urlPart = colo == null || colo.isEmpty() ? "?" : colo + "&";
-        return Util.sendRequest(url + urlPart + "effective=" + updateTime, "post",
-            newEntity, user);
-    }
-
-    public InstancesResult getProcessInstanceKill(String readEntityName, String params)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return getProcessInstanceKill(readEntityName, params, null);
-    }
-
-    public InstancesResult getProcessInstanceKill(String entityName, String params,
-                                                         String user)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        String url = createUrl(this.hostname + URLS.INSTANCE_KILL.getValue(), getEntityType(),
-            entityName, "");
-        return (InstancesResult) InstanceUtil
-            .createAndSendRequestProcessInstance(url, params, allColo, user);
-    }
-
-    public InstancesResult getProcessInstanceRerun(String entityName, String params)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return getProcessInstanceRerun(entityName, params, null);
-    }
-
-    public InstancesResult getProcessInstanceRerun(String entityName, String params,
-                                                          String user)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        String url = createUrl(this.hostname + URLS.INSTANCE_RERUN.getValue(), getEntityType(),
-            entityName, "");
-        return (InstancesResult) InstanceUtil
-            .createAndSendRequestProcessInstance(url, params, allColo, user);
-    }
-
-    public InstancesResult getProcessInstanceResume(String entityName, String params)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        return getProcessInstanceResume(entityName, params, null);
-    }
-
-    public InstancesResult getProcessInstanceResume(String entityName, String params,
-                                                           String user)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        String url = createUrl(this.hostname + URLS.INSTANCE_RESUME.getValue(), getEntityType(),
-            entityName, "");
-        return (InstancesResult) InstanceUtil
-            .createAndSendRequestProcessInstance(url, params, allColo, user);
-    }
-
-    public InstancesSummaryResult getInstanceSummary(String entityName, String params)
-        throws IOException, URISyntaxException, AuthenticationException, InterruptedException {
-        String url = createUrl(this.hostname + URLS.INSTANCE_SUMMARY.getValue(), getEntityType(),
-            entityName, "");
-        return (InstancesSummaryResult) InstanceUtil
-            .createAndSendRequestProcessInstance(url, params, allColo, null);
-    }
-
-    public String list() {
-        return ExecUtil.executeCommandGetOutput(
-            BASE_COMMAND + " entity -list -url " + this.hostname + " -type " + getEntityType());
-    }
-
-    public String getDependencies(String entityName) {
-        return ExecUtil.executeCommandGetOutput(
-            BASE_COMMAND + " entity -dependency -url " + this.hostname + " -type "
-                + getEntityType() + " -name " + entityName);
-    }
-
-    public List<String> getArchiveInfo() throws IOException, JSchException {
-        return Util.getStoreInfo(this, "/archive/" + getEntityType().toUpperCase());
-    }
-
-    public List<String> getStoreInfo() throws IOException, JSchException {
-        return Util.getStoreInfo(this, "/" + getEntityType().toUpperCase());
-    }
-
-    public InstancesResult getInstanceParams(String entityName, String params)
-        throws AuthenticationException, IOException, URISyntaxException, InterruptedException {
-        String url = createUrl(this.hostname + URLS.INSTANCE_PARAMS.getValue(), getEntityType(),
-            entityName, "");
-        return (InstancesResult) InstanceUtil
-            .createAndSendRequestProcessInstance(url, params, allColo, null);
-    }
-
-    /**
-     * Lists all entities which are tagged by a given pipeline.
-     * @param pipeline filter
-     * @return service response
-     * @throws AuthenticationException
-     * @throws IOException
-     * @throws URISyntaxException
-     */
-    public ServiceResponse getListByPipeline(String pipeline)
-        throws AuthenticationException, IOException, URISyntaxException, InterruptedException {
-        String url = createUrl(this.hostname + URLS.LIST_URL.getValue() + "/" + getEntityType());
-        url += "?filterBy=PIPELINES:" + pipeline;
-        return Util.sendRequest(url, "get", null, null);
-    }
-
-    /**
-     * Submit an entity through falcon client.
-     * @param entityStr string of the entity to be submitted
-     * @return
-     * @throws IOException
-     */
-    public ExecResult clientSubmit(final String entityStr) throws IOException {
-        LOGGER.info("Submitting " + getEntityType() + " through falcon client: \n"
-            + Util.prettyPrintXml(entityStr));
-        final String fileName = FileUtil.writeEntityToFile(entityStr);
-        final CommandLine commandLine = FalconClientBuilder.getBuilder()
-                .getSubmitCommand(getEntityType(), fileName).build();
-        return ExecUtil.executeCommand(commandLine);
-    }
-
-    /**
-     * Delete an entity through falcon client.
-     * @param entityStr string of the entity to be submitted
-     * @return
-     * @throws IOException
-     */
-    public ExecResult clientDelete(final String entityStr, String user) throws IOException {
-        final String entityName = getEntityName(entityStr);
-        LOGGER.info("Deleting " + getEntityType() + ": " + entityName);
-        final CommandLine commandLine = FalconClientBuilder.getBuilder(user)
-                .getDeleteCommand(getEntityType(), entityName).build();
-        return ExecUtil.executeCommand(commandLine);
-    }
-
-
-    /**
-     * Retrieves entities summary.
-     * @param clusterName compulsory parameter for request
-     * @param params list of optional parameters
-     * @return entity summary along with its instances.
-     */
-    public ServiceResponse getEntitySummary(String clusterName, String params)
-        throws AuthenticationException, IOException, URISyntaxException, InterruptedException {
-        String url = createUrl(this.hostname + URLS.ENTITY_SUMMARY.getValue(),
-            getEntityType()) +"?cluster=" + clusterName;
-        if (StringUtils.isNotEmpty(params)) {
-            url += "&" + params;
-        }
-        return Util.sendRequest(url, "get", null, null);
-    }
-
-    /**
-     * Get list of all instances of a given entity.
-     * @param entityName entity name
-     * @param params list of optional parameters
-     * @param user user name
-     * @return response
-     */
-    public InstancesResult listInstances(String entityName, String params, String user)
-        throws AuthenticationException, IOException, URISyntaxException, InterruptedException {
-        String url = createUrl(this.hostname + URLS.INSTANCE_LIST.getValue(), getEntityType(),
-            entityName + colo);
-        if (StringUtils.isNotEmpty(params)) {
-            url += colo.isEmpty() ? "?" + params : "&" + params;
-        }
-        return (InstancesResult) InstanceUtil.sendRequestProcessInstance(url, user);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/9520370a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/supportClasses/Brother.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/supportClasses/Brother.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/supportClasses/Brother.java
index 5d2708a..4330bff 100755
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/supportClasses/Brother.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/supportClasses/Brother.java
@@ -21,7 +21,7 @@ package org.apache.falcon.regression.core.supportClasses;
 import org.apache.falcon.entity.v0.EntityType;
 import org.apache.falcon.regression.core.bundle.Bundle;
 import org.apache.falcon.regression.core.helpers.ColoHelper;
-import org.apache.falcon.regression.core.interfaces.IEntityManagerHelper;
+import org.apache.falcon.regression.core.helpers.entity.AbstractEntityHelper;
 import org.apache.falcon.regression.core.response.ServiceResponse;
 import org.apache.falcon.regression.core.util.Util.URLS;
 import org.testng.TestNGException;
@@ -39,7 +39,7 @@ public class Brother extends Thread {
         return output;
     }
 
-    private IEntityManagerHelper entityManagerHelper;
+    private AbstractEntityHelper entityManagerHelper;
 
     public Brother(String threadName, String operation, EntityType entityType, ThreadGroup tGroup,
                    Bundle b, ColoHelper p, URLS url) {

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/9520370a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/CleanupUtil.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/CleanupUtil.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/CleanupUtil.java
index 8cc6121..ef58b36 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/CleanupUtil.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/CleanupUtil.java
@@ -20,7 +20,7 @@ package org.apache.falcon.regression.core.util;
 
 import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.falcon.regression.core.helpers.ColoHelper;
-import org.apache.falcon.regression.core.interfaces.IEntityManagerHelper;
+import org.apache.falcon.regression.core.helpers.entity.AbstractEntityHelper;
 import org.apache.falcon.regression.core.response.ServiceResponse;
 import org.apache.falcon.resource.EntityList;
 import org.apache.hadoop.security.authentication.client.AuthenticationException;
@@ -62,11 +62,11 @@ public final class CleanupUtil {
         return getAllEntitiesOfOneType(prism.getClusterHelper(), null);
     }
 
-    public static List<String> getAllEntitiesOfOneType(IEntityManagerHelper iEntityManagerHelper,
+    public static List<String> getAllEntitiesOfOneType(AbstractEntityHelper entityManagerHelper,
                                                        String user)
         throws IOException, URISyntaxException, AuthenticationException, JAXBException,
         InterruptedException {
-        final EntityList entityList = getEntitiesResultOfOneType(iEntityManagerHelper, user);
+        final EntityList entityList = getEntitiesResultOfOneType(entityManagerHelper, user);
         List<String> clusters = new ArrayList<String>();
         for (EntityList.EntityElement entity : entityList.getElements()) {
             clusters.add(entity.name);
@@ -75,10 +75,10 @@ public final class CleanupUtil {
     }
 
     private static EntityList getEntitiesResultOfOneType(
-        IEntityManagerHelper iEntityManagerHelper, String user)
+        AbstractEntityHelper entityManagerHelper, String user)
         throws IOException, URISyntaxException, AuthenticationException, JAXBException,
         InterruptedException {
-        final ServiceResponse clusterResponse = iEntityManagerHelper.listAllEntities(null, user);
+        final ServiceResponse clusterResponse = entityManagerHelper.listAllEntities(null, user);
         JAXBContext jc = JAXBContext.newInstance(EntityList.class);
         Unmarshaller u = jc.createUnmarshaller();
         return (EntityList) u.unmarshal(
@@ -120,7 +120,7 @@ public final class CleanupUtil {
     }
 
     public static void cleanAllProcessesQuietly(ColoHelper prism,
-                                                IEntityManagerHelper entityManagerHelper) {
+                                                AbstractEntityHelper entityManagerHelper) {
         try {
             final List<String> processes = getAllProcesses(prism);
             for (String process : processes) {
@@ -143,7 +143,7 @@ public final class CleanupUtil {
         cleanAllClustersQuietly(prism);
     }
 
-    public static void deleteQuietly(IEntityManagerHelper helper, String feed) {
+    public static void deleteQuietly(AbstractEntityHelper helper, String feed) {
         try {
             helper.delete(feed);
         } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/9520370a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java
index fcef570..4f9bd9d 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/InstanceUtil.java
@@ -35,7 +35,7 @@ import org.apache.falcon.regression.core.bundle.Bundle;
 import org.apache.falcon.regression.core.enumsAndConstants.MerlinConstants;
 import org.apache.falcon.regression.core.enumsAndConstants.ResponseErrors;
 import org.apache.falcon.regression.core.helpers.ColoHelper;
-import org.apache.falcon.regression.core.interfaces.IEntityManagerHelper;
+import org.apache.falcon.regression.core.helpers.entity.AbstractEntityHelper;
 import org.apache.falcon.resource.APIResult;
 import org.apache.falcon.resource.InstancesResult;
 import org.apache.falcon.resource.InstancesSummaryResult;
@@ -428,7 +428,7 @@ public final class InstanceUtil {
      * @throws OozieClientException
      */
     public static List<CoordinatorJob> getBundleCoordinators(String bundleID,
-            IEntityManagerHelper helper)
+            AbstractEntityHelper helper)
         throws OozieClientException {
         OozieClient localOozieClient = helper.getOozieClient();
         BundleJob bundleInfo = localOozieClient.getBundleJobInfo(bundleID);
@@ -587,7 +587,7 @@ public final class InstanceUtil {
      * Retrieves replication coordinatorID from bundle of coordinators.
      */
     public static List<String> getReplicationCoordID(String bundlID,
-            IEntityManagerHelper helper)
+            AbstractEntityHelper helper)
         throws OozieClientException {
         List<CoordinatorJob> coords = InstanceUtil.getBundleCoordinators(bundlID, helper);
         List<String> replicationCoordID = new ArrayList<String>();
@@ -706,7 +706,7 @@ public final class InstanceUtil {
         return feedElement.toString();
     }
 
-    public static int checkIfFeedCoordExist(IEntityManagerHelper helper,
+    public static int checkIfFeedCoordExist(AbstractEntityHelper helper,
             String feedName, String coordType) throws OozieClientException {
         LOGGER.info("feedName: " + feedName);
         int numberOfCoord = 0;

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/9520370a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/Util.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/Util.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/Util.java
index be28344..0c12410 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/Util.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/util/Util.java
@@ -37,7 +37,7 @@ import org.apache.falcon.entity.v0.feed.LocationType;
 import org.apache.falcon.entity.v0.feed.Property;
 import org.apache.falcon.entity.v0.process.Process;
 import org.apache.falcon.regression.core.helpers.ColoHelper;
-import org.apache.falcon.regression.core.interfaces.IEntityManagerHelper;
+import org.apache.falcon.regression.core.helpers.entity.AbstractEntityHelper;
 import org.apache.falcon.regression.core.response.ServiceResponse;
 import org.apache.falcon.regression.core.supportClasses.JmsMessageConsumer;
 import org.apache.falcon.resource.APIResult;
@@ -171,7 +171,7 @@ public final class Util {
      * @throws IOException
      * @throws JSchException
      */
-    public static List<String> getStoreInfo(IEntityManagerHelper helper, String subPath)
+    public static List<String> getStoreInfo(AbstractEntityHelper helper, String subPath)
         throws IOException, JSchException {
         if (helper.getStoreLocation().startsWith("hdfs:")) {
             return HadoopUtil.getAllFilesHDFS(helper.getHadoopFS(),
@@ -390,7 +390,7 @@ public final class Util {
      * @throws IOException
      * @throws JSchException
      */
-    public static void shutDownService(IEntityManagerHelper helper)
+    public static void shutDownService(AbstractEntityHelper helper)
         throws IOException, JSchException {
         ExecUtil.runRemoteScriptAsSudo(helper.getQaHost(), helper.getUsername(),
             helper.getPassword(), helper.getServiceStopCmd(),
@@ -406,7 +406,7 @@ public final class Util {
      * @throws AuthenticationException
      * @throws URISyntaxException
      */
-    public static void startService(IEntityManagerHelper helper)
+    public static void startService(AbstractEntityHelper helper)
         throws IOException, JSchException, AuthenticationException, URISyntaxException,
             InterruptedException {
         ExecUtil.runRemoteScriptAsSudo(helper.getQaHost(), helper.getUsername(),
@@ -435,7 +435,7 @@ public final class Util {
      * @throws AuthenticationException
      * @throws URISyntaxException
      */
-    public static void restartService(IEntityManagerHelper helper)
+    public static void restartService(AbstractEntityHelper helper)
         throws IOException, JSchException, AuthenticationException, URISyntaxException,
         InterruptedException {
         LOGGER.info("restarting service for: " + helper.getQaHost());
@@ -737,7 +737,7 @@ public final class Util {
             JAXBException,
             IOException, URISyntaxException, AuthenticationException, InterruptedException {
         EntityType type = getEntityType(entity);
-        IEntityManagerHelper helper;
+        AbstractEntityHelper helper;
         if (EntityType.PROCESS == type) {
             helper = cluster.getProcessHelper();
         } else if (EntityType.FEED == type) {

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/9520370a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/request/BaseRequest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/request/BaseRequest.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/request/BaseRequest.java
index 0fc01ef..0ee1e4a 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/request/BaseRequest.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/request/BaseRequest.java
@@ -19,7 +19,7 @@
 package org.apache.falcon.request;
 
 import org.apache.commons.net.util.TrustManagerUtils;
-import org.apache.falcon.regression.core.interfaces.IEntityManagerHelper;
+import org.apache.falcon.regression.core.helpers.entity.AbstractEntityHelper;
 import org.apache.falcon.security.FalconAuthorizationToken;
 import org.apache.hadoop.security.authentication.client.AuthenticatedURL;
 import org.apache.hadoop.security.authentication.client.AuthenticationException;
@@ -148,7 +148,7 @@ public class BaseRequest {
         /*get the token and add it to the header.
         works in secure and un secure mode.*/
         AuthenticatedURL.Token token;
-        if (IEntityManagerHelper.AUTHENTICATE) {
+        if (AbstractEntityHelper.AUTHENTICATE) {
             token = FalconAuthorizationToken.getToken(user, uri.getScheme(),
                     uri.getHost(), uri.getPort());
             request.addHeader(RequestKeys.COOKIE, RequestKeys.AUTH_COOKIE_EQ + token);
@@ -178,7 +178,7 @@ public class BaseRequest {
             Header[] wwwAuthHeaders = response.getHeaders(RequestKeys.WWW_AUTHENTICATE);
             if (wwwAuthHeaders != null && wwwAuthHeaders.length != 0
                 && wwwAuthHeaders[0].getValue().trim().startsWith(RequestKeys.NEGOTIATE)) {
-                if (IEntityManagerHelper.AUTHENTICATE) {
+                if (AbstractEntityHelper.AUTHENTICATE) {
                     token = FalconAuthorizationToken.getToken(user, uri.getScheme(),
                         uri.getHost(), uri.getPort(), true);
                     request.removeHeaders(RequestKeys.COOKIE);

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/9520370a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedResumeTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedResumeTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedResumeTest.java
index bb629b8..669c4fa 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedResumeTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/FeedResumeTest.java
@@ -22,7 +22,7 @@ package org.apache.falcon.regression;
 import org.apache.falcon.entity.v0.EntityType;
 import org.apache.falcon.regression.core.bundle.Bundle;
 import org.apache.falcon.regression.core.helpers.ColoHelper;
-import org.apache.falcon.regression.core.interfaces.IEntityManagerHelper;
+import org.apache.falcon.regression.core.helpers.entity.AbstractEntityHelper;
 import org.apache.falcon.regression.core.response.ServiceResponse;
 import org.apache.falcon.regression.core.util.AssertUtil;
 import org.apache.falcon.regression.core.util.BundleUtil;
@@ -45,7 +45,7 @@ import java.lang.reflect.Method;
 @Test(groups = "embedded")
 public class FeedResumeTest extends BaseTestClass {
 
-    private final IEntityManagerHelper feedHelper = prism.getFeedHelper();
+    private final AbstractEntityHelper feedHelper = prism.getFeedHelper();
     private String feed;
     private ColoHelper cluster = servers.get(0);
     private OozieClient clusterOC = serverOC.get(0);

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/9520370a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/entity/ListEntitiesTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/entity/ListEntitiesTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/entity/ListEntitiesTest.java
index 1586f76..3ab375d 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/entity/ListEntitiesTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/entity/ListEntitiesTest.java
@@ -24,7 +24,7 @@ import org.apache.falcon.regression.Entities.ClusterMerlin;
 import org.apache.falcon.regression.Entities.FeedMerlin;
 import org.apache.falcon.regression.Entities.ProcessMerlin;
 import org.apache.falcon.regression.core.bundle.Bundle;
-import org.apache.falcon.regression.core.interfaces.IEntityManagerHelper;
+import org.apache.falcon.regression.core.helpers.entity.AbstractEntityHelper;
 import org.apache.falcon.regression.core.util.AssertUtil;
 import org.apache.falcon.regression.core.util.BundleUtil;
 import org.apache.falcon.regression.core.util.CleanupUtil;
@@ -120,7 +120,7 @@ public class ListEntitiesTest extends BaseTestClass {
      * Testing orderBy parameter. Entities should be ordered by name when orderBy=name.
      */
     @Test(dataProvider = "getHelpers")
-    public void listEntitiesWithOrderBy(IEntityManagerHelper helper)
+    public void listEntitiesWithOrderBy(AbstractEntityHelper helper)
         throws AuthenticationException, IOException, URISyntaxException, InterruptedException {
 
         EntityElement[] entities =
@@ -135,7 +135,7 @@ public class ListEntitiesTest extends BaseTestClass {
      * Filter entities by status (SUBMITTED or RUNNING).
      */
     @Test(dataProvider = "getHelpers")
-    public void listEntitiesWithFilterByStatus(IEntityManagerHelper helper)
+    public void listEntitiesWithFilterByStatus(AbstractEntityHelper helper)
         throws AuthenticationException, IOException, URISyntaxException, InterruptedException {
         String[] statuses = helper.getEntityType().equalsIgnoreCase("cluster")
             ? new String[]{"SUBMITTED"} : new String[]{"SUBMITTED", "RUNNING"};
@@ -169,7 +169,7 @@ public class ListEntitiesTest extends BaseTestClass {
      * Testing offset parameter. Checking number of entities and order.
      */
     @Test(dataProvider = "getHelpers")
-    public void listEntitiesWithOffset(IEntityManagerHelper helper)
+    public void listEntitiesWithOffset(AbstractEntityHelper helper)
         throws AuthenticationException, IOException, URISyntaxException, InterruptedException {
 
         EntityElement[] allEntities =
@@ -198,7 +198,7 @@ public class ListEntitiesTest extends BaseTestClass {
      * Testing numResults parameter. Checking number of entities and order.
      */
     @Test(dataProvider = "getHelpers")
-    public void listEntitiesWithNumResults(IEntityManagerHelper helper)
+    public void listEntitiesWithNumResults(AbstractEntityHelper helper)
         throws AuthenticationException, IOException, URISyntaxException, InterruptedException {
 
         EntityElement[] allEntities =
@@ -222,7 +222,7 @@ public class ListEntitiesTest extends BaseTestClass {
      * Get list of entities with tag.
      */
     @Test(dataProvider = "getHelpers")
-    public void listEntitiesWithTags(IEntityManagerHelper helper)
+    public void listEntitiesWithTags(AbstractEntityHelper helper)
         throws AuthenticationException, IOException, URISyntaxException, InterruptedException {
 
         EntityElement[] allEntities =
@@ -258,7 +258,7 @@ public class ListEntitiesTest extends BaseTestClass {
      * Testing list entities API with custom filter.
      */
     @Test(dataProvider = "getHelpers")
-    public void listEntitiesWithCustomFilter(IEntityManagerHelper helper)
+    public void listEntitiesWithCustomFilter(AbstractEntityHelper helper)
         throws AuthenticationException, IOException, URISyntaxException, InterruptedException {
 
         EntityElement[] entities = helper.listEntities(

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/9520370a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/lineage/EntitySummaryTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/lineage/EntitySummaryTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/lineage/EntitySummaryTest.java
index 1546886..39d1e52 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/lineage/EntitySummaryTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/lineage/EntitySummaryTest.java
@@ -27,7 +27,7 @@ import org.apache.falcon.regression.Entities.FeedMerlin;
 import org.apache.falcon.regression.Entities.ProcessMerlin;
 import org.apache.falcon.regression.core.bundle.Bundle;
 import org.apache.falcon.regression.core.helpers.ColoHelper;
-import org.apache.falcon.regression.core.interfaces.IEntityManagerHelper;
+import org.apache.falcon.regression.core.helpers.entity.AbstractEntityHelper;
 import org.apache.falcon.regression.core.util.AssertUtil;
 import org.apache.falcon.regression.core.util.BundleUtil;
 import org.apache.falcon.regression.core.util.CleanupUtil;
@@ -188,7 +188,7 @@ public class EntitySummaryTest extends BaseTestClass {
         throws AuthenticationException, IOException, URISyntaxException, JAXBException,
         OozieClientException, InterruptedException {
         String entityName = Util.readEntityName(entity);
-        IEntityManagerHelper helper;
+        AbstractEntityHelper helper;
         List<String> names = new ArrayList<String>();
         for (int i = 1; i <= 7; i++) {
             String uniqueName = entityName + i;
@@ -245,7 +245,7 @@ public class EntitySummaryTest extends BaseTestClass {
                                               String clusterName)
         throws AuthenticationException, IOException, URISyntaxException, InterruptedException {
         InstancesResult r;
-        IEntityManagerHelper helper;
+        AbstractEntityHelper helper;
         if (entityType == EntityType.FEED) {
             helper = prism.getFeedHelper();
         } else {

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/9520370a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismFeedDeleteTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismFeedDeleteTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismFeedDeleteTest.java
index 33fea84..b3924db 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismFeedDeleteTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismFeedDeleteTest.java
@@ -25,7 +25,7 @@ import org.apache.falcon.entity.v0.EntityType;
 import org.apache.falcon.entity.v0.feed.ActionType;
 import org.apache.falcon.entity.v0.feed.ClusterType;
 import org.apache.falcon.regression.core.helpers.ColoHelper;
-import org.apache.falcon.regression.core.interfaces.IEntityManagerHelper;
+import org.apache.falcon.regression.core.helpers.entity.AbstractEntityHelper;
 import org.apache.falcon.regression.core.response.ServiceResponse;
 import org.apache.falcon.regression.core.util.AssertUtil;
 import org.apache.falcon.regression.core.util.BundleUtil;
@@ -1079,9 +1079,9 @@ public class PrismFeedDeleteTest extends BaseTestClass {
     }
 
     public HashMap<String, List<String>> getSystemState(EntityType entityType) throws Exception {
-        IEntityManagerHelper prismHelper = prism.getClusterHelper();
-        IEntityManagerHelper server1Helper = cluster1.getClusterHelper();
-        IEntityManagerHelper server2Helper = cluster2.getClusterHelper();
+        AbstractEntityHelper prismHelper = prism.getClusterHelper();
+        AbstractEntityHelper server1Helper = cluster1.getClusterHelper();
+        AbstractEntityHelper server2Helper = cluster2.getClusterHelper();
 
         if (entityType == EntityType.FEED) {
             prismHelper = prism.getFeedHelper();

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/9520370a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismProcessDeleteTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismProcessDeleteTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismProcessDeleteTest.java
index 3291d6d..421be1e 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismProcessDeleteTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/prism/PrismProcessDeleteTest.java
@@ -21,7 +21,7 @@ package org.apache.falcon.regression.prism;
 import org.apache.falcon.entity.v0.EntityType;
 import org.apache.falcon.regression.core.bundle.Bundle;
 import org.apache.falcon.regression.core.helpers.ColoHelper;
-import org.apache.falcon.regression.core.interfaces.IEntityManagerHelper;
+import org.apache.falcon.regression.core.helpers.entity.AbstractEntityHelper;
 import org.apache.falcon.regression.core.util.AssertUtil;
 import org.apache.falcon.regression.core.util.BundleUtil;
 import org.apache.falcon.regression.core.util.OSUtil;
@@ -940,9 +940,9 @@ public class PrismProcessDeleteTest extends BaseTestClass {
     }
 
     public HashMap<String, List<String>> getSystemState(EntityType entityType) throws Exception {
-        IEntityManagerHelper prizm = prism.getClusterHelper();
-        IEntityManagerHelper ua1 = cluster2.getClusterHelper();
-        IEntityManagerHelper ua2 = cluster1.getClusterHelper();
+        AbstractEntityHelper prizm = prism.getClusterHelper();
+        AbstractEntityHelper ua1 = cluster2.getClusterHelper();
+        AbstractEntityHelper ua2 = cluster1.getClusterHelper();
 
         if (entityType == EntityType.FEED) {
             prizm = prism.getFeedHelper();

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/9520370a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/ClusterAclTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/ClusterAclTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/ClusterAclTest.java
index 7b561e5..00d5b7d 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/ClusterAclTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/ClusterAclTest.java
@@ -21,7 +21,7 @@ package org.apache.falcon.regression.security;
 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.interfaces.IEntityManagerHelper;
+import org.apache.falcon.regression.core.helpers.entity.AbstractEntityHelper;
 import org.apache.falcon.regression.core.response.ServiceResponse;
 import org.apache.falcon.regression.core.util.AssertUtil;
 import org.apache.falcon.regression.core.util.BundleUtil;
@@ -53,7 +53,7 @@ public class ClusterAclTest extends BaseTestClass {
     private String baseTestDir = baseHDFSDir + "/ClusterAclTest";
     private String aggregateWorkflowDir = baseTestDir + "/aggregator";
     private String feedInputPath = baseTestDir + "/input" + MINUTE_DATE_PATTERN;
-    private final IEntityManagerHelper clusterHelper = prism.getClusterHelper();
+    private final AbstractEntityHelper clusterHelper = prism.getClusterHelper();
     private String clusterString;
 
     @BeforeClass(alwaysRun = true)

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/9520370a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/EntityOp.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/EntityOp.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/EntityOp.java
index 334b51a..ad069de 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/EntityOp.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/EntityOp.java
@@ -18,7 +18,7 @@
 
 package org.apache.falcon.regression.security;
 
-import org.apache.falcon.regression.core.interfaces.IEntityManagerHelper;
+import org.apache.falcon.regression.core.helpers.entity.AbstractEntityHelper;
 import org.apache.falcon.regression.core.response.ServiceResponse;
 import org.apache.falcon.regression.core.util.AssertUtil;
 import org.apache.falcon.regression.core.util.CleanupUtil;
@@ -38,7 +38,7 @@ import java.util.List;
 enum EntityOp {
     status() {
         @Override
-        public boolean executeAs(String user, IEntityManagerHelper helper, String data) {
+        public boolean executeAs(String user, AbstractEntityHelper helper, String data) {
             final ServiceResponse response;
             try {
                 response = helper.getStatus(data, user);
@@ -60,7 +60,7 @@ enum EntityOp {
     },
     dependency() {
         @Override
-        public boolean executeAs(String user, IEntityManagerHelper helper, String data) {
+        public boolean executeAs(String user, AbstractEntityHelper helper, String data) {
             final ServiceResponse response;
             try {
                 response = helper.getEntityDependencies(data, user);
@@ -82,7 +82,7 @@ enum EntityOp {
     },
     listing() {
         @Override
-        public boolean executeAs(String user, IEntityManagerHelper helper, String data) {
+        public boolean executeAs(String user, AbstractEntityHelper helper, String data) {
             final String entityName = Util.readEntityName(data);
             final List<String> entities;
             try {
@@ -109,7 +109,7 @@ enum EntityOp {
     },
     definition() {
         @Override
-        public boolean executeAs(String user, IEntityManagerHelper helper, String data) {
+        public boolean executeAs(String user, AbstractEntityHelper helper, String data) {
             final ServiceResponse response;
             try {
                 response = helper.getEntityDefinition(data, user);
@@ -131,7 +131,7 @@ enum EntityOp {
     },
     delete() {
         @Override
-        public boolean executeAs(String user, IEntityManagerHelper helper, String data) {
+        public boolean executeAs(String user, AbstractEntityHelper helper, String data) {
             final ServiceResponse response;
             try {
                 response = helper.delete(data, user);
@@ -153,7 +153,7 @@ enum EntityOp {
     },
     update() {
         @Override
-        public boolean executeAs(String user, IEntityManagerHelper helper, String data) {
+        public boolean executeAs(String user, AbstractEntityHelper helper, String data) {
             final ServiceResponse response;
             try {
                 response = helper.update(data, data, user);
@@ -175,7 +175,7 @@ enum EntityOp {
     },
     schedule() {
         @Override
-        public boolean executeAs(String user, IEntityManagerHelper helper, String data) {
+        public boolean executeAs(String user, AbstractEntityHelper helper, String data) {
             final ServiceResponse response;
             try {
                 response = helper.schedule(data, user);
@@ -197,7 +197,7 @@ enum EntityOp {
     },
     submit() {
         @Override
-        public boolean executeAs(String user, IEntityManagerHelper helper, String data) {
+        public boolean executeAs(String user, AbstractEntityHelper helper, String data) {
             final ServiceResponse response;
             try {
                 response = helper.submitEntity(data, user);
@@ -219,7 +219,7 @@ enum EntityOp {
     },
     submitAndSchedule() {
         @Override
-        public boolean executeAs(String user, IEntityManagerHelper helper, String data) {
+        public boolean executeAs(String user, AbstractEntityHelper helper, String data) {
             final ServiceResponse response;
             try {
                 response = helper.submitAndSchedule(data, user);
@@ -241,7 +241,7 @@ enum EntityOp {
     },
     suspend() {
         @Override
-        public boolean executeAs(String user, IEntityManagerHelper helper, String data) {
+        public boolean executeAs(String user, AbstractEntityHelper helper, String data) {
             final ServiceResponse response;
             try {
                 response = helper.suspend(data, user);
@@ -263,7 +263,7 @@ enum EntityOp {
     },
     resume() {
         @Override
-        public boolean executeAs(String user, IEntityManagerHelper helper, String data) {
+        public boolean executeAs(String user, AbstractEntityHelper helper, String data) {
             final ServiceResponse response;
             try {
                 response = helper.resume(data, user);
@@ -285,5 +285,5 @@ enum EntityOp {
     };
 
     private static Logger logger = Logger.getLogger(EntityOp.class);
-    public abstract boolean executeAs(String user, IEntityManagerHelper helper, String data);
+    public abstract boolean executeAs(String user, AbstractEntityHelper helper, String data);
 }

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/9520370a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/FeedAclTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/FeedAclTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/FeedAclTest.java
index 8996923..74275ab 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/FeedAclTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/FeedAclTest.java
@@ -22,7 +22,7 @@ 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.interfaces.IEntityManagerHelper;
+import org.apache.falcon.regression.core.helpers.entity.AbstractEntityHelper;
 import org.apache.falcon.regression.core.util.AssertUtil;
 import org.apache.falcon.regression.core.util.BundleUtil;
 import org.apache.falcon.regression.core.util.HadoopUtil;
@@ -54,7 +54,7 @@ public class FeedAclTest extends BaseTestClass {
     private String baseTestDir = baseHDFSDir + "/FeedAclTest";
     private String aggregateWorkflowDir = baseTestDir + "/aggregator";
     private String feedInputPath = baseTestDir + "/input" + MINUTE_DATE_PATTERN;
-    private final IEntityManagerHelper feedHelper = prism.getFeedHelper();
+    private final AbstractEntityHelper feedHelper = prism.getFeedHelper();
     private String feedString;
 
     @BeforeClass(alwaysRun = true)

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/9520370a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/ProcessAclTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/ProcessAclTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/ProcessAclTest.java
index 7d1213e..f5fcdee 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/ProcessAclTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/security/ProcessAclTest.java
@@ -22,7 +22,7 @@ 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.interfaces.IEntityManagerHelper;
+import org.apache.falcon.regression.core.helpers.entity.AbstractEntityHelper;
 import org.apache.falcon.regression.core.util.AssertUtil;
 import org.apache.falcon.regression.core.util.BundleUtil;
 import org.apache.falcon.regression.core.util.HadoopUtil;
@@ -57,7 +57,7 @@ public class ProcessAclTest extends BaseTestClass {
     private String baseTestDir = baseHDFSDir + "/ProcessAclTest";
     private String aggregateWorkflowDir = baseTestDir + "/aggregator";
     private String feedInputPath = baseTestDir + "/input" + MINUTE_DATE_PATTERN;
-    private final IEntityManagerHelper processHelper = prism.getProcessHelper();
+    private final AbstractEntityHelper processHelper = prism.getProcessHelper();
     private String processString;
 
     @BeforeClass(alwaysRun = true)


Mime
View raw message