Index: modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/LineDocSourceTest.java =================================================================== --- modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/LineDocSourceTest.java (revision 1203974) +++ modules/benchmark/src/test/org/apache/lucene/benchmark/byTask/feeds/LineDocSourceTest.java (working copy) @@ -154,6 +154,7 @@ searcher.close(); reader.close(); + runData.close(); } /* Tests LineDocSource with a bzip2 input stream. */ Index: modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ContentItemsSource.java =================================================================== --- modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ContentItemsSource.java (revision 1203974) +++ modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/ContentItemsSource.java (working copy) @@ -17,6 +17,7 @@ * limitations under the License. */ +import java.io.Closeable; import java.io.File; import java.io.IOException; import java.util.ArrayList; @@ -46,7 +47,7 @@ * logStep is not 0 (default=0). * */ -public abstract class ContentItemsSource { +public abstract class ContentItemsSource implements Closeable { private long bytesCount; private long totalBytesCount; Index: modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java =================================================================== --- modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java (revision 1203974) +++ modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java (working copy) @@ -17,6 +17,7 @@ * limitations under the License. */ +import java.io.Closeable; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.HashMap; @@ -75,7 +76,7 @@ * {@link DocData#getProps()} will be indexed. (default false). * */ -public class DocMaker { +public class DocMaker implements Closeable { private static class LeftOver { private DocData docdata; Index: modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/PerfRunData.java =================================================================== --- modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/PerfRunData.java (revision 1203974) +++ modules/benchmark/src/java/org/apache/lucene/benchmark/byTask/PerfRunData.java (working copy) @@ -17,6 +17,7 @@ * limitations under the License. */ +import java.io.Closeable; import java.io.File; import java.io.IOException; import java.util.HashMap; @@ -66,7 +67,7 @@ *
  • taxonomy.directory=<type of directory for taxonomy index| Default: RAMDirectory> * */ -public class PerfRunData { +public class PerfRunData implements Closeable { private Points points; @@ -123,6 +124,12 @@ System.out.println(getQueryMaker(new SearchTask(this)).printQueries()); } } + + public void close() throws IOException { + IOUtils.close(indexWriter, indexReader, indexSearcher, directory, + taxonomyWriter, taxonomyReader, taxonomyDir, + docMaker, facetSource); + } // clean old stuff, reopen public void reinit(boolean eraseIndex) throws Exception {