atom feed1 message in org.apache.incubator.accumulo-commitssvn commit: r1245170 - /incubator/acc...
FromSent OnAttachments
afu...@apache.orgFeb 16, 2012 12:46 pm 
Subject:svn commit: r1245170 - /incubator/accumulo/branches/1.4/src/examples/wikisearch/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/WikipediaPartitionedMapper.java
From:afu...@apache.org (afu@apache.org)
Date:Feb 16, 2012 12:46:37 pm
List:org.apache.incubator.accumulo-commits

Author: afuchs Date: Thu Feb 16 20:46:37 2012 New Revision: 1245170

URL: http://svn.apache.org/viewvc?rev=1245170&view=rev Log: ACCUMULO-375 it is important to close a MultiThreadedBatchWriter when you are
done with it

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

Modified:
incubator/accumulo/branches/1.4/src/examples/wikisearch/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/WikipediaPartitionedMapper.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/WikipediaPartitionedMapper.java?rev=1245170&r1=1245169&r2=1245170&view=diff ============================================================================== ---
incubator/accumulo/branches/1.4/src/examples/wikisearch/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/WikipediaPartitionedMapper.java
(original) +++
incubator/accumulo/branches/1.4/src/examples/wikisearch/ingest/src/main/java/org/apache/accumulo/examples/wikisearch/ingest/WikipediaPartitionedMapper.java
Thu Feb 16 20:46:37 2012 @@ -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 wikiIndexOutput.flush(); wikiMetadataOutput.flush(); wikiReverseIndexOutput.flush(); + try { + mtbw.close(); + } catch (MutationsRejectedException e) { + throw new RuntimeException(e); + } }