accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ujustgotbi...@apache.org
Subject [19/50] git commit: ACCUMULO-375 it is important to close a MultiThreadedBatchWriter when you are done with it
Date Thu, 06 Feb 2014 05:39:58 GMT
ACCUMULO-375 it is important to close a MultiThreadedBatchWriter when you are done with it

git-svn-id: https://svn.apache.org/repos/asf/incubator/accumulo/branches/1.4@1245170 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/1e05129d
Tree: http://git-wip-us.apache.org/repos/asf/accumulo-wikisearch/tree/1e05129d
Diff: http://git-wip-us.apache.org/repos/asf/accumulo-wikisearch/diff/1e05129d

Branch: refs/heads/1.4.5-SNAPSHOT
Commit: 1e05129dfb96a0c6c78d7324fe4b3a73e8d39ac5
Parents: ec56d2d
Author: Adam Fuchs <afuchs@apache.org>
Authored: Thu Feb 16 20:46:37 2012 +0000
Committer: Adam Fuchs <afuchs@apache.org>
Committed: Thu Feb 16 20:46:37 2012 +0000

----------------------------------------------------------------------
 .../examples/wikisearch/ingest/WikipediaPartitionedMapper.java | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo-wikisearch/blob/1e05129d/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/WikipediaPartitionedMapper.java
----------------------------------------------------------------------
diff --git a/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/WikipediaPartitionedMapper.java
b/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/WikipediaPartitionedMapper.java
index 7816b03..5e82a7d 100644
--- a/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/WikipediaPartitionedMapper.java
+++ b/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/WikipediaPartitionedMapper.java
@@ -29,6 +29,7 @@ import java.util.Set;
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.MultiTableBatchWriter;
+import org.apache.accumulo.core.client.MutationsRejectedException;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.ColumnVisibility;
@@ -236,6 +237,11 @@ public class WikipediaPartitionedMapper extends Mapper<Text,Article,Text,Mutatio
     wikiIndexOutput.flush();
     wikiMetadataOutput.flush();
     wikiReverseIndexOutput.flush();
+    try {
+      mtbw.close();
+    } catch (MutationsRejectedException e) {
+      throw new RuntimeException(e);
+    }
   }
 
 


Mime
View raw message