accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From afu...@apache.org
Subject svn commit: r1241637 - /incubator/accumulo/branches/1.4/src/examples/wikisearch/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/ArticleExtractor.java
Date Tue, 07 Feb 2012 21:29:23 GMT
Author: afuchs
Date: Tue Feb  7 21:29:23 2012
New Revision: 1241637

URL: http://svn.apache.org/viewvc?rev=1241637&view=rev
Log:
ACCUMULO-375 increased max article size supported in Writable methods

Modified:
    incubator/accumulo/branches/1.4/src/examples/wikisearch/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/ArticleExtractor.java

Modified: incubator/accumulo/branches/1.4/src/examples/wikisearch/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/ArticleExtractor.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/examples/wikisearch/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/ArticleExtractor.java?rev=1241637&r1=1241636&r2=1241637&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/examples/wikisearch/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/ArticleExtractor.java
(original)
+++ incubator/accumulo/branches/1.4/src/examples/wikisearch/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/ArticleExtractor.java
Tue Feb  7 21:29:23 2012
@@ -32,6 +32,7 @@ import javax.xml.stream.XMLStreamReader;
 
 import org.apache.accumulo.examples.wikisearch.normalizer.LcNoDiacriticsNormalizer;
 import org.apache.accumulo.examples.wikisearch.normalizer.NumberNormalizer;
+import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.Writable;
 
 
@@ -100,19 +101,23 @@ public class ArticleExtractor {
     @Override
     public void readFields(DataInput in) throws IOException {
       id = in.readInt();
-      title = in.readUTF();
+      Text foo = new Text();
+      foo.readFields(in);
+      title = foo.toString();
       timestamp = in.readLong();
-      comments = in.readUTF();
-      text = in.readUTF();
+      foo.readFields(in);
+      comments = foo.toString();
+      foo.readFields(in);
+      text = foo.toString();
     }
 
     @Override
     public void write(DataOutput out) throws IOException {
       out.writeInt(id);
-      out.writeUTF(title);
+      (new Text(title)).write(out);
       out.writeLong(timestamp);
-      out.writeUTF(comments);
-      out.writeUTF(text);
+      (new Text(comments)).write(out);
+      (new Text(text)).write(out);
     }
     
   }



Mime
View raw message