falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From venkat...@apache.org
Subject [6/6] git commit: Merge commit 'd422dba4816fb3003d72c8c1e3d835c19c99f50c' into 85
Date Mon, 23 Sep 2013 22:55:48 GMT
Merge commit 'd422dba4816fb3003d72c8c1e3d835c19c99f50c' into 85

Conflicts:
	common/src/main/java/org/apache/falcon/catalog/AbstractCatalogService.java
	common/src/main/java/org/apache/falcon/catalog/HiveCatalogService.java
	webapp/src/test/resources/cluster-template.xml


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

Branch: refs/heads/FALCON-85
Commit: 0879caff43689f8daebcea6f1c4c9e3fd3eb4f02
Parents: a298d85 d422dba
Author: Venkatesh Seetharam <venkatesh@apache.org>
Authored: Mon Sep 23 15:22:51 2013 -0700
Committer: Venkatesh Seetharam <venkatesh@apache.org>
Committed: Mon Sep 23 15:22:51 2013 -0700

----------------------------------------------------------------------
 .../entity/parser/ClusterEntityParserTest.java     | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/0879caff/common/src/test/java/org/apache/falcon/entity/parser/ClusterEntityParserTest.java
----------------------------------------------------------------------
diff --cc common/src/test/java/org/apache/falcon/entity/parser/ClusterEntityParserTest.java
index dffa691,20d14e8..6bf1df8
--- a/common/src/test/java/org/apache/falcon/entity/parser/ClusterEntityParserTest.java
+++ b/common/src/test/java/org/apache/falcon/entity/parser/ClusterEntityParserTest.java
@@@ -18,6 -18,15 +18,13 @@@
  
  package org.apache.falcon.entity.parser;
  
 -import static org.testng.AssertJUnit.assertEquals;
 -
+ import java.io.IOException;
+ import java.io.InputStream;
+ import java.io.StringWriter;
+ 
+ import javax.xml.bind.JAXBException;
+ import javax.xml.bind.Marshaller;
+ 
  import org.apache.falcon.FalconException;
  import org.apache.falcon.cluster.util.EmbeddedCluster;
  import org.apache.falcon.entity.AbstractTestBase;
@@@ -32,10 -40,6 +39,7 @@@ import org.testng.annotations.AfterClas
  import org.testng.annotations.BeforeClass;
  import org.testng.annotations.Test;
  
- import javax.xml.bind.JAXBException;
- import java.io.IOException;
- import java.io.InputStream;
 +
  /**
   * Test for validating cluster entity parsing.
   */
@@@ -65,32 -69,18 +69,39 @@@ public class ClusterEntityParserTest ex
  
          Interface write = ClusterHelper.getInterface(cluster, Interfacetype.WRITE);
          //assertEquals(write.getEndpoint(), conf.get("fs.default.name"));
 -        assertEquals(write.getVersion(), "0.20.2");
 +        Assert.assertEquals(write.getVersion(), "0.20.2");
  
          Interface workflow = ClusterHelper.getInterface(cluster, Interfacetype.WORKFLOW);
 -        assertEquals(workflow.getEndpoint(), "http://localhost:11000/oozie/");
 -        assertEquals(workflow.getVersion(), "3.1");
 +        Assert.assertEquals(workflow.getEndpoint(), "http://localhost:11000/oozie/");
 +        Assert.assertEquals(workflow.getVersion(), "3.1");
  
 -        assertEquals(ClusterHelper.getLocation(cluster, "staging"), "/projects/falcon/staging");
++        Assert.assertEquals(ClusterHelper.getLocation(cluster, "staging"), "/projects/falcon/staging");
+ 
+         StringWriter stringWriter = new StringWriter();
+         Marshaller marshaller = EntityType.CLUSTER.getMarshaller();
+         marshaller.marshal(cluster, stringWriter);
+         System.out.println(stringWriter.toString());
++
 +        Interface catalog = ClusterHelper.getInterface(cluster, Interfacetype.REGISTRY);
 +        Assert.assertEquals(catalog.getEndpoint(), "http://localhost:48080/templeton/v1");
 +        Assert.assertEquals(catalog.getVersion(), "0.11.0");
 +
 +        Assert.assertEquals(ClusterHelper.getLocation(cluster, "staging"), "/projects/falcon/staging");
 +    }
 +
 +    @Test
 +    public void testParseClusterWithoutRegistry() throws IOException, FalconException, JAXBException
{
 +
 +        InputStream stream = this.getClass().getResourceAsStream("/config/cluster/cluster-no-registry.xml");
 +
 +        Cluster cluster = parser.parse(stream);
 +
 +        Interface catalog = ClusterHelper.getInterface(cluster, Interfacetype.REGISTRY);
 +        Assert.assertNull(catalog);
 +
 +        StartupProperties.get().setProperty("catalog.service.impl", "");
 +        catalog = ClusterHelper.getInterface(cluster, Interfacetype.REGISTRY);
 +        Assert.assertNull(catalog);
      }
  
      /**


Mime
View raw message