incubator-accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1213422 - in /incubator/accumulo/trunk/contrib/accumulo_sample: ingest/pom.xml ingest/src/main/java/ingest/WikipediaMapper.java pom.xml query/pom.xml query/src/main/java/logic/ContentLogic.java query/src/main/java/sample/query/IQuery.java
Date Mon, 12 Dec 2011 20:30:37 GMT
Author: ecn
Date: Mon Dec 12 20:30:36 2011
New Revision: 1213422

URL: http://svn.apache.org/viewvc?rev=1213422&view=rev
Log:
ACCUMULO-145: remove jboss dependencies for sample application

Modified:
    incubator/accumulo/trunk/contrib/accumulo_sample/ingest/pom.xml
    incubator/accumulo/trunk/contrib/accumulo_sample/ingest/src/main/java/ingest/WikipediaMapper.java
    incubator/accumulo/trunk/contrib/accumulo_sample/pom.xml
    incubator/accumulo/trunk/contrib/accumulo_sample/query/pom.xml
    incubator/accumulo/trunk/contrib/accumulo_sample/query/src/main/java/logic/ContentLogic.java
    incubator/accumulo/trunk/contrib/accumulo_sample/query/src/main/java/sample/query/IQuery.java

Modified: incubator/accumulo/trunk/contrib/accumulo_sample/ingest/pom.xml
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/contrib/accumulo_sample/ingest/pom.xml?rev=1213422&r1=1213421&r2=1213422&view=diff
==============================================================================
--- incubator/accumulo/trunk/contrib/accumulo_sample/ingest/pom.xml (original)
+++ incubator/accumulo/trunk/contrib/accumulo_sample/ingest/pom.xml Mon Dec 12 20:30:36 2011
@@ -72,13 +72,8 @@
       <artifactId>protobuf-java</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-common-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.logging</groupId>
-      <artifactId>jboss-logging-spi</artifactId>
-      <scope>runtime</scope>
+    	<groupId>com.sun.jersey</groupId>
+    	<artifactId>jersey-server</artifactId>
     </dependency>
   </dependencies>
 
@@ -97,7 +92,7 @@
             <configuration>
               <outputDirectory>lib</outputDirectory>
               <!-- just grab the non-provided runtime dependencies -->
-              <includeArtifactIds>commons-lang,google-collections,lucene-core,lucene-analyzers,lucene-wikipedia,protobuf-java,jboss-common-core,jboss-logging-spi</includeArtifactIds>
+              <includeArtifactIds>commons-lang,google-collections,lucene-core,lucene-analyzers,lucene-wikipedia,protobuf-java</includeArtifactIds>
               <excludeTransitive>true</excludeTransitive>
             </configuration>
           </execution>

Modified: incubator/accumulo/trunk/contrib/accumulo_sample/ingest/src/main/java/ingest/WikipediaMapper.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/contrib/accumulo_sample/ingest/src/main/java/ingest/WikipediaMapper.java?rev=1213422&r1=1213421&r2=1213422&view=diff
==============================================================================
--- incubator/accumulo/trunk/contrib/accumulo_sample/ingest/src/main/java/ingest/WikipediaMapper.java
(original)
+++ incubator/accumulo/trunk/contrib/accumulo_sample/ingest/src/main/java/ingest/WikipediaMapper.java
Mon Dec 12 20:30:36 2011
@@ -35,6 +35,10 @@ import java.util.regex.Pattern;
 
 import normalizer.LcNoDiacriticsNormalizer;
 
+import org.apache.accumulo.core.data.Mutation;
+import org.apache.accumulo.core.data.Value;
+import org.apache.accumulo.core.security.ColumnVisibility;
+import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.io.LongWritable;
@@ -54,13 +58,9 @@ import org.apache.lucene.analysis.fr.Fre
 import org.apache.lucene.analysis.nl.DutchAnalyzer;
 import org.apache.lucene.analysis.tokenattributes.TermAttribute;
 import org.apache.lucene.wikipedia.analysis.WikipediaTokenizer;
-import org.jboss.util.Base64;
 
 import protobuf.Uid;
 import protobuf.Uid.List.Builder;
-import org.apache.accumulo.core.data.Mutation;
-import org.apache.accumulo.core.data.Value;
-import org.apache.accumulo.core.security.ColumnVisibility;
 
 import com.google.common.collect.HashMultimap;
 import com.google.common.collect.Multimap;
@@ -210,8 +210,7 @@ public class WikipediaMapper extends Map
       }
       // Add the entire text to the document section of the table.
       // row is the partition, colf is 'd', colq is language\0articleid, value is Base64
encoded GZIP'd document
-      m.put(DOCUMENT_COLUMN_FAMILY, colfPrefix + article.getId(), cv, article.getTimestamp(),
-          new Value(Base64.encodeBytes(article.getText().getBytes(), Base64.GZIP).getBytes()));
+      m.put(DOCUMENT_COLUMN_FAMILY, colfPrefix + article.getId(), cv, article.getTimestamp(),
new Value(Base64.encodeBase64(article.getText().getBytes())));
       context.write(tablename, m);
       
     } else {

Modified: incubator/accumulo/trunk/contrib/accumulo_sample/pom.xml
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/contrib/accumulo_sample/pom.xml?rev=1213422&r1=1213421&r2=1213422&view=diff
==============================================================================
--- incubator/accumulo/trunk/contrib/accumulo_sample/pom.xml (original)
+++ incubator/accumulo/trunk/contrib/accumulo_sample/pom.xml Mon Dec 12 20:30:36 2011
@@ -37,6 +37,27 @@
     <module>ingest</module>
     <module>query-war</module>
   </modules>
+  
+  <repositories>
+    <repository>
+      <id>central</id>
+      <name>Maven Repository Switchboard</name>
+      <layout>default</layout>
+      <url>http://repo1.maven.org/maven2</url>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </repository>
+    <repository>
+      <id>java.net</id>
+      <name>java.net</name>
+      <layout>default</layout>
+      <url>https://maven.java.net/content/groups/public</url>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </repository>
+  </repositories>
 
   <build>
     <defaultGoal>package</defaultGoal>
@@ -158,8 +179,6 @@
     <version.commons-codec>1.5</version.commons-codec>
     <version.ejb-spec-api>1.0.1.Final</version.ejb-spec-api>
     <version.jaxrs>2.1.0.GA</version.jaxrs>
-    <version.jboss-common-core>2.2.17.GA</version.jboss-common-core>
-    <version.jboss-logging>2.0.5.GA</version.jboss-logging>
     <version.kryo>1.04</version.kryo>
     <version.log4j>1.2.16</version.log4j>
     <version.log4j-extras>1.0</version.log4j-extras>
@@ -241,51 +260,16 @@
         <version>${version.commons-jexl}</version>
       </dependency>
       <dependency>
-        <groupId>org.jboss.resteasy</groupId>
-        <artifactId>jaxrs-api</artifactId>
-        <version>${version.jaxrs}</version>
-        <scope>provided</scope>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss.resteasy</groupId>
-        <artifactId>resteasy-jaxrs</artifactId>
-        <version>${version.jaxrs}</version>
-        <scope>provided</scope>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss.resteasy</groupId>
-        <artifactId>resteasy-jaxb-provider</artifactId>
-        <version>${version.jaxrs}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss.spec.javax.ejb</groupId>
-        <artifactId>jboss-ejb-api_3.1_spec</artifactId>
-        <version>${version.ejb-spec-api}</version>
-        <scope>provided</scope>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss</groupId>
-        <artifactId>jboss-common-core</artifactId>
-        <version>${version.jboss-common-core}</version>
-      </dependency>
-      <dependency>
-        <groupId>org.jboss.logging</groupId>
-        <artifactId>jboss-logging-spi</artifactId>
-        <version>${version.jboss-logging}</version>
-      </dependency>
-      <dependency>
         <groupId>com.googlecode</groupId>
         <artifactId>minlog</artifactId>
         <version>${version.minlog}</version>
       </dependency>
+      <dependency>
+      	<groupId>com.sun.jersey</groupId>
+      	<artifactId>jersey-server</artifactId>
+      	<version>1.11</version>
+      </dependency>
     </dependencies>
   </dependencyManagement>
 
-  <repositories>
-    <repository>
-      <id>jboss-public</id>
-      <url>https://repository.jboss.org/nexus/content/groups/public-jboss</url>
-    </repository>
-  </repositories>
-
 </project>

Modified: incubator/accumulo/trunk/contrib/accumulo_sample/query/pom.xml
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/contrib/accumulo_sample/query/pom.xml?rev=1213422&r1=1213421&r2=1213422&view=diff
==============================================================================
--- incubator/accumulo/trunk/contrib/accumulo_sample/query/pom.xml (original)
+++ incubator/accumulo/trunk/contrib/accumulo_sample/query/pom.xml Mon Dec 12 20:30:36 2011
@@ -62,35 +62,6 @@
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>org.jboss.resteasy</groupId>
-      <artifactId>jaxrs-api</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.resteasy</groupId>
-      <artifactId>resteasy-jaxrs</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.resteasy</groupId>
-      <artifactId>resteasy-jaxb-provider</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.spec.javax.ejb</groupId>
-      <artifactId>jboss-ejb-api_3.1_spec</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-common-core</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.logging</groupId>
-      <artifactId>jboss-logging-spi</artifactId>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-jexl</artifactId>
     </dependency>

Modified: incubator/accumulo/trunk/contrib/accumulo_sample/query/src/main/java/logic/ContentLogic.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/contrib/accumulo_sample/query/src/main/java/logic/ContentLogic.java?rev=1213422&r1=1213421&r2=1213422&view=diff
==============================================================================
--- incubator/accumulo/trunk/contrib/accumulo_sample/query/src/main/java/logic/ContentLogic.java
(original)
+++ incubator/accumulo/trunk/contrib/accumulo_sample/query/src/main/java/logic/ContentLogic.java
Mon Dec 12 20:30:36 2011
@@ -23,13 +23,6 @@ import java.util.Map.Entry;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
-import org.jboss.util.Base64;
-
-import sample.Document;
-import sample.Field;
-import sample.Results;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.TableNotFoundException;
@@ -37,6 +30,13 @@ import org.apache.accumulo.core.data.Key
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.Authorizations;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.lang.StringUtils;
+import org.apache.log4j.Logger;
+
+import sample.Document;
+import sample.Field;
+import sample.Results;
 
 /**
  * This query table implementation returns a Results object that contains documents from
the wiki table. The query will contain the partition id, wikitype, and
@@ -95,7 +95,7 @@ public class ContentLogic {
           doc.setId(id);
           Field val = new Field();
           val.setFieldName("DOCUMENT");
-          val.setFieldValue(new String(Base64.decode(entry.getValue().toString())));
+          val.setFieldValue(new String(Base64.decodeBase64(entry.getValue().toString())));
           doc.getFields().add(val);
           results.getResults().add(doc);
         }

Modified: incubator/accumulo/trunk/contrib/accumulo_sample/query/src/main/java/sample/query/IQuery.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/trunk/contrib/accumulo_sample/query/src/main/java/sample/query/IQuery.java?rev=1213422&r1=1213421&r2=1213422&view=diff
==============================================================================
--- incubator/accumulo/trunk/contrib/accumulo_sample/query/src/main/java/sample/query/IQuery.java
(original)
+++ incubator/accumulo/trunk/contrib/accumulo_sample/query/src/main/java/sample/query/IQuery.java
Mon Dec 12 20:30:36 2011
@@ -23,8 +23,6 @@ import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 import javax.ws.rs.QueryParam;
 
-import org.jboss.resteasy.annotations.GZIP;
-
 import sample.Results;
 
 @Path("/Query")
@@ -34,7 +32,6 @@ public interface IQuery {
   @POST
   @Path("/html")
   @Consumes("*/*")
-  @GZIP
   public String html(@QueryParam("query") String query, @QueryParam("auths") String auths);
   
   @GET
@@ -42,7 +39,6 @@ public interface IQuery {
   @Path("/xml")
   @Consumes("*/*")
   @Produces("application/xml")
-  @GZIP
   public Results xml(@QueryParam("query") String query, @QueryParam("auths") String auths);
   
   @GET
@@ -50,7 +46,6 @@ public interface IQuery {
   @Path("/json")
   @Consumes("*/*")
   @Produces("application/json")
-  @GZIP
   public Results json(@QueryParam("query") String query, @QueryParam("auths") String auths);
   
   @GET
@@ -58,7 +53,6 @@ public interface IQuery {
   @Path("/yaml")
   @Consumes("*/*")
   @Produces("text/x-yaml")
-  @GZIP
   public Results yaml(@QueryParam("query") String query, @QueryParam("auths") String auths);
   
   @GET
@@ -66,7 +60,6 @@ public interface IQuery {
   @Path("/content")
   @Consumes("*/*")
   @Produces("application/xml")
-  @GZIP
   public Results content(@QueryParam("query") String query, @QueryParam("auths") String auths);
   
 }



Mime
View raw message