gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lewi...@apache.org
Subject svn commit: r1309933 - in /gora/trunk: gora-core/pom.xml gora-core/src/test/java/org/apache/gora/mapreduce/DataStoreMapReduceTestBase.java pom.xml
Date Thu, 05 Apr 2012 16:36:27 GMT
Author: lewismc
Date: Thu Apr  5 16:36:27 2012
New Revision: 1309933

URL: http://svn.apache.org/viewvc?rev=1309933&view=rev
Log:
Initial commit to address GORA-76.

Modified:
    gora/trunk/gora-core/pom.xml
    gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/DataStoreMapReduceTestBase.java
    gora/trunk/pom.xml

Modified: gora/trunk/gora-core/pom.xml
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/pom.xml?rev=1309933&r1=1309932&r2=1309933&view=diff
==============================================================================
--- gora/trunk/gora-core/pom.xml (original)
+++ gora/trunk/gora-core/pom.xml Thu Apr  5 16:36:27 2012
@@ -95,6 +95,11 @@
             <groupId>org.apache.hadoop</groupId>
             <artifactId>hadoop-core</artifactId>
         </dependency>
+        
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-jaxrs</artifactId>
+        </dependency>
 
         <dependency>
             <groupId>org.apache.hadoop</groupId>
@@ -136,7 +141,7 @@
             <artifactId>hadoop-test</artifactId>
             <scope>test</scope>
         </dependency>
-
+        
     </dependencies>
 
 </project>

Modified: gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/DataStoreMapReduceTestBase.java
URL: http://svn.apache.org/viewvc/gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/DataStoreMapReduceTestBase.java?rev=1309933&r1=1309932&r2=1309933&view=diff
==============================================================================
--- gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/DataStoreMapReduceTestBase.java
(original)
+++ gora/trunk/gora-core/src/test/java/org/apache/gora/mapreduce/DataStoreMapReduceTestBase.java
Thu Apr  5 16:36:27 2012
@@ -27,6 +27,10 @@ import org.apache.hadoop.mapred.JobConf;
 import org.junit.Before;
 import org.junit.Test;
 
+// Slf4j logging imports
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 /**
  * Base class for Mapreduce based tests. This is just a convenience
@@ -35,6 +39,7 @@ import org.junit.Test;
  */
 @SuppressWarnings("deprecation")
 public abstract class DataStoreMapReduceTestBase extends HadoopTestCase {
+  public static final Logger LOG = LoggerFactory.getLogger(DataStoreMapReduceTestBase.class);
 
   private DataStore<String, WebPage> webPageStore;
   private JobConf job;
@@ -51,13 +56,21 @@ public abstract class DataStoreMapReduce
   @Override
   @Before
   public void setUp() throws Exception {
-    super.setUp();
-    webPageStore = createWebPageDataStore();
-    job = createJobConf();
-  }
+    LOG.info("Setting up Hadoop Test Case...");
+    try {
+      super.setUp();
+      webPageStore = createWebPageDataStore();
+      job = createJobConf();
+    } catch (Exception e) {
+      LOG.error("Hadoop Test Case set up failed", e);
+      // cleanup
+      tearDown();
+    }
+  } 
 
   @Override
   public void tearDown() throws Exception {
+    LOG.info("Tearing down Hadoop Test Case...");
     super.tearDown();
     webPageStore.close();
   }
@@ -74,6 +87,6 @@ public abstract class DataStoreMapReduce
  // and implemented. For a WIP and more details see GORA-104 
  // @Test
  // public void testWordCount() throws Exception {
- //   MapReduceTestUtils.testCountQuery(webPageStore, job);
+ //   MapReduceTestUtils.testWordCount(job, tokenDatumStore, webPageStore);
  // }
 }

Modified: gora/trunk/pom.xml
URL: http://svn.apache.org/viewvc/gora/trunk/pom.xml?rev=1309933&r1=1309932&r2=1309933&view=diff
==============================================================================
--- gora/trunk/pom.xml (original)
+++ gora/trunk/pom.xml Thu Apr  5 16:36:27 2012
@@ -424,10 +424,14 @@
 
     <properties>
         <osgi.version>4.2.0</osgi.version>
+        <!-- Avro Dependencies -->
+        <jackson.version>1.4.2</jackson.version>
         <!-- Hadoop Dependencies -->
-        <hadoop.version>0.20.2</hadoop.version>
+        <hadoop.version>1.0.1</hadoop.version>
+        <hadoop.test.version>1.0.1</hadoop.test.version>
         <hbase.version>0.90.4</hbase.version>
         <avro.version>1.3.3</avro.version>
+        <cxf-rt-frontend-jaxrs.version>2.5.2</cxf-rt-frontend-jaxrs.version>
         <!-- Cassandra Dependencies -->
         <cassandra.version>1.0.2</cassandra.version>
         <cassandra.thrift.version>1.0.2</cassandra.thrift.version>
@@ -512,6 +516,18 @@
             <groupId>org.apache.gora</groupId>
             <artifactId>gora-tutorial</artifactId>
             <version>${project.version}</version>
+            </dependency>
+  
+          <!-- Avro needs this version of jackson -->
+          <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-core-asl</artifactId>
+            <version>${jackson.version}</version>
+          </dependency>
+          <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-mapper-asl</artifactId>
+            <version>${jackson.version}</version>
           </dependency>
 
             <!-- Hadoop Dependencies -->
@@ -520,6 +536,15 @@
                 <artifactId>hadoop-core</artifactId>
                 <version>${hadoop.version}</version>
                 <exclusions>
+                    <!--  jackson is conflicting with the Avro dep -->
+                    <exclusion>
+                        <groupId>org.codehaus.jackson</groupId>
+                        <artifactId>jackson-core-asl</artifactId>
+                    </exclusion>
+                    <exclusion>
+                        <groupId>org.codehaus.jackson</groupId>
+                        <artifactId>jackson-mapper-asl</artifactId>
+                    </exclusion>
                     <exclusion>
                         <groupId>hsqldb</groupId>
                         <artifactId>hsqldb</artifactId>
@@ -538,6 +563,12 @@
                     </exclusion>
                 </exclusions>
             </dependency>
+            
+            <dependency>
+                <groupId>org.apache.cxf</groupId>
+                <artifactId>cxf-rt-frontend-jaxrs</artifactId>
+                <version>${cxf-rt-frontend-jaxrs.version}</version>
+            </dependency>
 
             <dependency>
                 <groupId>org.apache.hadoop</groupId>
@@ -676,9 +707,9 @@
             <dependency>
                 <groupId>org.apache.hadoop</groupId>
                 <artifactId>hadoop-test</artifactId>
-                <version>${hadoop.version}</version>
+                <version>${hadoop.test.version}</version>
             </dependency>
-
+            
             <dependency>
                 <groupId>junit</groupId>
                 <artifactId>junit</artifactId>



Mime
View raw message