falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From venkat...@apache.org
Subject [06/13] FALCON-95 Enable embedding hive scripts directly in a process. Contribtued by Venkatesh Seetharam
Date Fri, 01 Nov 2013 23:42:07 GMT
http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/502990c9/webapp/src/test/java/org/apache/falcon/resource/PigProcessForTableStorageIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/resource/PigProcessForTableStorageIT.java b/webapp/src/test/java/org/apache/falcon/resource/PigProcessForTableStorageIT.java
deleted file mode 100644
index 1fbc815..0000000
--- a/webapp/src/test/java/org/apache/falcon/resource/PigProcessForTableStorageIT.java
+++ /dev/null
@@ -1,156 +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.resource;
-
-import org.apache.falcon.entity.ClusterHelper;
-import org.apache.falcon.entity.v0.cluster.Cluster;
-import org.apache.falcon.entity.v0.cluster.Interfacetype;
-import org.apache.falcon.util.HiveTestUtils;
-import org.apache.falcon.util.OozieTestUtils;
-import org.apache.falcon.util.StartupProperties;
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.Path;
-import org.apache.hcatalog.api.HCatPartition;
-import org.apache.oozie.client.OozieClient;
-import org.apache.oozie.client.WorkflowJob;
-import org.testng.Assert;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import javax.ws.rs.core.MediaType;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Integration tests for Pig Processing Engine.
- *
- * This test is disabled as it heavily depends on oozie sharelibs for
- * pig and hcatalog being made available on HDFS. captured in FALCON-139.
- */
-@Test (enabled = false)
-public class PigProcessForTableStorageIT {
-
-    private static final String DATABASE_NAME = "falcon_db";
-    private static final String IN_TABLE_NAME = "input_table";
-    private static final String OUT_TABLE_NAME = "output_table";
-    private static final String PARTITION_VALUE = "2012-04-21-00"; // ${YEAR}-${MONTH}-${DAY}-${HOUR}
-    private static final String CLUSTER_TEMPLATE = "/table/primary-cluster.xml";
-
-    private final TestContext context = new TestContext();
-    private Map<String, String> overlay;
-    private String metastoreUrl;
-
-    @BeforeClass
-    public void prepare() throws Exception {
-        TestContext.prepare();
-
-        overlay = context.getUniqueOverlay();
-        String filePath = context.overlayParametersOverTemplate(CLUSTER_TEMPLATE, overlay);
-        context.setCluster(filePath);
-
-        final Cluster cluster = context.getCluster().getCluster();
-        String storageUrl = ClusterHelper.getStorageUrl(cluster);
-        metastoreUrl = ClusterHelper.getInterface(cluster, Interfacetype.REGISTRY).getEndpoint();
-        copyScriptsToHDFS(storageUrl);
-        setupHiveMetastore(storageUrl);
-
-        // set up kahadb to be sent as part of workflows
-        StartupProperties.get().setProperty("libext.paths", "./target/libext");
-        String libext = ClusterHelper.getLocation(cluster, "working") + "/libext";
-        TestContext.copyOozieShareLibsToHDFS("./target/libext", storageUrl + libext);
-    }
-
-    private void copyScriptsToHDFS(String storageUrl) throws IOException {
-        // copyPigScriptToHDFS
-        TestContext.copyResourceToHDFS(
-                "/apps/pig/table-id.pig", "table-id.pig", storageUrl + "/falcon/test/apps/pig");
-        // copyTestDataToHDFS
-        TestContext.copyResourceToHDFS(
-                "/apps/pig/data.txt", "data.txt", storageUrl + "/falcon/test/input/" + PARTITION_VALUE);
-    }
-
-    private void setupHiveMetastore(String storageUrl) throws Exception {
-        HiveTestUtils.dropTable(metastoreUrl, DATABASE_NAME, IN_TABLE_NAME);
-        HiveTestUtils.dropTable(metastoreUrl, DATABASE_NAME, OUT_TABLE_NAME);
-        HiveTestUtils.dropDatabase(metastoreUrl, DATABASE_NAME);
-
-        HiveTestUtils.createDatabase(metastoreUrl, DATABASE_NAME);
-        final List<String> partitionKeys = Arrays.asList("ds");
-        HiveTestUtils.createTable(metastoreUrl, DATABASE_NAME, IN_TABLE_NAME, partitionKeys);
-        final String sourcePath = storageUrl + "/falcon/test/input/" + PARTITION_VALUE;
-        HiveTestUtils.loadData(metastoreUrl, DATABASE_NAME, IN_TABLE_NAME, sourcePath, PARTITION_VALUE);
-        HiveTestUtils.createTable(metastoreUrl, DATABASE_NAME, OUT_TABLE_NAME, partitionKeys);
-    }
-
-    @AfterClass
-    public void tearDown() throws Exception {
-        HiveTestUtils.dropTable(metastoreUrl, DATABASE_NAME, OUT_TABLE_NAME);
-        HiveTestUtils.dropTable(metastoreUrl, DATABASE_NAME, IN_TABLE_NAME);
-        HiveTestUtils.dropDatabase(metastoreUrl, DATABASE_NAME);
-
-        cleanupFS(context.getCluster().getCluster());
-    }
-
-    private void cleanupFS(Cluster cluster) throws IOException {
-        FileSystem fs = FileSystem.get(ClusterHelper.getConfiguration(cluster));
-        fs.delete(new Path("/falcon/test/input/" + PARTITION_VALUE), true);
-    }
-
-    @Test (enabled = false)
-    public void testSubmitAndSchedulePigProcessForTableStorage() throws Exception {
-        overlay.put("cluster", "primary-cluster");
-
-        String filePath = context.overlayParametersOverTemplate(CLUSTER_TEMPLATE, overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submit -type cluster -file " + filePath));
-
-        filePath = context.overlayParametersOverTemplate("/table/table-feed-input.xml", overlay);
-        Assert.assertEquals(0,
-                TestContext.executeWithURL("entity -submitAndSchedule -type feed -file " + filePath));
-
-        filePath = context.overlayParametersOverTemplate("/table/table-feed-output.xml", overlay);
-        Assert.assertEquals(0,
-                TestContext.executeWithURL("entity -submitAndSchedule -type feed -file " + filePath));
-
-        final String pigProcessName = "pig-tables-" + context.getProcessName();
-        overlay.put("processName", pigProcessName);
-
-        filePath = context.overlayParametersOverTemplate("/table/pig-process-tables.xml", overlay);
-        Assert.assertEquals(0,
-                TestContext.executeWithURL("entity -submitAndSchedule -type process -file " + filePath));
-
-        WorkflowJob jobInfo = OozieTestUtils.getWorkflowJob(context.getCluster().getCluster(),
-                OozieClient.FILTER_NAME + "=FALCON_PROCESS_DEFAULT_" + pigProcessName);
-        Assert.assertEquals(WorkflowJob.Status.SUCCEEDED, jobInfo.getStatus());
-
-        HCatPartition partition = HiveTestUtils.getPartition(
-                metastoreUrl, DATABASE_NAME, OUT_TABLE_NAME, "ds", PARTITION_VALUE);
-        Assert.assertTrue(partition != null);
-
-        InstancesResult response = context.service.path("api/instance/running/process/" + pigProcessName)
-                .header("Remote-User", "guest")
-                .accept(MediaType.APPLICATION_JSON)
-                .get(InstancesResult.class);
-        Assert.assertEquals(APIResult.Status.SUCCEEDED, response.getStatus());
-
-        TestContext.executeWithURL("entity -delete -type process -name " + pigProcessName);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/502990c9/webapp/src/test/java/org/apache/falcon/resource/PigProcessIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/resource/PigProcessIT.java b/webapp/src/test/java/org/apache/falcon/resource/PigProcessIT.java
deleted file mode 100644
index 1cb5825..0000000
--- a/webapp/src/test/java/org/apache/falcon/resource/PigProcessIT.java
+++ /dev/null
@@ -1,119 +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.resource;
-
-import org.apache.falcon.entity.ClusterHelper;
-import org.testng.Assert;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.Test;
-
-import java.io.IOException;
-import java.util.Map;
-
-/**
- * Integration tests for Pig Processing Engine.
- */
-@Test
-public class PigProcessIT {
-
-    private static final String SHARE_LIB_HDFS_PATH = "/user/oozie/share/lib";
-
-    private final TestContext context = new TestContext();
-    private Map<String, String> overlay;
-
-
-    @BeforeClass
-    public void prepare() throws Exception {
-        TestContext.prepare();
-
-        overlay = context.getUniqueOverlay();
-
-        String filePath = context.overlayParametersOverTemplate(TestContext.CLUSTER_TEMPLATE, overlay);
-        context.setCluster(filePath);
-
-        String storageUrl = ClusterHelper.getStorageUrl(context.getCluster().getCluster());
-        System.out.println("nn = " + storageUrl);
-        TestContext.copyOozieShareLibsToHDFS("./target/sharelib", storageUrl + SHARE_LIB_HDFS_PATH);
-
-        // copyPigScriptToHDFS
-        TestContext.copyResourceToHDFS(
-                "/apps/pig/id.pig", "id.pig", storageUrl + "/falcon/test/apps/pig");
-        // copyTestDataToHDFS
-        TestContext.copyResourceToHDFS(
-                "/apps/pig/data.txt", "data.txt", storageUrl + "/falcon/test/input/2012/04/21/00");
-    }
-
-    @AfterClass
-    public void tearDown() throws IOException {
-        TestContext.deleteOozieShareLibsFromHDFS(SHARE_LIB_HDFS_PATH);
-    }
-
-    @Test
-    public void testSubmitAndSchedulePigProcess() throws Exception {
-
-        Thread.sleep(5000);
-
-        String filePath = context.overlayParametersOverTemplate(TestContext.CLUSTER_TEMPLATE, overlay);
-        Assert.assertEquals(0, TestContext.executeWithURL("entity -submit -type cluster -file " + filePath));
-        // context.setCluster(filePath);
-
-        filePath = context.overlayParametersOverTemplate(TestContext.FEED_TEMPLATE1, overlay);
-        Assert.assertEquals(0,
-                TestContext.executeWithURL("entity -submitAndSchedule -type feed -file " + filePath));
-
-        filePath = context.overlayParametersOverTemplate(TestContext.FEED_TEMPLATE2, overlay);
-        Assert.assertEquals(0,
-                TestContext.executeWithURL("entity -submitAndSchedule -type feed -file " + filePath));
-
-        filePath = context.overlayParametersOverTemplate(TestContext.FEED_TEMPLATE1, overlay);
-        Assert.assertEquals(0,
-                TestContext.executeWithURL("entity -submit -type feed -file " + filePath));
-
-        filePath = context.overlayParametersOverTemplate(TestContext.FEED_TEMPLATE2, overlay);
-        Assert.assertEquals(0,
-                TestContext.executeWithURL("entity -submit -type feed -file " + filePath));
-
-        final String pigProcessName = "pig-" + context.getProcessName();
-        overlay.put("processName", pigProcessName);
-
-        filePath = context.overlayParametersOverTemplate(TestContext.PIG_PROCESS_TEMPLATE, overlay);
-        Assert.assertEquals(0,
-                TestContext.executeWithURL("entity -submitAndSchedule -type process -file " + filePath));
-
-/*
-        WorkflowJob jobInfo = context.getWorkflowJob(
-                OozieClient.FILTER_NAME + "=FALCON_PROCESS_DEFAULT_" + pigProcessName);
-        Assert.assertEquals(WorkflowJob.Status.SUCCEEDED, jobInfo.getStatus());
-
-        InstancesResult response = context.service.path("api/instance/running/process/" + pigProcessName)
-                .header("Remote-User", "guest").accept(MediaType.APPLICATION_JSON).get(InstancesResult.class);
-        org.testng.Assert.assertEquals(APIResult.Status.SUCCEEDED, response.getStatus());
-        org.testng.Assert.assertNotNull(response.getInstances());
-        org.testng.Assert.assertEquals(1, response.getInstances().length);
-
-        // verify LogMover
-        Path oozieLogPath = context.getOozieLogPath(jobInfo);
-        System.out.println("oozieLogPath = " + oozieLogPath);
-        Assert.assertTrue(context.getCluster().getFileSystem().exists(oozieLogPath));
-*/
-
-        TestContext.executeWithURL("entity -delete -type process -name " + pigProcessName);
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/502990c9/webapp/src/test/java/org/apache/falcon/resource/TestContext.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/resource/TestContext.java b/webapp/src/test/java/org/apache/falcon/resource/TestContext.java
index 3d22207..f246948 100644
--- a/webapp/src/test/java/org/apache/falcon/resource/TestContext.java
+++ b/webapp/src/test/java/org/apache/falcon/resource/TestContext.java
@@ -23,7 +23,6 @@ import com.sun.jersey.api.client.ClientResponse;
 import com.sun.jersey.api.client.WebResource;
 import com.sun.jersey.api.client.config.ClientConfig;
 import com.sun.jersey.api.client.config.DefaultClientConfig;
-import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.RandomStringUtils;
 import org.apache.falcon.FalconException;
 import org.apache.falcon.cli.FalconCLI;
@@ -36,7 +35,6 @@ import org.apache.falcon.entity.v0.cluster.Cluster;
 import org.apache.falcon.entity.v0.feed.Feed;
 import org.apache.falcon.util.StartupProperties;
 import org.apache.falcon.workflow.engine.OozieClientFactory;
-import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.permission.FsPermission;
@@ -58,7 +56,6 @@ import javax.xml.bind.Marshaller;
 import javax.xml.bind.Unmarshaller;
 import java.io.BufferedReader;
 import java.io.File;
-import java.io.FileFilter;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.FileReader;
@@ -413,13 +410,16 @@ public class TestContext {
     }
 
     public static void prepare() throws Exception {
+        prepare(TestContext.CLUSTER_TEMPLATE);
+    }
+
+    public static void prepare(String clusterTemplate) throws Exception {
 
         Map<String, String> overlay = new HashMap<String, String>();
         overlay.put("cluster", RandomStringUtils.randomAlphabetic(5));
         overlay.put("colo", "gs");
         TestContext context = new TestContext();
-        String file = context.
-                overlayParametersOverTemplate(TestContext.CLUSTER_TEMPLATE, overlay);
+        String file = context.overlayParametersOverTemplate(clusterTemplate, overlay);
         EmbeddedCluster cluster = StandAloneCluster.newCluster(file);
 
         cleanupStore();
@@ -432,7 +432,8 @@ public class TestContext {
         fs.delete(wfParent, true);
         Path wfPath = new Path(wfParent, "workflow");
         fs.mkdirs(wfPath);
-        fs.copyFromLocalFile(false, true, new Path(TestContext.class.getResource("/fs-workflow.xml").getPath()),
+        fs.copyFromLocalFile(false, true,
+                new Path(TestContext.class.getResource("/fs-workflow.xml").getPath()),
                 new Path(wfPath, "workflow.xml"));
         fs.mkdirs(new Path(wfParent, "input/2012/04/20/00"));
         Path outPath = new Path(wfParent, "output");
@@ -448,73 +449,6 @@ public class TestContext {
         }
     }
 
-    public static void copyOozieShareLibsToHDFS(String shareLibLocalPath, String shareLibHdfsPath)
-        throws IOException {
-        File shareLibDir = new File(shareLibLocalPath);
-        if (!shareLibDir.exists()) {
-            throw new IllegalArgumentException("Sharelibs dir must exist for tests to run.");
-        }
-
-        File[] jarFiles = shareLibDir.listFiles(new FileFilter() {
-            @Override
-            public boolean accept(File file) {
-                return file.isFile() && file.getName().endsWith(".jar");
-            }
-        });
-
-        for (File jarFile : jarFiles) {
-            copyFileToHDFS(jarFile, shareLibHdfsPath);
-        }
-    }
-
-    public static void copyFileToHDFS(File jarFile, String shareLibHdfsPath) throws IOException {
-        System.out.println("Copying jarFile = " + jarFile);
-        Path shareLibPath = new Path(shareLibHdfsPath);
-        FileSystem fs = shareLibPath.getFileSystem(new Configuration());
-        if (!fs.exists(shareLibPath)) {
-            fs.mkdirs(shareLibPath);
-        }
-
-        OutputStream os = null;
-        InputStream is = null;
-        try {
-            os = fs.create(new Path(shareLibPath, jarFile.getName()));
-            is = new FileInputStream(jarFile);
-            IOUtils.copy(is, os);
-        } finally {
-            IOUtils.closeQuietly(is);
-            IOUtils.closeQuietly(os);
-        }
-    }
-
-    public static void copyResourceToHDFS(String localResource, String resourceName, String hdfsPath)
-        throws IOException {
-        Path appPath = new Path(hdfsPath);
-        FileSystem fs = appPath.getFileSystem(new Configuration());
-        if (!fs.exists(appPath)) {
-            fs.mkdirs(appPath);
-        }
-
-        OutputStream os = null;
-        InputStream is = null;
-        try {
-            os = fs.create(new Path(appPath, resourceName));
-            is = TestContext.class.getResourceAsStream(localResource);
-            IOUtils.copy(is, os);
-        } finally {
-            IOUtils.closeQuietly(is);
-            IOUtils.closeQuietly(os);
-        }
-    }
-
-    public static void deleteOozieShareLibsFromHDFS(String shareLibHdfsPath) throws IOException {
-        Path shareLibPath = new Path(shareLibHdfsPath);
-        FileSystem fs = shareLibPath.getFileSystem(new Configuration());
-        if (fs.exists(shareLibPath)) {
-            fs.delete(shareLibPath, true);
-        }
-    }
-
     public static int executeWithURL(String command) throws Exception {
         return new FalconCLI().run((command + " -url " + TestContext.BASE_URL).split("\\s+"));
     }

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/502990c9/webapp/src/test/java/org/apache/falcon/util/FSUtils.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/util/FSUtils.java b/webapp/src/test/java/org/apache/falcon/util/FSUtils.java
new file mode 100644
index 0000000..2db659d
--- /dev/null
+++ b/webapp/src/test/java/org/apache/falcon/util/FSUtils.java
@@ -0,0 +1,101 @@
+/**
+ * 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.util;
+
+
+import org.apache.commons.io.IOUtils;
+import org.apache.falcon.resource.TestContext;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+/**
+ * File System Utility class for integration-tests.
+ */
+public final class FSUtils {
+
+    private FSUtils() {
+    }
+
+    public static void copyOozieShareLibsToHDFS(String shareLibLocalPath, String shareLibHdfsPath)
+        throws IOException {
+        File shareLibDir = new File(shareLibLocalPath);
+        if (!shareLibDir.exists()) {
+            throw new IllegalArgumentException("Sharelibs dir must exist for tests to run.");
+        }
+
+        File[] jarFiles = shareLibDir.listFiles(new FileFilter() {
+            @Override
+            public boolean accept(File file) {
+                return file.isFile() && file.getName().endsWith(".jar");
+            }
+        });
+
+        for (File jarFile : jarFiles) {
+            copyFileToHDFS(jarFile, shareLibHdfsPath);
+        }
+    }
+
+    public static void copyFileToHDFS(File jarFile, String shareLibHdfsPath) throws IOException {
+        System.out.println("Copying jarFile = " + jarFile);
+        Path shareLibPath = new Path(shareLibHdfsPath);
+        FileSystem fs = shareLibPath.getFileSystem(new Configuration());
+        if (!fs.exists(shareLibPath)) {
+            fs.mkdirs(shareLibPath);
+        }
+
+        OutputStream os = null;
+        InputStream is = null;
+        try {
+            os = fs.create(new Path(shareLibPath, jarFile.getName()));
+            is = new FileInputStream(jarFile);
+            IOUtils.copy(is, os);
+        } finally {
+            IOUtils.closeQuietly(is);
+            IOUtils.closeQuietly(os);
+        }
+    }
+
+    public static void copyResourceToHDFS(String localResource, String resourceName, String hdfsPath)
+        throws IOException {
+        Path appPath = new Path(hdfsPath);
+        FileSystem fs = appPath.getFileSystem(new Configuration());
+        if (!fs.exists(appPath)) {
+            fs.mkdirs(appPath);
+        }
+
+        OutputStream os = null;
+        InputStream is = null;
+        try {
+            os = fs.create(new Path(appPath, resourceName));
+            is = TestContext.class.getResourceAsStream(localResource);
+            IOUtils.copy(is, os);
+        } finally {
+            IOUtils.closeQuietly(is);
+            IOUtils.closeQuietly(os);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/502990c9/webapp/src/test/java/org/apache/falcon/util/HiveTestUtils.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/util/HiveTestUtils.java b/webapp/src/test/java/org/apache/falcon/util/HiveTestUtils.java
index 4cad063..5087e20 100644
--- a/webapp/src/test/java/org/apache/falcon/util/HiveTestUtils.java
+++ b/webapp/src/test/java/org/apache/falcon/util/HiveTestUtils.java
@@ -55,6 +55,21 @@ public final class HiveTestUtils {
         client.dropDatabase(databaseName, true, HCatClient.DropDBMode.CASCADE);
     }
 
+    public static void createTable(String metaStoreUrl, String databaseName,
+                                   String tableName) throws Exception {
+        HCatClient client = HiveCatalogService.get(metaStoreUrl);
+        ArrayList<HCatFieldSchema> cols = new ArrayList<HCatFieldSchema>();
+        cols.add(new HCatFieldSchema("id", HCatFieldSchema.Type.INT, "id comment"));
+        cols.add(new HCatFieldSchema("value", HCatFieldSchema.Type.STRING, "value comment"));
+
+        HCatCreateTableDesc tableDesc = HCatCreateTableDesc
+                .create(databaseName, tableName, cols)
+                .ifNotExists(true)
+                .comments("falcon integration test")
+                .build();
+        client.createTable(tableDesc);
+    }
+
     public static void createTable(String metaStoreUrl, String databaseName, String tableName,
                                    List<String> partitionKeys) throws Exception {
         HCatClient client = HiveCatalogService.get(metaStoreUrl);
@@ -118,17 +133,16 @@ public final class HiveTestUtils {
 
     public static void loadData(String metaStoreUrl, String databaseName, String tableName,
                                 String path, String partition) throws Exception {
-        StringBuilder alterTableDdl = new StringBuilder();
-        alterTableDdl
-                .append(" load data inpath ")
-                .append(" '").append(path).append("' ")
-                .append(" into table ")
-                .append(tableName)
-                .append(" partition ").append(" (ds='").append(partition).append("') ");
+        StringBuilder ddl = new StringBuilder();
+        ddl.append(" load data inpath ")
+            .append(" '").append(path).append("' ")
+            .append(" into table ")
+            .append(tableName)
+            .append(" partition ").append(" (ds='").append(partition).append("') ");
 
         startSessionState(metaStoreUrl);
         execHiveDDL("use " + databaseName);
-        execHiveDDL(alterTableDdl.toString());
+        execHiveDDL(ddl.toString());
     }
 
     public static void dropTable(String metaStoreUrl, String databaseName,

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/502990c9/webapp/src/test/java/org/apache/falcon/validation/ClusterEntityValidationIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/validation/ClusterEntityValidationIT.java b/webapp/src/test/java/org/apache/falcon/validation/ClusterEntityValidationIT.java
new file mode 100644
index 0000000..9299b5b
--- /dev/null
+++ b/webapp/src/test/java/org/apache/falcon/validation/ClusterEntityValidationIT.java
@@ -0,0 +1,104 @@
+/**
+ * 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.validation;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.util.Map;
+
+import org.apache.falcon.entity.ClusterHelper;
+import org.apache.falcon.entity.v0.EntityType;
+import org.apache.falcon.entity.v0.cluster.Cluster;
+import org.apache.falcon.entity.v0.cluster.Interface;
+import org.apache.falcon.entity.v0.cluster.Interfacetype;
+import org.apache.falcon.resource.TestContext;
+import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import com.sun.jersey.api.client.ClientResponse;
+
+/**
+ * Tests cluster entity validation to verify if each of the specified
+ * interface endpoints are valid.
+ */
+public class ClusterEntityValidationIT {
+    private final TestContext context = new TestContext();
+    private Map<String, String> overlay;
+
+
+    @BeforeClass
+    public void setup() throws Exception {
+        TestContext.prepare();
+    }
+
+    /**
+     * Positive test.
+     *
+     * @throws Exception
+     */
+    @Test
+    public void testClusterEntityWithValidInterfaces() throws Exception {
+        overlay = context.getUniqueOverlay();
+        overlay.put("colo", "default");
+        ClientResponse response = context.submitToFalcon(TestContext.CLUSTER_TEMPLATE, overlay, EntityType.CLUSTER);
+        context.assertSuccessful(response);
+    }
+
+
+    @DataProvider(name = "interfaceToInvalidURLs")
+    public Object[][] createInterfaceToInvalidURLData() {
+        return new Object[][] {
+            // TODO FileSystem validates invalid hftp url, does NOT fail
+            // {Interfacetype.READONLY, "hftp://localhost:41119"},
+            {Interfacetype.READONLY, ""},
+            {Interfacetype.READONLY, "localhost:41119"},
+            {Interfacetype.WRITE, "write-interface:9999"},
+            {Interfacetype.WRITE, "hdfs://write-interface:9999"},
+            {Interfacetype.EXECUTE, "execute-interface:9999"},
+            {Interfacetype.WORKFLOW, "workflow-interface:9999/oozie/"},
+            {Interfacetype.WORKFLOW, "http://workflow-interface:9999/oozie/"},
+            {Interfacetype.MESSAGING, "messaging-interface:9999"},
+            {Interfacetype.MESSAGING, "tcp://messaging-interface:9999"},
+            {Interfacetype.REGISTRY, "catalog-interface:9999"},
+            {Interfacetype.REGISTRY, "http://catalog-interface:9999"},
+        };
+    }
+
+    @Test (dataProvider = "interfaceToInvalidURLs")
+    public void testClusterEntityWithInvalidInterfaces(Interfacetype interfacetype, String endpoint)
+        throws Exception {
+        overlay = context.getUniqueOverlay();
+        String filePath = context.overlayParametersOverTemplate(TestContext.CLUSTER_TEMPLATE, overlay);
+        InputStream stream = new FileInputStream(filePath);
+        Cluster cluster = (Cluster) EntityType.CLUSTER.getUnmarshaller().unmarshal(stream);
+        Assert.assertNotNull(cluster);
+        cluster.setColo("default");  // validations will be ignored if not default & tests fail
+
+        Interface anInterface = ClusterHelper.getInterface(cluster, interfacetype);
+        anInterface.setEndpoint(endpoint);
+
+        File tmpFile = context.getTempFile();
+        EntityType.CLUSTER.getMarshaller().marshal(cluster, tmpFile);
+        ClientResponse response = context.submitFileToFalcon(EntityType.CLUSTER, tmpFile.getAbsolutePath());
+        context.assertFailure(response);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/502990c9/webapp/src/test/java/org/apache/falcon/validation/FeedEntityValidationIT.java
----------------------------------------------------------------------
diff --git a/webapp/src/test/java/org/apache/falcon/validation/FeedEntityValidationIT.java b/webapp/src/test/java/org/apache/falcon/validation/FeedEntityValidationIT.java
new file mode 100644
index 0000000..db24b9a
--- /dev/null
+++ b/webapp/src/test/java/org/apache/falcon/validation/FeedEntityValidationIT.java
@@ -0,0 +1,145 @@
+/**
+ * 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.validation;
+
+import com.sun.jersey.api.client.ClientResponse;
+import org.apache.falcon.FalconException;
+import org.apache.falcon.entity.parser.EntityParserFactory;
+import org.apache.falcon.entity.parser.FeedEntityParser;
+import org.apache.falcon.entity.v0.EntityType;
+import org.apache.falcon.entity.v0.Frequency;
+import org.apache.falcon.entity.v0.feed.Feed;
+import org.apache.falcon.entity.v0.feed.LateArrival;
+import org.apache.falcon.resource.TestContext;
+import org.apache.falcon.util.HiveTestUtils;
+import org.testng.Assert;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+import javax.xml.bind.Marshaller;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.util.Map;
+
+/**
+ * Tests feed entity validation to verify if the table specified is valid.
+ */
+public class FeedEntityValidationIT {
+
+    private static final String METASTORE_URL = "thrift://localhost:49083";
+    private static final String DATABASE_NAME = "falcondb";
+    private static final String TABLE_NAME = "clicks";
+    private static final String TABLE_URI =
+            "catalog:" + DATABASE_NAME + ":" + TABLE_NAME + "#ds=${YEAR}-${MONTH}-${DAY}-${HOUR}";
+
+    private final TestContext context = new TestContext();
+
+    @BeforeClass
+    public void setup() throws Exception {
+        TestContext.prepare();
+
+        HiveTestUtils.createDatabase(METASTORE_URL, DATABASE_NAME);
+        HiveTestUtils.createTable(METASTORE_URL, DATABASE_NAME, TABLE_NAME);
+    }
+
+    @AfterClass
+    public void tearDown() throws Exception {
+        HiveTestUtils.dropTable(METASTORE_URL, DATABASE_NAME, TABLE_NAME);
+        HiveTestUtils.dropDatabase(METASTORE_URL, DATABASE_NAME);
+    }
+
+    /**
+     * Positive test.
+     *
+     * @throws Exception
+     */
+    @Test
+    public void testFeedEntityWithValidTable() throws Exception {
+        Map<String, String> overlay = context.getUniqueOverlay();
+        overlay.put("colo", "default");
+
+        ClientResponse response = context.submitToFalcon(TestContext.CLUSTER_TEMPLATE, overlay, EntityType.CLUSTER);
+        context.assertSuccessful(response);
+
+        // submission will parse and validate the feed with table
+        overlay.put("tableUri", TABLE_URI);
+        response = context.submitToFalcon("/hive-table-feed.xml", overlay, EntityType.FEED);
+        context.assertSuccessful(response);
+    }
+
+    /**
+     * Late data handling test.
+     *
+     * @throws Exception
+     */
+    @Test (expectedExceptions = FalconException.class)
+    public void testFeedEntityWithValidTableAndLateArrival() throws Exception {
+        Map<String, String> overlay = context.getUniqueOverlay();
+        overlay.put("colo", "default"); // validations will be ignored if not default & tests fail
+        overlay.put("tableUri", TABLE_URI);
+
+        String filePath = context.overlayParametersOverTemplate("/hive-table-feed.xml", overlay);
+        InputStream stream = new FileInputStream(filePath);
+        FeedEntityParser parser = (FeedEntityParser) EntityParserFactory.getParser(EntityType.FEED);
+        Feed feed = parser.parse(stream);
+        Assert.assertNotNull(feed);
+
+        final LateArrival lateArrival = new LateArrival();
+        lateArrival.setCutOff(new Frequency("4", Frequency.TimeUnit.hours));
+        feed.setLateArrival(lateArrival);
+
+        StringWriter stringWriter = new StringWriter();
+        Marshaller marshaller = EntityType.FEED.getMarshaller();
+        marshaller.marshal(feed, stringWriter);
+        System.out.println(stringWriter.toString());
+        parser.parseAndValidate(stringWriter.toString());
+    }
+
+    @DataProvider(name = "invalidTableUris")
+    public Object[][] createInvalidTableUriData() {
+        return new Object[][] {
+            // does not match with group input's frequency
+            {"catalog:" + DATABASE_NAME + ":" + TABLE_NAME + "#ds=ds=${YEAR}-${MONTH}-${DAY}", ""},
+            {"catalog:" + DATABASE_NAME + ":" + TABLE_NAME + "#ds=ds=${YEAR}-${MONTH}-${DAY}", ""},
+            {"badscheme:" + DATABASE_NAME + ":" + TABLE_NAME + "#ds=ds=${YEAR}-${MONTH}-${DAY}", ""},
+            {"catalog:" + DATABASE_NAME + ":" + "badtable" + "#ds=ds=${YEAR}-${MONTH}-${DAY}", ""},
+            {"catalog:" + "baddb" + ":" + TABLE_NAME + "#ds=ds=${YEAR}-${MONTH}-${DAY}", ""},
+            {"catalog:" + "baddb" + ":" + "badtable" + "#ds=ds=${YEAR}-${MONTH}-${DAY}", ""},
+        };
+    }
+
+    @Test (dataProvider = "invalidTableUris")
+    public void testFeedEntityWithInvalidTableUri(String tableUri, @SuppressWarnings("unused") String ignore)
+        throws Exception {
+
+        Map<String, String> overlay = context.getUniqueOverlay();
+        overlay.put("colo", "default");
+
+        ClientResponse response = context.submitToFalcon(TestContext.CLUSTER_TEMPLATE, overlay, EntityType.CLUSTER);
+        context.assertSuccessful(response);
+
+        // submission will parse and validate the feed with table
+        overlay.put("tableUri", tableUri);
+        response = context.submitToFalcon("/hive-table-feed.xml", overlay, EntityType.FEED);
+        context.assertFailure(response);
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/502990c9/webapp/src/test/resources/apps/data/data.txt
----------------------------------------------------------------------
diff --git a/webapp/src/test/resources/apps/data/data.txt b/webapp/src/test/resources/apps/data/data.txt
new file mode 100644
index 0000000..f0ff9e8
--- /dev/null
+++ b/webapp/src/test/resources/apps/data/data.txt
@@ -0,0 +1,1000 @@
+0,238val_238
+1,86val_86
+2,311val_311
+3,27val_27
+4,165val_165
+5,409val_409
+6,255val_255
+7,278val_278
+8,98val_98
+9,484val_484
+10,265val_265
+11,193val_193
+12,401val_401
+13,150val_150
+14,273val_273
+15,224val_224
+17,369val_369
+18,66val_66
+19,128val_128
+20,213val_213
+21,146val_146
+22,406val_406
+23,429val_429
+24,374val_374
+25,152val_152
+26,469val_469
+27,145val_145
+28,495val_495
+29,37val_37
+30,327val_327
+31,281val_281
+32,277val_277
+33,209val_209
+34,15val_15
+35,82val_82
+36,403val_403
+37,166val_166
+38,417val_417
+39,430val_430
+40,252val_252
+41,292val_292
+42,219val_219
+43,287val_287
+44,153val_153
+45,193val_193
+46,338val_338
+47,446val_446
+48,459val_459
+49,394val_394
+50,237val_237
+51,482val_482
+52,174val_174
+53,413val_413
+54,494val_494
+55,207val_207
+56,199val_199
+57,466val_466
+58,208val_208
+59,174val_174
+60,399val_399
+61,396val_396
+62,247val_247
+63,417val_417
+65,489val_489
+66,162val_162
+67,377val_377
+68,397val_397
+69,309val_309
+70,365val_365
+71,266val_266
+72,439val_439
+73,342val_342
+74,367val_367
+75,325val_325
+76,167val_167
+77,195val_195
+78,475val_475
+79,17val_17
+80,113val_113
+81,155val_155
+82,203val_203
+83,339val_339
+84,0val_0
+85,455val_455
+86,128val_128
+87,311val_311
+88,316val_316
+89,57val_57
+90,302val_302
+91,205val_205
+92,149val_149
+93,438val_438
+94,345val_345
+95,129val_129
+96,170val_170
+97,20val_20
+98,489val_489
+99,157val_157
+100,378val_378
+101,221val_221
+102,92val_92
+103,111val_111
+104,47val_47
+105,72val_72
+106,4val_4
+107,280val_280
+108,35val_35
+109,427val_427
+110,277val_277
+111,208val_208
+112,356val_356
+113,399val_399
+114,169val_169
+115,382val_382
+116,498val_498
+117,125val_125
+118,386val_386
+119,437val_437
+120,469val_469
+121,192val_192
+122,286val_286
+123,187val_187
+125,176val_176
+126,54val_54
+127,459val_459
+128,51val_51
+129,138val_138
+130,103val_103
+131,239val_239
+132,213val_213
+133,216val_216
+134,430val_430
+135,278val_278
+136,176val_176
+137,289val_289
+138,221val_221
+139,65val_65
+140,318val_318
+141,332val_332
+142,311val_311
+143,275val_275
+144,137val_137
+145,241val_241
+146,83val_83
+147,333val_333
+148,180val_180
+149,284val_284
+150,12val_12
+151,230val_230
+152,181val_181
+153,67val_67
+154,260val_260
+155,404val_404
+156,384val_384
+157,489val_489
+158,353val_353
+159,373val_373
+160,272val_272
+161,138val_138
+162,217val_217
+163,84val_84
+164,348val_348
+165,466val_466
+166,58val_58
+167,8val_8
+168,411val_411
+170,230val_230
+171,208val_208
+172,348val_348
+173,24val_24
+174,463val_463
+175,431val_431
+176,179val_179
+177,172val_172
+178,42val_42
+179,129val_129
+180,158val_158
+181,119val_119
+182,496val_496
+183,0val_0
+184,322val_322
+185,197val_197
+186,468val_468
+187,393val_393
+188,454val_454
+189,100val_100
+190,298val_298
+191,199val_199
+192,191val_191
+193,418val_418
+194,96val_96
+195,26val_26
+196,165val_165
+197,327val_327
+198,230val_230
+199,205val_205
+200,120val_120
+201,131val_131
+202,51val_51
+203,404val_404
+204,43val_43
+205,436val_436
+206,156val_156
+207,469val_469
+208,468val_468
+209,308val_308
+210,95val_95
+211,196val_196
+212,288val_288
+213,481val_481
+214,457val_457
+215,98val_98
+216,282val_282
+217,197val_197
+218,187val_187
+219,318val_318
+220,318val_318
+221,409val_409
+222,470val_470
+223,137val_137
+224,369val_369
+225,316val_316
+226,169val_169
+227,413val_413
+228,85val_85
+229,77val_77
+230,0val_0
+231,490val_490
+232,87val_87
+233,364val_364
+234,179val_179
+235,118val_118
+236,134val_134
+237,395val_395
+238,282val_282
+239,138val_138
+240,238val_238
+242,419val_419
+243,15val_15
+244,118val_118
+245,72val_72
+246,90val_90
+247,307val_307
+248,19val_19
+249,435val_435
+250,10val_10
+251,277val_277
+252,273val_273
+253,306val_306
+254,224val_224
+255,309val_309
+256,389val_389
+257,327val_327
+258,242val_242
+259,369val_369
+260,392val_392
+261,272val_272
+262,331val_331
+263,401val_401
+264,242val_242
+265,452val_452
+266,177val_177
+267,226val_226
+268,5val_5
+269,497val_497
+270,402val_402
+272,396val_396
+273,317val_317
+274,395val_395
+275,58val_58
+276,35val_35
+277,336val_336
+278,95val_95
+279,11val_11
+280,168val_168
+281,34val_34
+282,229val_229
+283,233val_233
+284,143val_143
+285,472val_472
+286,322val_322
+287,498val_498
+288,160val_160
+289,195val_195
+290,42val_42
+291,321val_321
+292,430val_430
+293,119val_119
+294,489val_489
+295,458val_458
+296,78val_78
+297,76val_76
+298,41val_41
+299,223val_223
+300,492val_492
+301,149val_149
+302,449val_449
+303,218val_218
+304,228val_228
+305,138val_138
+306,453val_453
+307,30val_30
+308,209val_209
+309,64val_64
+310,468val_468
+311,76val_76
+312,74val_74
+313,342val_342
+314,69val_69
+316,230val_230
+317,33val_33
+318,368val_368
+319,103val_103
+320,296val_296
+321,113val_113
+322,216val_216
+323,367val_367
+324,344val_344
+325,167val_167
+326,274val_274
+327,219val_219
+328,239val_239
+329,485val_485
+330,116val_116
+331,223val_223
+332,256val_256
+333,263val_263
+334,70val_70
+335,487val_487
+336,480val_480
+337,401val_401
+338,288val_288
+339,191val_191
+340,5val_5
+341,244val_244
+342,438val_438
+343,128val_128
+344,467val_467
+345,432val_432
+346,202val_202
+347,316val_316
+348,229val_229
+349,469val_469
+350,463val_463
+351,280val_280
+352,2val_2
+353,35val_35
+354,283val_283
+355,331val_331
+356,235val_235
+357,80val_80
+358,44val_44
+359,193val_193
+360,321val_321
+361,335val_335
+362,104val_104
+363,466val_466
+364,366val_366
+365,175val_175
+366,403val_403
+367,483val_483
+369,53val_53
+370,105val_105
+371,257val_257
+372,406val_406
+373,409val_409
+374,190val_190
+375,406val_406
+376,401val_401
+377,114val_114
+378,258val_258
+379,90val_90
+380,203val_203
+381,262val_262
+382,348val_348
+383,424val_424
+384,12val_12
+385,396val_396
+386,201val_201
+387,217val_217
+388,164val_164
+389,431val_431
+390,454val_454
+391,478val_478
+392,298val_298
+393,125val_125
+394,431val_431
+395,164val_164
+396,424val_424
+397,187val_187
+398,382val_382
+399,5val_5
+400,70val_70
+401,397val_397
+402,480val_480
+403,291val_291
+404,24val_24
+405,351val_351
+407,255val_255
+408,104val_104
+409,70val_70
+410,163val_163
+411,438val_438
+412,119val_119
+413,414val_414
+414,200val_200
+415,491val_491
+416,237val_237
+417,439val_439
+418,360val_360
+419,248val_248
+420,479val_479
+421,305val_305
+422,417val_417
+423,199val_199
+424,444val_444
+425,120val_120
+426,429val_429
+427,169val_169
+428,443val_443
+429,323val_323
+430,325val_325
+431,277val_277
+432,230val_230
+433,478val_478
+434,178val_178
+435,468val_468
+436,310val_310
+437,317val_317
+438,333val_333
+439,493val_493
+440,460val_460
+441,207val_207
+442,249val_249
+443,265val_265
+444,480val_480
+445,83val_83
+447,136val_136
+448,353val_353
+449,172val_172
+450,214val_214
+451,462val_462
+452,233val_233
+453,406val_406
+454,133val_133
+455,175val_175
+456,189val_189
+457,454val_454
+458,375val_375
+459,401val_401
+460,421val_421
+461,407val_407
+462,384val_384
+463,256val_256
+464,26val_26
+465,134val_134
+466,67val_67
+467,384val_384
+468,379val_379
+469,18val_18
+470,462val_462
+471,492val_492
+472,100val_100
+473,298val_298
+474,9val_9
+475,341val_341
+476,498val_498
+477,146val_146
+478,458val_458
+479,362val_362
+480,186val_186
+481,285val_285
+483,348val_348
+484,167val_167
+485,18val_18
+486,273val_273
+487,183val_183
+488,281val_281
+489,344val_344
+490,97val_97
+491,469val_469
+492,315val_315
+493,84val_84
+494,28val_28
+495,37val_37
+496,448val_448
+497,152val_152
+498,348val_348
+499,307val_307
+500,194val_194
+501,414val_414
+502,477val_477
+503,222val_222
+504,126val_126
+505,90val_90
+506,169val_169
+507,403val_403
+508,400val_400
+509,200val_200
+511,97val_97
+512,238val_238
+513,86val_86
+514,311val_311
+515,27val_27
+516,165val_165
+517,409val_409
+518,255val_255
+519,278val_278
+520,98val_98
+521,484val_484
+522,265val_265
+523,193val_193
+524,401val_401
+525,150val_150
+526,273val_273
+527,224val_224
+528,369val_369
+529,66val_66
+530,128val_128
+531,213val_213
+532,146val_146
+533,406val_406
+535,429val_429
+536,374val_374
+537,152val_152
+538,469val_469
+539,145val_145
+540,495val_495
+541,37val_37
+542,327val_327
+543,281val_281
+544,277val_277
+545,209val_209
+546,15val_15
+547,82val_82
+548,403val_403
+549,166val_166
+550,417val_417
+551,430val_430
+552,252val_252
+553,292val_292
+554,219val_219
+555,287val_287
+556,153val_153
+557,193val_193
+559,338val_338
+560,446val_446
+561,459val_459
+562,394val_394
+563,237val_237
+564,482val_482
+565,174val_174
+566,413val_413
+567,494val_494
+568,207val_207
+569,199val_199
+570,466val_466
+571,208val_208
+572,174val_174
+573,399val_399
+574,396val_396
+575,247val_247
+576,417val_417
+577,489val_489
+578,162val_162
+579,377val_377
+580,397val_397
+581,309val_309
+582,365val_365
+583,266val_266
+584,439val_439
+585,342val_342
+586,367val_367
+587,325val_325
+588,167val_167
+589,195val_195
+590,475val_475
+591,17val_17
+593,113val_113
+594,155val_155
+595,203val_203
+596,339val_339
+597,0val_0
+598,455val_455
+599,128val_128
+600,311val_311
+601,316val_316
+602,57val_57
+603,302val_302
+604,205val_205
+605,149val_149
+606,438val_438
+607,345val_345
+608,129val_129
+609,170val_170
+610,20val_20
+611,489val_489
+612,157val_157
+613,378val_378
+614,221val_221
+615,92val_92
+616,111val_111
+617,47val_47
+618,72val_72
+619,4val_4
+620,280val_280
+621,35val_35
+622,427val_427
+623,277val_277
+624,208val_208
+625,356val_356
+626,399val_399
+627,169val_169
+628,382val_382
+629,498val_498
+630,125val_125
+631,386val_386
+632,437val_437
+633,469val_469
+634,192val_192
+635,286val_286
+636,187val_187
+637,176val_176
+638,54val_54
+639,459val_459
+640,51val_51
+641,138val_138
+642,103val_103
+643,239val_239
+644,213val_213
+645,216val_216
+646,430val_430
+647,278val_278
+648,176val_176
+649,289val_289
+650,221val_221
+651,65val_65
+652,318val_318
+653,332val_332
+654,311val_311
+655,275val_275
+656,137val_137
+657,241val_241
+658,83val_83
+659,333val_333
+660,180val_180
+661,284val_284
+662,12val_12
+663,230val_230
+664,181val_181
+665,67val_67
+666,260val_260
+667,404val_404
+668,384val_384
+669,489val_489
+670,353val_353
+671,373val_373
+672,272val_272
+673,138val_138
+674,217val_217
+675,84val_84
+676,348val_348
+677,466val_466
+678,58val_58
+679,8val_8
+680,411val_411
+681,230val_230
+682,208val_208
+683,348val_348
+684,24val_24
+685,463val_463
+686,431val_431
+687,179val_179
+688,172val_172
+689,42val_42
+690,129val_129
+691,158val_158
+692,119val_119
+693,496val_496
+694,0val_0
+695,322val_322
+696,197val_197
+697,468val_468
+698,393val_393
+699,454val_454
+700,100val_100
+701,298val_298
+702,199val_199
+703,191val_191
+704,418val_418
+705,96val_96
+706,26val_26
+707,165val_165
+708,327val_327
+709,230val_230
+710,205val_205
+711,120val_120
+712,131val_131
+713,51val_51
+714,404val_404
+715,43val_43
+716,436val_436
+717,156val_156
+718,469val_469
+719,468val_468
+720,308val_308
+721,95val_95
+722,196val_196
+723,288val_288
+724,481val_481
+725,457val_457
+726,98val_98
+727,282val_282
+728,197val_197
+729,187val_187
+730,318val_318
+731,318val_318
+732,409val_409
+733,470val_470
+734,137val_137
+735,369val_369
+736,316val_316
+737,169val_169
+738,413val_413
+739,85val_85
+740,77val_77
+741,0val_0
+742,490val_490
+743,87val_87
+744,364val_364
+745,179val_179
+746,118val_118
+747,134val_134
+748,395val_395
+749,282val_282
+750,138val_138
+751,238val_238
+752,419val_419
+753,15val_15
+754,118val_118
+755,72val_72
+756,90val_90
+757,307val_307
+758,19val_19
+759,435val_435
+760,10val_10
+761,277val_277
+762,273val_273
+763,306val_306
+764,224val_224
+765,309val_309
+766,389val_389
+767,327val_327
+768,242val_242
+769,369val_369
+770,392val_392
+771,272val_272
+772,331val_331
+773,401val_401
+774,242val_242
+775,452val_452
+776,177val_177
+777,226val_226
+778,5val_5
+779,497val_497
+780,402val_402
+781,396val_396
+782,317val_317
+783,395val_395
+784,58val_58
+785,35val_35
+786,336val_336
+787,95val_95
+788,11val_11
+789,168val_168
+790,34val_34
+791,229val_229
+792,233val_233
+793,143val_143
+794,472val_472
+795,322val_322
+796,498val_498
+797,160val_160
+798,195val_195
+799,42val_42
+800,321val_321
+801,430val_430
+802,119val_119
+803,489val_489
+804,458val_458
+805,78val_78
+806,76val_76
+807,41val_41
+808,223val_223
+809,492val_492
+810,149val_149
+811,449val_449
+812,218val_218
+813,228val_228
+814,138val_138
+815,453val_453
+816,30val_30
+817,209val_209
+818,64val_64
+819,468val_468
+820,76val_76
+821,74val_74
+822,342val_342
+823,69val_69
+824,230val_230
+825,33val_33
+826,368val_368
+827,103val_103
+828,296val_296
+829,113val_113
+830,216val_216
+831,367val_367
+832,344val_344
+833,167val_167
+834,274val_274
+835,219val_219
+836,239val_239
+837,485val_485
+838,116val_116
+839,223val_223
+840,256val_256
+841,263val_263
+842,70val_70
+843,487val_487
+844,480val_480
+845,401val_401
+846,288val_288
+847,191val_191
+848,5val_5
+849,244val_244
+850,438val_438
+851,128val_128
+852,467val_467
+853,432val_432
+854,202val_202
+855,316val_316
+856,229val_229
+857,469val_469
+858,463val_463
+859,280val_280
+860,2val_2
+861,35val_35
+862,283val_283
+863,331val_331
+864,235val_235
+865,80val_80
+866,44val_44
+867,193val_193
+868,321val_321
+869,335val_335
+870,104val_104
+871,466val_466
+872,366val_366
+873,175val_175
+874,403val_403
+875,483val_483
+876,53val_53
+877,105val_105
+878,257val_257
+879,406val_406
+880,409val_409
+881,190val_190
+882,406val_406
+883,401val_401
+884,114val_114
+885,258val_258
+886,90val_90
+887,203val_203
+888,262val_262
+889,348val_348
+890,424val_424
+891,12val_12
+892,396val_396
+893,201val_201
+894,217val_217
+895,164val_164
+896,431val_431
+897,454val_454
+898,478val_478
+899,298val_298
+900,125val_125
+901,431val_431
+902,164val_164
+903,424val_424
+904,187val_187
+905,382val_382
+906,5val_5
+907,70val_70
+908,397val_397
+909,480val_480
+910,291val_291
+911,24val_24
+912,351val_351
+913,255val_255
+914,104val_104
+915,70val_70
+916,163val_163
+917,438val_438
+918,119val_119
+919,414val_414
+920,200val_200
+921,491val_491
+922,237val_237
+923,439val_439
+924,360val_360
+925,248val_248
+926,479val_479
+927,305val_305
+928,417val_417
+929,199val_199
+930,444val_444
+931,120val_120
+932,429val_429
+933,169val_169
+934,443val_443
+935,323val_323
+936,325val_325
+937,277val_277
+938,230val_230
+939,478val_478
+940,178val_178
+941,468val_468
+942,310val_310
+943,317val_317
+944,333val_333
+945,493val_493
+946,460val_460
+947,207val_207
+948,249val_249
+949,265val_265
+950,480val_480
+951,83val_83
+952,136val_136
+953,353val_353
+954,172val_172
+955,214val_214
+956,462val_462
+957,233val_233
+958,406val_406
+959,133val_133
+960,175val_175
+961,189val_189
+962,454val_454
+963,375val_375
+964,401val_401
+965,421val_421
+966,407val_407
+967,384val_384
+968,256val_256
+969,26val_26
+970,134val_134
+971,67val_67
+972,384val_384
+973,379val_379
+974,18val_18
+975,462val_462
+976,492val_492
+977,100val_100
+978,298val_298
+979,9val_9
+980,341val_341
+981,498val_498
+982,146val_146
+983,458val_458
+984,362val_362
+985,186val_186
+986,285val_285
+987,348val_348
+988,167val_167
+989,18val_18
+990,273val_273
+991,183val_183
+992,281val_281
+993,344val_344
+994,97val_97
+995,469val_469
+996,315val_315
+997,84val_84
+998,28val_28
+999,37val_37
+1000,448val_448
+1001,152val_152
+1002,348val_348
+1003,307val_307
+1004,194val_194
+1005,414val_414
+1006,477val_477
+1007,222val_222
+1008,126val_126
+1009,90val_90
+1010,169val_169
+1011,403val_403
+1012,400val_400
+1013,200val_200
+1014,97val_97

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/502990c9/webapp/src/test/resources/apps/hive/script.hql
----------------------------------------------------------------------
diff --git a/webapp/src/test/resources/apps/hive/script.hql b/webapp/src/test/resources/apps/hive/script.hql
new file mode 100644
index 0000000..6a81635
--- /dev/null
+++ b/webapp/src/test/resources/apps/hive/script.hql
@@ -0,0 +1,19 @@
+--
+-- 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.
+--
+
+INSERT OVERWRITE TABLE ${falcon_output_database}.${falcon_output_table} PARTITION ${falcon_input_filter} SELECT id, value FROM ${falcon_input_database}.${falcon_input_table} WHERE ${falcon_input_filter};


Mime
View raw message