falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samar...@apache.org
Subject [23/27] adding falcon-regression
Date Mon, 04 Aug 2014 10:04:22 GMT
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/bdcf001f/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/helpers/LineageHelper.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/helpers/LineageHelper.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/helpers/LineageHelper.java
new file mode 100644
index 0000000..746ba11
--- /dev/null
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/helpers/LineageHelper.java
@@ -0,0 +1,340 @@
+/**
+ * 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.helpers;
+
+import com.google.gson.GsonBuilder;
+import org.apache.commons.lang.StringUtils;
+import org.apache.falcon.regression.core.response.lineage.Direction;
+import org.apache.falcon.regression.core.response.lineage.EdgeResult;
+import org.apache.falcon.regression.core.response.lineage.EdgesResult;
+import org.apache.falcon.regression.core.response.lineage.Vertex;
+import org.apache.falcon.regression.core.response.lineage.VertexIdsResult;
+import org.apache.falcon.regression.core.response.lineage.VertexResult;
+import org.apache.falcon.regression.core.response.lineage.VerticesResult;
+import org.apache.falcon.regression.core.util.AssertUtil;
+import org.apache.falcon.regression.core.util.GraphAssert;
+import org.apache.falcon.regression.core.util.Util;
+import org.apache.falcon.request.BaseRequest;
+import org.apache.hadoop.security.authentication.client.AuthenticationException;
+import org.apache.http.HttpResponse;
+import org.apache.log4j.Logger;
+import org.testng.Assert;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.URISyntaxException;
+import java.util.EnumSet;
+import java.util.Map;
+import java.util.TreeMap;
+
+/**
+ *  Class with helper functions to test lineage feature.
+ */
+public class LineageHelper {
+    private static final Logger LOGGER = Logger.getLogger(LineageHelper.class);
+    private final String hostname;
+
+    /**
+     * Lineage related REST endpoints.
+     */
+    public enum URL {
+        SERIALIZE("/api/graphs/lineage/serialize"),
+        VERTICES("/api/graphs/lineage/vertices"),
+        VERTICES_ALL("/api/graphs/lineage/vertices/all"),
+        VERTICES_PROPERTIES("/api/graphs/lineage/vertices/properties"),
+        EDGES("/api/graphs/lineage/edges"),
+        EDGES_ALL("/api/graphs/lineage/edges/all");
+
+        private final String url;
+
+        URL(String url) {
+            this.url = url;
+        }
+
+        public String getValue() {
+            return this.url;
+        }
+    }
+
+    /**
+     * Create a LineageHelper to use with a specified hostname.
+     * @param hostname hostname
+     */
+    public LineageHelper(String hostname) {
+        this.hostname = hostname.trim().replaceAll("/$", "");
+    }
+
+    /**
+     * Create a LineageHelper to use with a specified prismHelper.
+     * @param prismHelper prismHelper
+     */
+    public LineageHelper(ColoHelper prismHelper) {
+        this(prismHelper.getClusterHelper().getHostname());
+    }
+
+    /**
+     * Extract response string from the response object.
+     * @param response the response object
+     * @return the response string
+     * @throws IOException
+     */
+    public String getResponseString(HttpResponse response) throws IOException {
+        BufferedReader reader = new BufferedReader(
+                new InputStreamReader(response.getEntity().getContent(), "UTF-8"));
+        StringBuilder sb = new StringBuilder();
+        String line;
+        while((line = reader.readLine()) != null){
+            sb.append(line).append("\n");
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Run a get request on the specified url.
+     * @param url url
+     * @return response of the request
+     * @throws URISyntaxException
+     * @throws IOException
+     * @throws AuthenticationException
+     */
+    public HttpResponse runGetRequest(String url)
+        throws URISyntaxException, IOException, AuthenticationException {
+        final BaseRequest request = new BaseRequest(url, "get", null);
+        return request.run();
+    }
+
+    /**
+     * Successfully run a get request on the specified url.
+     * @param url url
+     * @return string response of the request
+     * @throws URISyntaxException
+     * @throws IOException
+     * @throws AuthenticationException
+     */
+    public String runGetRequestSuccessfully(String url)
+        throws URISyntaxException, IOException, AuthenticationException {
+        HttpResponse response = runGetRequest(url);
+        String responseString = getResponseString(response);
+        LOGGER.info(Util.prettyPrintXmlOrJson(responseString));
+        Assert.assertEquals(response.getStatusLine().getStatusCode(), 200,
+                "The get request  was expected to be successfully");
+        return responseString;
+    }
+
+    /**
+     * Create a full url for the given lineage endpoint, urlPath and parameter.
+     * @param url        lineage endpoint
+     * @param urlPath    url path to be added to lineage endpoint
+     * @param paramPairs parameters to be passed
+     * @return url string
+     */
+    public String getUrl(final URL url, final String urlPath, final Map<String,
+            String> paramPairs) {
+        Assert.assertNotNull(hostname, "Hostname can't be null.");
+        String hostAndPath = hostname + url.getValue();
+        if (urlPath != null) {
+            hostAndPath += "/" + urlPath;
+        }
+        if (paramPairs != null && paramPairs.size() > 0) {
+            String[] params = new String[paramPairs.size()];
+            int i = 0;
+            for (String key : paramPairs.keySet()) {
+                params[i++] = key + '=' + paramPairs.get(key);
+            }
+            return hostAndPath + "/?" + StringUtils.join(params, "&");
+        }
+        return hostAndPath;
+    }
+
+    /**
+     * Create a full url for the given lineage endpoint, urlPath and parameter.
+     * @param url     lineage endpoint
+     * @param urlPath url path to be added to lineage endpoint
+     * @return url string
+     */
+    public String getUrl(final URL url, final String urlPath) {
+        return getUrl(url, urlPath, null);
+    }
+
+    /**
+     * Create a full url for the given lineage endpoint and parameter.
+     * @param url        lineage endpoint
+     * @param paramPairs parameters to be passed
+     * @return url string
+     */
+    public String getUrl(final URL url, final Map<String, String> paramPairs) {
+        return getUrl(url, null, paramPairs);
+    }
+
+    /**
+     * Create a full url for the given lineage endpoint and parameter.
+     * @param url lineage endpoint
+     * @return url string
+     */
+    public String getUrl(final URL url) {
+        return getUrl(url, null, null);
+    }
+
+    /**
+     * Create url path from parts.
+     * @param pathParts parts of the path
+     * @return url path
+     */
+    public String getUrlPath(String... pathParts) {
+        return StringUtils.join(pathParts, "/");
+    }
+
+    /**
+     * Create url path from parts.
+     * @param oneInt    part of the path
+     * @param pathParts parts of the path
+     * @return url path
+     */
+    public String getUrlPath(int oneInt, String... pathParts) {
+        return oneInt + "/" + getUrlPath(pathParts);
+    }
+
+    /**
+     * Get result of the supplied type for the given url.
+     * @param url url
+     * @return result of the REST request
+     */
+    public <T> T getResultOfType(String url, Class<T> clazz) {
+        String responseString = null;
+        try {
+            responseString = runGetRequestSuccessfully(url);
+        } catch (URISyntaxException e) {
+            AssertUtil.fail(e);
+        } catch (IOException e) {
+            AssertUtil.fail(e);
+        } catch (AuthenticationException e) {
+            AssertUtil.fail(e);
+        }
+        return new GsonBuilder().create().fromJson(responseString, clazz);
+    }
+
+    /**
+     * Get vertices result for the url.
+     * @param url url
+     * @return result of the REST request
+     */
+    public VerticesResult getVerticesResult(String url) {
+        return getResultOfType(url, VerticesResult.class);
+    }
+
+    /**
+     * Get vertex result for the url.
+     * @param url url
+     * @return result of the REST request
+     */
+    private VertexResult getVertexResult(String url) {
+        return getResultOfType(url, VertexResult.class);
+    }
+
+    /**
+     * Get vertex id result for the url.
+     * @param url url
+     * @return result of the REST request
+     */
+    private VertexIdsResult getVertexIdsResult(String url) {
+        return getResultOfType(url, VertexIdsResult.class);
+    }
+
+    /**
+     * Get all the vertices.
+     * @return all the vertices
+     */
+    public VerticesResult getAllVertices() {
+        return getVerticesResult(getUrl(URL.VERTICES_ALL));
+    }
+
+    public VerticesResult getVertices(Vertex.FilterKey key, String value) {
+        Map<String, String> params = new TreeMap<String, String>();
+        params.put("key", key.toString());
+        params.put("value", value);
+        return getVerticesResult(getUrl(URL.VERTICES, params));
+    }
+
+    public VertexResult getVertexById(int vertexId) {
+        return getVertexResult(getUrl(URL.VERTICES, getUrlPath(vertexId)));
+    }
+
+    public VertexResult getVertexProperties(int vertexId) {
+        return getVertexResult(getUrl(URL.VERTICES_PROPERTIES, getUrlPath(vertexId)));
+    }
+
+    public VerticesResult getVerticesByType(Vertex.VERTEX_TYPE vertexType) {
+        return getVertices(Vertex.FilterKey.type, vertexType.getValue());
+    }
+
+    public VerticesResult getVerticesByName(String name) {
+        return getVertices(Vertex.FilterKey.name, name);
+    }
+
+    public VerticesResult getVerticesByDirection(int vertexId, Direction direction) {
+        Assert.assertTrue((EnumSet.of(Direction.bothCount, Direction.inCount, Direction.outCount,
+                Direction.bothVertices, Direction.inComingVertices,
+                Direction.outgoingVertices).contains(direction)),
+                "Vertices requested.");
+        return getVerticesResult(getUrl(URL.VERTICES, getUrlPath(vertexId, direction.getValue())));
+    }
+
+    public VertexIdsResult getVertexIdsByDirection(int vertexId, Direction direction) {
+        Assert.assertTrue((EnumSet.of(Direction.bothVerticesIds, Direction.incomingVerticesIds,
+                Direction.outgoingVerticesIds).contains(direction)),
+                "Vertex Ids requested.");
+        return getVertexIdsResult(getUrl(URL.VERTICES, getUrlPath(vertexId, direction.getValue())));
+    }
+
+    public Vertex getVertex(String vertexName) {
+        final VerticesResult clusterResult = getVerticesByName(vertexName);
+        GraphAssert.assertVertexSanity(clusterResult);
+        Assert.assertEquals(clusterResult.getTotalSize(), 1,
+                "Expected one node for vertex name:" + vertexName);
+        return clusterResult.getResults().get(0);
+    }
+
+    /**
+     * Get edges result for the url.
+     * @param url url
+     * @return result of the REST request
+     */
+    private EdgesResult getEdgesResult(String url) {
+        return getResultOfType(url, EdgesResult.class);
+    }
+
+    private EdgeResult getEdgeResult(String url) {
+        return getResultOfType(url, EdgeResult.class);
+    }
+
+    public EdgesResult getEdgesByDirection(int vertexId, Direction direction) {
+        Assert.assertTrue((EnumSet.of(Direction.bothEdges, Direction.inComingEdges,
+            Direction.outGoingEdges).contains(direction)), "Vertices requested.");
+        return getEdgesResult(getUrl(URL.VERTICES, getUrlPath(vertexId, direction.getValue())));
+    }
+
+    public EdgesResult getAllEdges() {
+        return getEdgesResult(getUrl(URL.EDGES_ALL));
+    }
+
+    public EdgeResult getEdgeById(String edgeId) {
+        return getEdgeResult(getUrl(URL.EDGES, getUrlPath(edgeId)));
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/bdcf001f/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/helpers/ProcessEntityHelperImpl.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/helpers/ProcessEntityHelperImpl.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/helpers/ProcessEntityHelperImpl.java
new file mode 100644
index 0000000..c037b5e
--- /dev/null
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/helpers/ProcessEntityHelperImpl.java
@@ -0,0 +1,43 @@
+/**
+ * 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.helpers;
+
+import org.apache.falcon.regression.core.interfaces.IEntityManagerHelper;
+import org.apache.falcon.regression.core.util.Util;
+import org.apache.log4j.Logger;
+
+public class ProcessEntityHelperImpl extends IEntityManagerHelper {
+
+    private static final Logger logger = Logger.getLogger(ProcessEntityHelperImpl.class);
+
+    public ProcessEntityHelperImpl(String prefix) {
+        super(prefix);
+    }
+
+    public String getEntityType() {
+        return "process";
+    }
+
+    public String getEntityName(String entity) {
+        return Util.getProcessName(entity);
+    }
+
+}
+
+

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/bdcf001f/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/interfaces/EntityHelperFactory.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/interfaces/EntityHelperFactory.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/interfaces/EntityHelperFactory.java
new file mode 100644
index 0000000..ffda6e5
--- /dev/null
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/interfaces/EntityHelperFactory.java
@@ -0,0 +1,42 @@
+/**
+ * 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 org.apache.falcon.entity.v0.EntityType;
+import org.apache.falcon.regression.core.helpers.ClusterEntityHelperImpl;
+import org.apache.falcon.regression.core.helpers.DataEntityHelperImpl;
+import org.apache.falcon.regression.core.helpers.ProcessEntityHelperImpl;
+
+public class EntityHelperFactory {
+    private EntityHelperFactory() {
+    }
+
+    public static IEntityManagerHelper getEntityHelper(EntityType type, String prefix) {
+        switch (type) {
+            case FEED:
+                return new DataEntityHelperImpl(prefix);
+            case CLUSTER:
+                return new ClusterEntityHelperImpl(prefix);
+            case PROCESS:
+                return new ProcessEntityHelperImpl(prefix);
+            default:
+                return null;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/bdcf001f/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
new file mode 100644
index 0000000..01eb02f
--- /dev/null
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/interfaces/IEntityManagerHelper.java
@@ -0,0 +1,512 @@
+/**
+ * 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.lang.exception.ExceptionUtils;
+import org.apache.falcon.regression.core.response.InstancesSummaryResult;
+import org.apache.falcon.regression.core.response.InstancesResult;
+import org.apache.falcon.regression.core.response.ServiceResponse;
+import org.apache.falcon.regression.core.util.Config;
+import org.apache.falcon.regression.core.util.ExecUtil;
+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.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;
+
+public abstract class IEntityManagerHelper {
+
+    public static boolean AUTHENTICATE = setAuthenticate();
+
+    private static final Logger logger = Logger.getLogger(IEntityManagerHelper.class);
+
+    protected String CLIENT_LOCATION = OSUtil.RESOURCES
+        + OSUtil.getPath("IvoryClient", "IvoryCLI.jar");
+    protected 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(URLS url)
+        throws IOException, URISyntaxException, AuthenticationException {
+        return listEntities(url, null);
+    }
+
+    public ServiceResponse listEntities(Util.URLS url, String user)
+        throws IOException, URISyntaxException, AuthenticationException {
+        logger.info("fetching " + getEntityType() + " list");
+        return Util.sendRequest(createUrl(this.hostname + url.getValue(), getEntityType() + colo),
+            "get", null, user);
+    }
+
+    public ServiceResponse submitEntity(URLS url, String data)
+        throws IOException, URISyntaxException, AuthenticationException {
+        return submitEntity(url, data, null);
+    }
+
+    public ServiceResponse submitEntity(URLS url, String data, String user)
+        throws IOException, URISyntaxException, AuthenticationException {
+        logger.info("Submitting " + getEntityType() + ": \n" + Util.prettyPrintXml(data));
+        return Util.sendRequest(createUrl(this.hostname + url.getValue(), getEntityType() + colo),
+            "post", data, user);
+    }
+
+    public ServiceResponse schedule(URLS scheduleUrl, String processData)
+        throws IOException, URISyntaxException, AuthenticationException {
+        return schedule(scheduleUrl, processData, null);
+    }
+
+    public ServiceResponse schedule(URLS scheduleUrl, String processData, String user)
+        throws IOException, URISyntaxException, AuthenticationException {
+        return Util.sendRequest(createUrl(this.hostname + scheduleUrl.getValue(), getEntityType(),
+            getEntityName(processData) + colo), "post", user);
+    }
+
+    public ServiceResponse submitAndSchedule(URLS url, String data)
+        throws IOException, URISyntaxException, AuthenticationException {
+        return submitAndSchedule(url, data, null);
+    }
+
+    public ServiceResponse submitAndSchedule(URLS url, String data, String user)
+        throws IOException, URISyntaxException, AuthenticationException {
+        logger.info("Submitting " + getEntityType() + ": \n" + Util.prettyPrintXml(data));
+        return Util.sendRequest(createUrl(this.hostname + url.getValue(), getEntityType()), "post",
+            data, user);
+    }
+
+    public ServiceResponse deleteByName(URLS deleteUrl, String entityName, String user)
+        throws AuthenticationException, IOException, URISyntaxException {
+        return Util.sendRequest(
+            createUrl(this.hostname + deleteUrl.getValue(), getEntityType(), entityName + colo),
+            "delete", user);
+    }
+
+    public ServiceResponse delete(URLS deleteUrl, String data)
+        throws IOException, URISyntaxException, AuthenticationException {
+        return delete(deleteUrl, data, null);
+    }
+
+    public ServiceResponse delete(URLS deleteUrl, String data, String user)
+        throws IOException, URISyntaxException, AuthenticationException {
+        return Util.sendRequest(
+            createUrl(this.hostname + deleteUrl.getValue(), getEntityType(),
+                getEntityName(data) + colo),
+            "delete", user);
+    }
+
+    public ServiceResponse suspend(URLS suspendUrl, String data)
+        throws IOException, URISyntaxException, AuthenticationException {
+        return suspend(suspendUrl, data, null);
+    }
+
+    public ServiceResponse suspend(URLS url, String data, String user)
+        throws IOException, URISyntaxException, AuthenticationException {
+        return Util.sendRequest(
+            createUrl(this.hostname + url.getValue(), getEntityType(), getEntityName(data) + colo),
+            "post", user);
+    }
+
+    public ServiceResponse resume(URLS url, String data)
+        throws IOException, URISyntaxException, AuthenticationException {
+        return resume(url, data, null);
+    }
+
+    public ServiceResponse resume(URLS url, String data, String user)
+        throws IOException, URISyntaxException, AuthenticationException {
+        return Util.sendRequest(
+            createUrl(this.hostname + url.getValue(), getEntityType(), getEntityName(data) + colo),
+            "post", user);
+    }
+
+    public ServiceResponse getStatus(URLS url, String data)
+        throws IOException, URISyntaxException, AuthenticationException {
+        return getStatus(url, data, null);
+    }
+
+    public ServiceResponse getStatus(Util.URLS url, String data, String user)
+        throws IOException, URISyntaxException, AuthenticationException {
+        return Util.sendRequest(
+            createUrl(this.hostname + url.getValue(), getEntityType(), getEntityName(data) + colo),
+            "get", user);
+    }
+
+    public ServiceResponse getEntityDefinition(URLS url, String data)
+        throws IOException, URISyntaxException, AuthenticationException {
+        return getEntityDefinition(url, data, null);
+    }
+
+    public ServiceResponse getEntityDefinition(URLS url, String data, String user)
+        throws IOException, URISyntaxException, AuthenticationException {
+        return Util.sendRequest(
+            createUrl(this.hostname + url.getValue(), getEntityType(), getEntityName(data) + colo),
+            "get", user);
+    }
+
+    public InstancesResult getRunningInstance(URLS processRunningInstance, String name)
+        throws IOException, URISyntaxException, AuthenticationException {
+        return getRunningInstance(processRunningInstance, name, null);
+    }
+
+    public InstancesResult getRunningInstance(
+        URLS processRunningInstance, String name, String user)
+        throws IOException, URISyntaxException, AuthenticationException {
+        String url = createUrl(this.hostname + processRunningInstance.getValue(), getEntityType(),
+            name + allColo);
+        return (InstancesResult) InstanceUtil.sendRequestProcessInstance(url, user);
+    }
+
+    public InstancesResult getProcessInstanceStatus(String entityName, String params)
+        throws IOException, URISyntaxException, AuthenticationException {
+        return getProcessInstanceStatus(entityName, params, null);
+    }
+
+    public InstancesResult getProcessInstanceStatus(
+        String entityName, String params, String user)
+        throws IOException, URISyntaxException, AuthenticationException {
+        String url = createUrl(this.hostname + Util.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 {
+        return getProcessInstanceSuspend(readEntityName, params, null);
+    }
+
+    public InstancesResult getProcessInstanceSuspend(
+        String entityName, String params, String user)
+        throws IOException, URISyntaxException, AuthenticationException {
+        String url = createUrl(this.hostname + Util.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 {
+        return update(oldEntity, newEntity, null);
+    }
+
+    public ServiceResponse update(String oldEntity, String newEntity, String user)
+        throws IOException, URISyntaxException, AuthenticationException {
+        String url = createUrl(this.hostname + Util.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 {
+        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 {
+        return getProcessInstanceKill(readEntityName, params, null);
+    }
+
+    public InstancesResult getProcessInstanceKill(String entityName, String params,
+                                                         String user)
+        throws IOException, URISyntaxException, AuthenticationException {
+        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 {
+        return getProcessInstanceRerun(EntityName, params, null);
+    }
+
+    public InstancesResult getProcessInstanceRerun(String entityName, String params,
+                                                          String user)
+        throws IOException, URISyntaxException, AuthenticationException {
+        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 {
+        return getProcessInstanceResume(EntityName, params, null);
+    }
+
+    public InstancesResult getProcessInstanceResume(String entityName, String params,
+                                                           String user)
+        throws IOException, URISyntaxException, AuthenticationException {
+        String url = createUrl(this.hostname + Util.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 {
+        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 {
+        String url = createUrl(this.hostname + Util.URLS.INSTANCE_PARAMS.getValue(),
+            getEntityType(), entityName, "");
+        return (InstancesResult) InstanceUtil
+            .createAndSendRequestProcessInstance(url, params, allColo, null);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/bdcf001f/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/APIResult.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/APIResult.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/APIResult.java
new file mode 100644
index 0000000..40d640a
--- /dev/null
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/APIResult.java
@@ -0,0 +1,130 @@
+/**
+ * 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.response;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBException;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.io.StringWriter;
+
+/**
+ * APIResult is the output returned by all the APIs; status-SUCCEEDED or FAILED
+ * message- detailed message
+ */
+@XmlRootElement(name = "result")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class APIResult {
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    public void setRequestId(String requestId) {
+        this.requestId = requestId;
+    }
+
+    public void setStatus(Status status) {
+        this.status = status;
+    }
+
+    private Status status;
+
+    private String message;
+
+    private String requestId;
+
+    private int statusCode;
+
+    private static final JAXBContext jc;
+
+    static {
+        try {
+            jc = JAXBContext.newInstance(APIResult.class);
+        } catch (JAXBException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public static enum Status {
+        SUCCEEDED, PARTIAL, FAILED
+    }
+
+    public APIResult(Status status, String message, Integer statusCode) {
+        super();
+        this.status = status;
+        this.message = message;
+        this.statusCode = statusCode;
+    }
+
+    public APIResult(Status status, String message) {
+        super();
+        this.status = status;
+        this.message = message;
+
+    }
+
+    public APIResult(Status status, String message, String requestId, Integer statusCode) {
+        this(status, message, statusCode);
+        this.requestId = requestId;
+    }
+
+    public APIResult(Status status, String message, String requestId) {
+        this(status, message);
+        this.requestId = requestId;
+    }
+
+    public APIResult() {
+        // private default constructor for JAXB
+    }
+
+    public Status getStatus() {
+        return status;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public String getRequestId() {
+        return requestId;
+    }
+
+    public int getStatusCode() {
+        return statusCode;
+    }
+
+    public void setStatusCode(int statusCode) {
+        this.statusCode = statusCode;
+    }
+
+    @Override
+    public String toString() {
+        try {
+            StringWriter stringWriter = new StringWriter();
+            Marshaller marshaller = jc.createMarshaller();
+            marshaller.marshal(this, stringWriter);
+            return stringWriter.toString();
+        } catch (JAXBException e) {
+            return e.getMessage();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/bdcf001f/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/EntitiesResult.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/EntitiesResult.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/EntitiesResult.java
new file mode 100644
index 0000000..5a77680
--- /dev/null
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/EntitiesResult.java
@@ -0,0 +1,44 @@
+/**
+ * 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.response;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.ArrayList;
+import java.util.List;
+
+@XmlRootElement(name = "entities")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class EntitiesResult {
+    @XmlElement(name = "entity")
+    List<EntityResult> entities = new ArrayList<EntityResult>();
+
+    public List<EntityResult> getEntities() {
+        return entities;
+    }
+
+    @Override
+    public String toString() {
+        return "EntitiesResult{" +
+            "entities=" + entities +
+            '}';
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/bdcf001f/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/EntityResult.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/EntityResult.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/EntityResult.java
new file mode 100644
index 0000000..f44c340
--- /dev/null
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/EntityResult.java
@@ -0,0 +1,50 @@
+/**
+ * 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.response;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "entity")
+@XmlAccessorType(XmlAccessType.FIELD)
+public class EntityResult {
+    @XmlElement(name = "type")
+    String type;
+    @XmlElement(name = "name")
+    String name;
+
+    public String getType() {
+        return type;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public String toString() {
+        return "EntityResult{" +
+            "type='" + type + '\'' +
+            ", name='" + name + '\'' +
+            '}';
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/bdcf001f/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/InstancesResult.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/InstancesResult.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/InstancesResult.java
new file mode 100644
index 0000000..8d1311b
--- /dev/null
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/InstancesResult.java
@@ -0,0 +1,210 @@
+/**
+ * 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.response;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Date;
+import java.util.Map;
+
+/**
+ * Pojo for JAXB marshalling / unmarshalling.
+ */
+//SUSPEND CHECKSTYLE CHECK VisibilityModifierCheck
+@XmlRootElement
+@edu.umd.cs.findbugs.annotations.SuppressWarnings({"EI_EXPOSE_REP", "EI_EXPOSE_REP2"})
+public class InstancesResult extends APIResult {
+
+    /**
+     * Workflow status as being set in result object.
+     */
+    public static enum WorkflowStatus {
+        WAITING, RUNNING, SUSPENDED, KILLED, FAILED, SUCCEEDED, ERROR
+    }
+
+    @XmlElement
+    private Instance[] instances;
+
+    private InstancesResult() { // for jaxb
+        super();
+    }
+
+    public InstancesResult(String message, Instance[] instances) {
+        this(Status.SUCCEEDED, message, instances);
+    }
+
+    public InstancesResult(Status status, String message,
+                           Instance[] instanceExes) {
+        super(status, message);
+        this.instances = instanceExes;
+    }
+
+    public InstancesResult(Status status, String message) {
+        super(status, message);
+    }
+
+
+    public Instance[] getInstances() {
+        return instances;
+    }
+
+    public void setInstances(Instance[] instances) {
+        this.instances = instances;
+    }
+
+    /**
+     * A single instance object inside instance result.
+     */
+    @XmlRootElement(name = "instance")
+    public static class Instance {
+        @XmlElement
+        public String instance;
+
+        @XmlElement
+        public WorkflowStatus status;
+
+        @XmlElement
+        public String logFile;
+
+        @XmlElement
+        public String cluster;
+
+        @XmlElement
+        public String sourceCluster;
+
+        @XmlElement
+        public Date startTime;
+
+        @XmlElement
+        public Date endTime;
+
+        @XmlElement
+        public String details;
+
+        @XmlElement
+        public InstanceAction[] actions;
+
+        @XmlElementWrapper(name="params")
+        public Map<String, String> wfParams;
+
+        public Instance() {
+        }
+
+        public Instance(String cluster, String instance, WorkflowStatus status) {
+            this.cluster = cluster;
+            this.instance = instance;
+            this.status = status;
+        }
+
+        public String getInstance() {
+            return instance;
+        }
+
+        public WorkflowStatus getStatus() {
+            return status;
+        }
+
+        public String getLogFile() {
+            return logFile;
+        }
+
+        public String getCluster() {
+            return cluster;
+        }
+
+        public String getSourceCluster() {
+            return sourceCluster;
+        }
+
+        public Date getStartTime() {
+            return startTime;
+        }
+
+        public Date getEndTime() {
+            return endTime;
+        }
+
+        public InstanceAction[] getActions() {
+            return actions;
+        }
+
+        public String getDetails() {
+            return details;
+        }
+
+        public Map<String, String> getWfParams() { return wfParams; }
+
+
+        @Override
+        public String toString() {
+            return "{instance:"
+                + this.instance
+                + ", status:"
+                + this.status
+                + (this.logFile == null ? "" : ", log:" + this.logFile)
+                + (this.sourceCluster == null ? "" : ", source-cluster:"
+                + this.sourceCluster)
+                + (this.cluster == null ? "" : ", cluster:"
+                + this.cluster) + "}";
+        }
+    }
+
+    /**
+     * Instance action inside an instance object.
+     */
+    @XmlRootElement(name = "actions")
+    public static class InstanceAction {
+        @XmlElement
+        public String action;
+        @XmlElement
+        public String status;
+        @XmlElement
+        public String logFile;
+
+        public InstanceAction() {
+        }
+
+        public InstanceAction(String action, String status, String logFile) {
+            this.action = action;
+            this.status = status;
+            this.logFile = logFile;
+        }
+
+        public String getAction() {
+            return action;
+        }
+
+        public String getStatus() {
+            return status;
+        }
+
+        public String getLogFile() {
+            return logFile;
+        }
+
+        @Override
+        public String toString() {
+            return "{action:" + this.action + ", status:" + this.status
+                + (this.logFile == null ? "" : ", log:" + this.logFile)
+                + "}";
+        }
+    }
+}
+//RESUME CHECKSTYLE CHECK VisibilityModifierCheck
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/bdcf001f/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/InstancesSummaryResult.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/InstancesSummaryResult.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/InstancesSummaryResult.java
new file mode 100644
index 0000000..eca972c
--- /dev/null
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/InstancesSummaryResult.java
@@ -0,0 +1,99 @@
+/**
+ * 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.response;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementWrapper;
+import javax.xml.bind.annotation.XmlRootElement;
+import java.util.Map;
+
+/**
+ * Pojo for JAXB marshalling / unmarshalling.
+ */
+
+//SUSPEND CHECKSTYLE CHECK VisibilityModifierCheck
+@XmlRootElement
+@edu.umd.cs.findbugs.annotations.SuppressWarnings({"EI_EXPOSE_REP", "EI_EXPOSE_REP2"})
+public class InstancesSummaryResult extends APIResult {
+
+    @XmlElement
+    private InstanceSummary[] instancesSummary;
+
+    private InstancesSummaryResult() { // for jaxb
+        super();
+    }
+
+    public InstancesSummaryResult(String message, InstanceSummary[] instancesSummary) {
+        this(Status.SUCCEEDED, message, instancesSummary);
+    }
+
+    public InstancesSummaryResult(Status status, String message,
+                                  InstanceSummary[] instancesSummary) {
+        super(status, message);
+        this.instancesSummary = instancesSummary;
+    }
+
+    public InstancesSummaryResult(Status status, String message) {
+        super(status, message);
+    }
+
+    public InstanceSummary[] getInstancesSummary() {
+        return instancesSummary;
+    }
+
+    public void setInstancesSummary(InstanceSummary[] instancesSummary) {
+        this.instancesSummary = instancesSummary;
+    }
+
+    /**
+     * A single instance object inside instance result.
+     */
+    @XmlRootElement(name = "instance-summary")
+    public static class InstanceSummary {
+
+        @XmlElement
+        public String cluster;
+        @XmlElementWrapper(name = "map")
+        public Map<String, Long> summaryMap;
+
+        public InstanceSummary() {
+        }
+
+        public InstanceSummary(String cluster, Map<String, Long> summaryMap) {
+            this.cluster = cluster;
+            this.summaryMap = summaryMap;
+        }
+
+        public Map<String, Long> getSummaryMap() {
+            return summaryMap;
+        }
+
+        public String getCluster() {
+            return cluster;
+        }
+
+        @Override
+        public String toString() {
+            return "cluster: " + (this.cluster == null ? "" : this.cluster)
+                + "summaryMap: " + summaryMap.toString();
+        }
+    }
+
+}
+//RESUME CHECKSTYLE CHECK VisibilityModifierCheck

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/bdcf001f/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/ResponseKeys.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/ResponseKeys.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/ResponseKeys.java
new file mode 100644
index 0000000..a9ea122
--- /dev/null
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/ResponseKeys.java
@@ -0,0 +1,25 @@
+/**
+ * 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.response;
+
+public class ResponseKeys {
+
+    public static final int PROCESS_NOT_FOUND = 777;
+    public static final int UNPARSEABLE_DATE = 2;
+}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/bdcf001f/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/ServiceResponse.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/ServiceResponse.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/ServiceResponse.java
new file mode 100644
index 0000000..259e6e4
--- /dev/null
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/ServiceResponse.java
@@ -0,0 +1,85 @@
+/**
+ * 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.response;
+
+import org.apache.falcon.regression.core.util.Util;
+import org.apache.http.HttpResponse;
+import org.apache.log4j.Logger;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+
+public class ServiceResponse {
+    private static final Logger logger = Logger.getLogger(ServiceResponse.class);
+
+    public String message;
+    int code;
+    private HttpResponse response;
+
+    public int getCode() {
+        return code;
+    }
+
+    public void setCode(int code) {
+        this.code = code;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public void setMessage(String message) {
+        this.message = message;
+    }
+
+    public HttpResponse getResponse() {
+        return response;
+    }
+
+    public void setResponse(HttpResponse response) {
+        this.response = response;
+    }
+
+    public ServiceResponse(String message, int code) {
+        this.message = message;
+        this.code = code;
+    }
+
+    public ServiceResponse(HttpResponse response) throws IOException {
+        BufferedReader reader =
+            new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
+
+        String line;
+        StringBuilder string_response = new StringBuilder();
+
+        while ((line = reader.readLine()) != null) {
+            string_response.append(line);
+        }
+        this.message = string_response.toString();
+        this.code = response.getStatusLine().getStatusCode();
+        this.response = response;
+
+        logger.info("The web service response is:\n" +
+            Util.prettyPrintXmlOrJson(message));
+    }
+
+    public ServiceResponse() {
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/bdcf001f/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Direction.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Direction.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Direction.java
new file mode 100644
index 0000000..6d3665f
--- /dev/null
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Direction.java
@@ -0,0 +1,44 @@
+/**
+ * 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.response.lineage;
+
+public enum Direction {
+    outGoingEdges("outE"),
+    inComingEdges("inE"),
+    bothEdges("bothE"),
+    outgoingVertices("out"),
+    inComingVertices("in"),
+    bothVertices("both"),
+    outCount("outCount"),
+    inCount("inCount"),
+    bothCount("bothCount"),
+    outgoingVerticesIds("outIds"),
+    incomingVerticesIds("inIds"),
+    bothVerticesIds("bothIds");
+
+    private final String value;
+
+    Direction(String value) {
+        this.value = value;
+    }
+
+    public String getValue() {
+        return value;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/bdcf001f/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Edge.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Edge.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Edge.java
new file mode 100644
index 0000000..66e6664
--- /dev/null
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Edge.java
@@ -0,0 +1,72 @@
+/**
+ * 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.response.lineage;
+
+import com.google.gson.annotations.SerializedName;
+
+public class Edge extends GraphEntity {
+
+    public static enum LEBEL_TYPE {
+        @SerializedName("stored-in")STORED_IN,
+        @SerializedName("runs-on")RUNS_ON,
+        @SerializedName("input")INPUT,
+        @SerializedName("output")OUTPUT,
+
+        @SerializedName("instance-of")INSTANCE_ENTITY_EDGE,
+
+        @SerializedName("collocated")CLUSTER_COLO,
+        @SerializedName("owned-by")OWNED_BY,
+        @SerializedName("grouped-as")GROUPS,
+        //custom labels for test tags
+        @SerializedName("test")TEST,
+        @SerializedName("testname")TESTNAME,
+    }
+
+    String _id;
+    int _outV;
+    int _inV;
+    LEBEL_TYPE _label;
+
+    public String get_id() {
+        return _id;
+    }
+
+    public int get_outV() {
+        return _outV;
+    }
+
+    public int get_inV() {
+        return _inV;
+    }
+
+    public LEBEL_TYPE get_label() {
+        return _label;
+    }
+
+    @Override
+    public String toString() {
+        return "Edge{" +
+            "_id='" + _id + '\'' +
+            ", _outV=" + _outV +
+            ", _inV=" + _inV +
+            ", _label=" + _label +
+            '}';
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/bdcf001f/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/EdgeResult.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/EdgeResult.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/EdgeResult.java
new file mode 100644
index 0000000..420d88f
--- /dev/null
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/EdgeResult.java
@@ -0,0 +1,35 @@
+/**
+ * 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.response.lineage;
+
+public class EdgeResult {
+    Edge results;
+
+    public Edge getResults() {
+        return results;
+    }
+
+    @Override
+    public String toString() {
+        return "EdgeResult{" +
+            "results=" + results +
+            '}';
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/bdcf001f/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/EdgesResult.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/EdgesResult.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/EdgesResult.java
new file mode 100644
index 0000000..6b15cfa
--- /dev/null
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/EdgesResult.java
@@ -0,0 +1,53 @@
+/**
+ * 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.response.lineage;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class EdgesResult extends GraphResult {
+    List<Edge> results;
+
+    public List<Edge> getResults() {
+        return results;
+    }
+
+    @Override
+    public String toString() {
+        return "AllEdges{" +
+            "totalSize=" + totalSize +
+            ", results=" + results +
+            '}';
+    }
+
+    public List<Edge> filterByType(Edge.LEBEL_TYPE edgeLabel) {
+        return filterEdgesByType(results, edgeLabel);
+    }
+
+    public List<Edge> filterEdgesByType(List<Edge> edges, Edge.LEBEL_TYPE edgeLabel) {
+        final List<Edge> result = new ArrayList<Edge>();
+        for (Edge edge : edges) {
+            if(edge.get_label() == edgeLabel) {
+                result.add(edge);
+            }
+        }
+        return result;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/bdcf001f/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/GraphEntity.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/GraphEntity.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/GraphEntity.java
new file mode 100644
index 0000000..2bef659
--- /dev/null
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/GraphEntity.java
@@ -0,0 +1,28 @@
+/**
+ * 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.response.lineage;
+
+public abstract class GraphEntity {
+    NODE_TYPE _type;
+
+    public NODE_TYPE get_type() {
+        return _type;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/bdcf001f/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/GraphResult.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/GraphResult.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/GraphResult.java
new file mode 100644
index 0000000..ac8ed77
--- /dev/null
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/GraphResult.java
@@ -0,0 +1,31 @@
+/**
+ * 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.response.lineage;
+
+import java.util.List;
+
+public abstract class GraphResult {
+    int totalSize;
+
+    public int getTotalSize() {
+        return totalSize;
+    }
+
+    public abstract List<?> getResults();
+}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/bdcf001f/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/NODE_TYPE.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/NODE_TYPE.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/NODE_TYPE.java
new file mode 100644
index 0000000..c315bd4
--- /dev/null
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/NODE_TYPE.java
@@ -0,0 +1,26 @@
+/**
+ * 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.response.lineage;
+
+import com.google.gson.annotations.SerializedName;
+
+public enum NODE_TYPE {
+    @SerializedName("vertex")VERTEX,
+    @SerializedName("edge")EDGE,
+}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/bdcf001f/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Vertex.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Vertex.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Vertex.java
new file mode 100644
index 0000000..d2690ae
--- /dev/null
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/Vertex.java
@@ -0,0 +1,159 @@
+/**
+ * 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.response.lineage;
+
+import com.google.gson.annotations.SerializedName;
+
+public class Vertex extends GraphEntity {
+
+    public static enum FilterKey {
+        name, type, timestamp, version,
+        userWorkflowEngine, userWorkflowName, userWorkflowVersion,
+        workflowId, runId, status, workflowEngineUrl, subflowId,
+    }
+
+    public static enum VERTEX_TYPE {
+        @SerializedName("cluster-entity")CLUSTER_ENTITY("cluster-entity"),
+        @SerializedName("feed-entity")FEED_ENTITY("feed-entity"),
+        @SerializedName("process-entity")PROCESS_ENTITY("process-entity"),
+
+        @SerializedName("feed-instance")FEED_INSTANCE("feed-instance"),
+        @SerializedName("process-instance")PROCESS_INSTANCE("process-instance"),
+
+        @SerializedName("user")USER("user"),
+        @SerializedName("data-center")COLO("data-center"),
+        @SerializedName("classification")TAGS("classification"),
+        @SerializedName("group")GROUPS("group"),;
+
+        private final String value;
+        VERTEX_TYPE(String value) {
+            this.value = value;
+        }
+
+        public String getValue() {
+            return value;
+        }
+    }
+
+    int _id;
+    String name;
+    VERTEX_TYPE type;
+    String timestamp;
+    String version;
+
+    String userWorkflowEngine;
+    String userWorkflowName;
+    String userWorkflowVersion;
+
+    String workflowId;
+    String runId;
+    String status;
+    String workflowEngineUrl;
+    String subflowId;
+
+    public int get_id() {
+        return _id;
+    }
+
+    public String getTimestamp() {
+        return timestamp;
+    }
+
+    public VERTEX_TYPE getType() {
+        return type;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getNominalTime() {
+        return name.split("/")[1];
+    }
+
+    @Override
+    public String toString() {
+        return "Vertex{" +
+            "_id=" + _id +
+            ", _type=" + _type +
+            ", name='" + name + '\'' +
+            ", type=" + type +
+            ", timestamp='" + timestamp + '\'' +
+            ", version='" + version + '\'' +
+            ", userWorkflowEngine='" + userWorkflowEngine + '\'' +
+            ", userWorkflowName='" + userWorkflowName + '\'' +
+            ", userWorkflowVersion='" + userWorkflowVersion + '\'' +
+            ", workflowId='" + workflowId + '\'' +
+            ", runId='" + runId + '\'' +
+            ", status='" + status + '\'' +
+            ", workflowEngineUrl='" + workflowEngineUrl + '\'' +
+            ", subflowId='" + subflowId + '\'' +
+            '}';
+    }
+
+    @Override
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof Vertex)) return false;
+
+        Vertex vertex = (Vertex) o;
+
+        if (_id != vertex._id) return false;
+        if (!name.equals(vertex.name)) return false;
+        if (runId != null ? !runId.equals(vertex.runId) : vertex.runId != null) return false;
+        if (status != null ? !status.equals(vertex.status) : vertex.status != null) return false;
+        if (subflowId != null ? !subflowId.equals(vertex.subflowId) : vertex.subflowId != null)
+            return false;
+        if (!timestamp.equals(vertex.timestamp)) return false;
+        if (type != vertex.type) return false;
+        if (userWorkflowEngine != null ? !userWorkflowEngine.equals(vertex.userWorkflowEngine) :
+            vertex.userWorkflowEngine != null) return false;
+        if (userWorkflowName != null ? !userWorkflowName.equals(vertex.userWorkflowName) :
+            vertex.userWorkflowName != null) return false;
+        if (userWorkflowVersion != null ? !userWorkflowVersion.equals(vertex.userWorkflowVersion) :
+            vertex.userWorkflowVersion != null) return false;
+        if (version != null ? !version.equals(vertex.version) : vertex.version != null)
+            return false;
+        if (workflowEngineUrl != null ? !workflowEngineUrl.equals(vertex.workflowEngineUrl) :
+            vertex.workflowEngineUrl != null) return false;
+        if (workflowId != null ? !workflowId.equals(vertex.workflowId) : vertex.workflowId != null)
+            return false;
+
+        return true;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = _id;
+        result = 31 * result + name.hashCode();
+        result = 31 * result + type.hashCode();
+        result = 31 * result + timestamp.hashCode();
+        result = 31 * result + (version != null ? version.hashCode() : 0);
+        result = 31 * result + (userWorkflowEngine != null ? userWorkflowEngine.hashCode() : 0);
+        result = 31 * result + (userWorkflowName != null ? userWorkflowName.hashCode() : 0);
+        result = 31 * result + (userWorkflowVersion != null ? userWorkflowVersion.hashCode() : 0);
+        result = 31 * result + (workflowId != null ? workflowId.hashCode() : 0);
+        result = 31 * result + (runId != null ? runId.hashCode() : 0);
+        result = 31 * result + (status != null ? status.hashCode() : 0);
+        result = 31 * result + (workflowEngineUrl != null ? workflowEngineUrl.hashCode() : 0);
+        result = 31 * result + (subflowId != null ? subflowId.hashCode() : 0);
+        return result;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/bdcf001f/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/VertexIdsResult.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/VertexIdsResult.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/VertexIdsResult.java
new file mode 100644
index 0000000..8f77b5e
--- /dev/null
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/VertexIdsResult.java
@@ -0,0 +1,37 @@
+/**
+ * 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.response.lineage;
+
+import java.util.List;
+
+public class VertexIdsResult extends GraphResult {
+    List<Integer> results;
+
+    public List<Integer> getResults() {
+        return results;
+    }
+
+    @Override
+    public String toString() {
+        return "AllVertices{" +
+            "totalSize=" + totalSize +
+            ", results=" + results +
+            '}';
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/bdcf001f/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/VertexResult.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/VertexResult.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/VertexResult.java
new file mode 100644
index 0000000..01954f0
--- /dev/null
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/response/lineage/VertexResult.java
@@ -0,0 +1,27 @@
+/**
+ * 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.response.lineage;
+
+public class VertexResult {
+    Vertex results;
+
+    public Vertex getResults() {
+        return results;
+    }
+}


Mime
View raw message