accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ujustgotbi...@apache.org
Subject [09/50] git commit: ACCUMULO-375 increased max article size supported in Writable methods
Date Thu, 06 Feb 2014 05:39:48 GMT
ACCUMULO-375 increased max article size supported in Writable methods

git-svn-id: https://svn.apache.org/repos/asf/incubator/accumulo/branches/1.4@1241637 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/accumulo-wikisearch/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo-wikisearch/commit/266455b6
Tree: http://git-wip-us.apache.org/repos/asf/accumulo-wikisearch/tree/266455b6
Diff: http://git-wip-us.apache.org/repos/asf/accumulo-wikisearch/diff/266455b6

Branch: refs/heads/1.4.5-SNAPSHOT
Commit: 266455b6ea3ac439b1d63ee5d083f28975fdd422
Parents: 410c1d5
Author: Adam Fuchs <afuchs@apache.org>
Authored: Tue Feb 7 21:29:23 2012 +0000
Committer: Adam Fuchs <afuchs@apache.org>
Committed: Tue Feb 7 21:29:23 2012 +0000

----------------------------------------------------------------------
 .../wikisearch/ingest/ArticleExtractor.java        | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo-wikisearch/blob/266455b6/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/ArticleExtractor.java
----------------------------------------------------------------------
diff --git a/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/ArticleExtractor.java
b/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/ArticleExtractor.java
index 06d1670..a3dcf8d 100644
--- a/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/ArticleExtractor.java
+++ b/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/ArticleExtractor.java
@@ -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