mirror of https://github.com/apache/lucene.git
LUCENE-5568: Fix benchmark default.codec to work
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1584422 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f9104a1693
commit
02804f67aa
|
@ -229,6 +229,8 @@ Bug fixes
|
|||
* LUCENE-5559: Add missing argument checks to tokenfilters taking
|
||||
numeric arguments. (Ahmet Arslan via Robert Muir)
|
||||
|
||||
* LUCENE-5568: Benchmark module's "default.codec" option didn't work. (David Smiley)
|
||||
|
||||
Test Framework
|
||||
|
||||
* LUCENE-5449: Rename _TestUtil and _TestHelper to remove the leading _.
|
||||
|
|
|
@ -20,19 +20,18 @@ package org.apache.lucene.benchmark.byTask.tasks;
|
|||
import org.apache.lucene.benchmark.byTask.PerfRunData;
|
||||
import org.apache.lucene.benchmark.byTask.utils.Config;
|
||||
import org.apache.lucene.codecs.Codec;
|
||||
import org.apache.lucene.index.ConcurrentMergeScheduler;
|
||||
import org.apache.lucene.index.IndexCommit;
|
||||
import org.apache.lucene.index.IndexDeletionPolicy;
|
||||
import org.apache.lucene.index.IndexWriter;
|
||||
import org.apache.lucene.index.IndexWriterConfig;
|
||||
import org.apache.lucene.index.IndexWriterConfig.OpenMode;
|
||||
import org.apache.lucene.index.LogMergePolicy;
|
||||
import org.apache.lucene.index.TieredMergePolicy;
|
||||
import org.apache.lucene.index.MergeScheduler;
|
||||
import org.apache.lucene.index.ConcurrentMergeScheduler;
|
||||
import org.apache.lucene.index.MergePolicy;
|
||||
import org.apache.lucene.index.MergeScheduler;
|
||||
import org.apache.lucene.index.NoDeletionPolicy;
|
||||
import org.apache.lucene.index.NoMergePolicy;
|
||||
import org.apache.lucene.index.NoMergeScheduler;
|
||||
import org.apache.lucene.index.IndexWriterConfig.OpenMode;
|
||||
import org.apache.lucene.util.Version;
|
||||
|
||||
import java.io.BufferedOutputStream;
|
||||
|
@ -130,7 +129,7 @@ public class CreateIndexTask extends PerfTask {
|
|||
if (defaultCodec != null) {
|
||||
try {
|
||||
Class<? extends Codec> clazz = Class.forName(defaultCodec).asSubclass(Codec.class);
|
||||
Codec.setDefault(clazz.newInstance());
|
||||
iwConf.setCodec(clazz.newInstance());
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Couldn't instantiate Codec: " + defaultCodec, e);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue