lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1648849 - in /lucene/dev/trunk/lucene: core/src/java/org/apache/lucene/codecs/compressing/ core/src/java/org/apache/lucene/codecs/lucene50/ test-framework/src/java/org/apache/lucene/codecs/compressing/ test-framework/src/java/org/apache/lu...
Date Thu, 01 Jan 2015 14:57:06 GMT
Author: rmuir
Date: Thu Jan  1 14:57:06 2015
New Revision: 1648849

URL: http://svn.apache.org/r1648849
Log:
LUCENE-6153: randomize stored fields/vectors index blocksize

Modified:
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsFormat.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsIndexWriter.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsWriter.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsFormat.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsReader.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsWriter.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50StoredFieldsFormat.java
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50TermVectorsFormat.java
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/CompressingCodec.java
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/FastCompressingCodec.java
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/FastDecompressionCompressingCodec.java
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/HighCompressionCompressingCodec.java
    lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/dummy/DummyCompressingCodec.java

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsFormat.java?rev=1648849&r1=1648848&r2=1648849&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsFormat.java
(original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsFormat.java
Thu Jan  1 14:57:06 2015
@@ -49,15 +49,16 @@ public class CompressingStoredFieldsForm
   private final CompressionMode compressionMode;
   private final int chunkSize;
   private final int maxDocsPerChunk;
+  private final int blockSize;
 
   /**
    * Create a new {@link CompressingStoredFieldsFormat} with an empty segment 
    * suffix.
    * 
-   * @see CompressingStoredFieldsFormat#CompressingStoredFieldsFormat(String, String, CompressionMode,
int, int)
+   * @see CompressingStoredFieldsFormat#CompressingStoredFieldsFormat(String, String, CompressionMode,
int, int, int)
    */
-  public CompressingStoredFieldsFormat(String formatName, CompressionMode compressionMode,
int chunkSize, int maxDocsPerChunk) {
-    this(formatName, "", compressionMode, chunkSize, maxDocsPerChunk);
+  public CompressingStoredFieldsFormat(String formatName, CompressionMode compressionMode,
int chunkSize, int maxDocsPerChunk, int blockSize) {
+    this(formatName, "", compressionMode, chunkSize, maxDocsPerChunk, blockSize);
   }
   
   /**
@@ -92,10 +93,11 @@ public class CompressingStoredFieldsForm
    * @param compressionMode the {@link CompressionMode} to use
    * @param chunkSize the minimum number of bytes of a single chunk of stored documents
    * @param maxDocsPerChunk the maximum number of documents in a single chunk
+   * @param blockSize the number of chunks to store in an index block
    * @see CompressionMode
    */
   public CompressingStoredFieldsFormat(String formatName, String segmentSuffix, 
-                                       CompressionMode compressionMode, int chunkSize, int
maxDocsPerChunk) {
+                                       CompressionMode compressionMode, int chunkSize, int
maxDocsPerChunk, int blockSize) {
     this.formatName = formatName;
     this.segmentSuffix = segmentSuffix;
     this.compressionMode = compressionMode;
@@ -107,6 +109,10 @@ public class CompressingStoredFieldsForm
       throw new IllegalArgumentException("maxDocsPerChunk must be >= 1");
     }
     this.maxDocsPerChunk = maxDocsPerChunk;
+    if (blockSize < 1) {
+      throw new IllegalArgumentException("blockSize must be >= 1");
+    }
+    this.blockSize = blockSize;
   }
 
   @Override
@@ -120,13 +126,13 @@ public class CompressingStoredFieldsForm
   public StoredFieldsWriter fieldsWriter(Directory directory, SegmentInfo si,
       IOContext context) throws IOException {
     return new CompressingStoredFieldsWriter(directory, si, segmentSuffix, context,
-        formatName, compressionMode, chunkSize, maxDocsPerChunk);
+        formatName, compressionMode, chunkSize, maxDocsPerChunk, blockSize);
   }
 
   @Override
   public String toString() {
     return getClass().getSimpleName() + "(compressionMode=" + compressionMode
-        + ", chunkSize=" + chunkSize + ", maxDocsPerChunk=" + maxDocsPerChunk + ")";
+        + ", chunkSize=" + chunkSize + ", maxDocsPerChunk=" + maxDocsPerChunk + ", blockSize="
+ blockSize + ")";
   }
 
 }

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsIndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsIndexWriter.java?rev=1648849&r1=1648848&r2=1648849&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsIndexWriter.java
(original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsIndexWriter.java
Thu Jan  1 14:57:06 2015
@@ -72,9 +72,8 @@ import org.apache.lucene.util.packed.Pac
  */
 public final class CompressingStoredFieldsIndexWriter implements Closeable {
   
-  static final int BLOCK_SIZE = 1024; // number of chunks to serialize at once
-
   final IndexOutput fieldsIndexOut;
+  final int blockSize;
   int totalDocs;
   int blockDocs;
   int blockChunks;
@@ -83,12 +82,16 @@ public final class CompressingStoredFiel
   final int[] docBaseDeltas;
   final long[] startPointerDeltas;
 
-  CompressingStoredFieldsIndexWriter(IndexOutput indexOutput) throws IOException {
+  CompressingStoredFieldsIndexWriter(IndexOutput indexOutput, int blockSize) throws IOException
{
+    if (blockSize <= 0) {
+      throw new IllegalArgumentException("blockSize must be positive");
+    }
+    this.blockSize = blockSize;
     this.fieldsIndexOut = indexOutput;
     reset();
     totalDocs = 0;
-    docBaseDeltas = new int[BLOCK_SIZE];
-    startPointerDeltas = new long[BLOCK_SIZE];
+    docBaseDeltas = new int[blockSize];
+    startPointerDeltas = new long[blockSize];
     fieldsIndexOut.writeVInt(PackedInts.VERSION_CURRENT);
   }
 
@@ -171,7 +174,7 @@ public final class CompressingStoredFiel
   }
 
   void writeIndex(int numDocs, long startPointer) throws IOException {
-    if (blockChunks == BLOCK_SIZE) {
+    if (blockChunks == blockSize) {
       writeBlock();
       reset();
     }

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsWriter.java?rev=1648849&r1=1648848&r2=1648849&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsWriter.java
(original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsWriter.java
Thu Jan  1 14:57:06 2015
@@ -86,7 +86,7 @@ public final class CompressingStoredFiel
 
   /** Sole constructor. */
   public CompressingStoredFieldsWriter(Directory directory, SegmentInfo si, String segmentSuffix,
IOContext context,
-      String formatName, CompressionMode compressionMode, int chunkSize, int maxDocsPerChunk)
throws IOException {
+      String formatName, CompressionMode compressionMode, int chunkSize, int maxDocsPerChunk,
int blockSize) throws IOException {
     assert directory != null;
     this.segment = si.name;
     this.compressor = compressionMode.newCompressor();
@@ -112,7 +112,7 @@ public final class CompressingStoredFiel
       assert CodecUtil.indexHeaderLength(codecNameDat, segmentSuffix) == fieldsStream.getFilePointer();
       assert CodecUtil.indexHeaderLength(codecNameIdx, segmentSuffix) == indexStream.getFilePointer();
 
-      indexWriter = new CompressingStoredFieldsIndexWriter(indexStream);
+      indexWriter = new CompressingStoredFieldsIndexWriter(indexStream, blockSize);
       indexStream = null;
 
       fieldsStream.writeVInt(chunkSize);

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsFormat.java?rev=1648849&r1=1648848&r2=1648849&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsFormat.java
(original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsFormat.java
Thu Jan  1 14:57:06 2015
@@ -40,6 +40,7 @@ public class CompressingTermVectorsForma
   private final String segmentSuffix;
   private final CompressionMode compressionMode;
   private final int chunkSize;
+  private final int blockSize;
 
   /**
    * Create a new {@link CompressingTermVectorsFormat}.
@@ -65,10 +66,11 @@ public class CompressingTermVectorsForma
    * @param segmentSuffix a suffix to append to files created by this format
    * @param compressionMode the {@link CompressionMode} to use
    * @param chunkSize the minimum number of bytes of a single chunk of stored documents
+   * @param blockSize the number of chunks to store in an index block.
    * @see CompressionMode
    */
   public CompressingTermVectorsFormat(String formatName, String segmentSuffix,
-      CompressionMode compressionMode, int chunkSize) {
+      CompressionMode compressionMode, int chunkSize, int blockSize) {
     this.formatName = formatName;
     this.segmentSuffix = segmentSuffix;
     this.compressionMode = compressionMode;
@@ -76,6 +78,10 @@ public class CompressingTermVectorsForma
       throw new IllegalArgumentException("chunkSize must be >= 1");
     }
     this.chunkSize = chunkSize;
+    if (blockSize < 1) {
+      throw new IllegalArgumentException("blockSize must be >= 1");
+    }
+    this.blockSize = blockSize;
   }
 
   @Override
@@ -90,13 +96,13 @@ public class CompressingTermVectorsForma
   public final TermVectorsWriter vectorsWriter(Directory directory,
       SegmentInfo segmentInfo, IOContext context) throws IOException {
     return new CompressingTermVectorsWriter(directory, segmentInfo, segmentSuffix,
-        context, formatName, compressionMode, chunkSize);
+        context, formatName, compressionMode, chunkSize, blockSize);
   }
 
   @Override
   public String toString() {
     return getClass().getSimpleName() + "(compressionMode=" + compressionMode
-        + ", chunkSize=" + chunkSize + ")";
+        + ", chunkSize=" + chunkSize + ", blockSize=" + blockSize + ")";
   }
 
 }

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsReader.java?rev=1648849&r1=1648848&r2=1648849&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsReader.java
(original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsReader.java
Thu Jan  1 14:57:06 2015
@@ -17,7 +17,7 @@ package org.apache.lucene.codecs.compres
  * limitations under the License.
  */
 
-import static org.apache.lucene.codecs.compressing.CompressingTermVectorsWriter.BLOCK_SIZE;
+import static org.apache.lucene.codecs.compressing.CompressingTermVectorsWriter.PACKED_BLOCK_SIZE;
 import static org.apache.lucene.codecs.compressing.CompressingTermVectorsWriter.CODEC_SFX_DAT;
 import static org.apache.lucene.codecs.compressing.CompressingTermVectorsWriter.CODEC_SFX_IDX;
 import static org.apache.lucene.codecs.compressing.CompressingTermVectorsWriter.FLAGS_BITS;
@@ -92,7 +92,7 @@ public final class CompressingTermVector
     this.decompressor = reader.decompressor.clone();
     this.chunkSize = reader.chunkSize;
     this.numDocs = reader.numDocs;
-    this.reader = new BlockPackedReaderIterator(vectorsStream, packedIntsVersion, BLOCK_SIZE,
0);
+    this.reader = new BlockPackedReaderIterator(vectorsStream, packedIntsVersion, PACKED_BLOCK_SIZE,
0);
     this.version = reader.version;
     this.closed = false;
   }
@@ -150,7 +150,7 @@ public final class CompressingTermVector
       packedIntsVersion = vectorsStream.readVInt();
       chunkSize = vectorsStream.readVInt();
       decompressor = compressionMode.newDecompressor();
-      this.reader = new BlockPackedReaderIterator(vectorsStream, packedIntsVersion, BLOCK_SIZE,
0);
+      this.reader = new BlockPackedReaderIterator(vectorsStream, packedIntsVersion, PACKED_BLOCK_SIZE,
0);
 
       success = true;
     } finally {

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsWriter.java?rev=1648849&r1=1648848&r2=1648849&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsWriter.java
(original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingTermVectorsWriter.java
Thu Jan  1 14:57:06 2015
@@ -68,7 +68,7 @@ public final class CompressingTermVector
   static final int VERSION_START = 0;
   static final int VERSION_CURRENT = VERSION_START;
 
-  static final int BLOCK_SIZE = 64;
+  static final int PACKED_BLOCK_SIZE = 64;
 
   static final int POSITIONS = 0x01;
   static final int   OFFSETS = 0x02;
@@ -204,7 +204,7 @@ public final class CompressingTermVector
 
   /** Sole constructor. */
   public CompressingTermVectorsWriter(Directory directory, SegmentInfo si, String segmentSuffix,
IOContext context,
-      String formatName, CompressionMode compressionMode, int chunkSize) throws IOException
{
+      String formatName, CompressionMode compressionMode, int chunkSize, int blockSize) throws
IOException {
     assert directory != null;
     this.directory = directory;
     this.segment = si.name;
@@ -233,12 +233,12 @@ public final class CompressingTermVector
       assert CodecUtil.indexHeaderLength(codecNameDat, segmentSuffix) == vectorsStream.getFilePointer();
       assert CodecUtil.indexHeaderLength(codecNameIdx, segmentSuffix) == indexStream.getFilePointer();
 
-      indexWriter = new CompressingStoredFieldsIndexWriter(indexStream);
+      indexWriter = new CompressingStoredFieldsIndexWriter(indexStream, blockSize);
       indexStream = null;
 
       vectorsStream.writeVInt(PackedInts.VERSION_CURRENT);
       vectorsStream.writeVInt(chunkSize);
-      writer = new BlockPackedWriter(vectorsStream, BLOCK_SIZE);
+      writer = new BlockPackedWriter(vectorsStream, PACKED_BLOCK_SIZE);
 
       positionsBuf = new int[1024];
       startOffsetsBuf = new int[1024];

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50StoredFieldsFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50StoredFieldsFormat.java?rev=1648849&r1=1648848&r2=1648849&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50StoredFieldsFormat.java
(original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50StoredFieldsFormat.java
Thu Jan  1 14:57:06 2015
@@ -182,9 +182,9 @@ public final class Lucene50StoredFieldsF
   StoredFieldsFormat impl(Mode mode) {
     switch (mode) {
       case BEST_SPEED: 
-        return new CompressingStoredFieldsFormat("Lucene50StoredFieldsFast", CompressionMode.FAST,
1 << 14, 128);
+        return new CompressingStoredFieldsFormat("Lucene50StoredFieldsFast", CompressionMode.FAST,
1 << 14, 128, 1024);
       case BEST_COMPRESSION: 
-        return new CompressingStoredFieldsFormat("Lucene50StoredFieldsHigh", CompressionMode.HIGH_COMPRESSION,
61440, 512);
+        return new CompressingStoredFieldsFormat("Lucene50StoredFieldsHigh", CompressionMode.HIGH_COMPRESSION,
61440, 512, 1024);
       default: throw new AssertionError();
     }
   }

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50TermVectorsFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50TermVectorsFormat.java?rev=1648849&r1=1648848&r2=1648849&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50TermVectorsFormat.java
(original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50TermVectorsFormat.java
Thu Jan  1 14:57:06 2015
@@ -125,7 +125,7 @@ public final class Lucene50TermVectorsFo
 
   /** Sole constructor. */
   public Lucene50TermVectorsFormat() {
-    super("Lucene50TermVectors", "", CompressionMode.FAST, 1 << 12);
+    super("Lucene50TermVectors", "", CompressionMode.FAST, 1 << 12, 1024);
   }
 
 }

Modified: lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/CompressingCodec.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/CompressingCodec.java?rev=1648849&r1=1648848&r2=1648849&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/CompressingCodec.java
(original)
+++ lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/CompressingCodec.java
Thu Jan  1 14:57:06 2015
@@ -36,16 +36,16 @@ public abstract class CompressingCodec e
   /**
    * Create a random instance.
    */
-  public static CompressingCodec randomInstance(Random random, int chunkSize, int maxDocsPerChunk,
boolean withSegmentSuffix) {
+  public static CompressingCodec randomInstance(Random random, int chunkSize, int maxDocsPerChunk,
boolean withSegmentSuffix, int blockSize) {
     switch (random.nextInt(4)) {
     case 0:
-      return new FastCompressingCodec(chunkSize, maxDocsPerChunk, withSegmentSuffix);
+      return new FastCompressingCodec(chunkSize, maxDocsPerChunk, withSegmentSuffix, blockSize);
     case 1:
-      return new FastDecompressionCompressingCodec(chunkSize, maxDocsPerChunk, withSegmentSuffix);
+      return new FastDecompressionCompressingCodec(chunkSize, maxDocsPerChunk, withSegmentSuffix,
blockSize);
     case 2:
-      return new HighCompressionCompressingCodec(chunkSize, maxDocsPerChunk, withSegmentSuffix);
+      return new HighCompressionCompressingCodec(chunkSize, maxDocsPerChunk, withSegmentSuffix,
blockSize);
     case 3:
-      return new DummyCompressingCodec(chunkSize, maxDocsPerChunk, withSegmentSuffix);
+      return new DummyCompressingCodec(chunkSize, maxDocsPerChunk, withSegmentSuffix, blockSize);
     default:
       throw new AssertionError();
     }
@@ -58,14 +58,19 @@ public abstract class CompressingCodec e
   public static CompressingCodec randomInstance(Random random) {
     final int chunkSize = random.nextBoolean() ? RandomInts.randomIntBetween(random, 1, 10)
: RandomInts.randomIntBetween(random, 1, 1 << 15);
     final int chunkDocs = random.nextBoolean() ? RandomInts.randomIntBetween(random, 1, 10)
: RandomInts.randomIntBetween(random, 64, 1024);
-    return randomInstance(random, chunkSize, chunkDocs, false);
+    final int blockSize = random.nextBoolean() ? RandomInts.randomIntBetween(random, 1, 10)
: RandomInts.randomIntBetween(random, 1, 1024);
+    return randomInstance(random, chunkSize, chunkDocs, false, blockSize);
   }
   
   /**
    * Creates a random {@link CompressingCodec} that is using a segment suffix
    */
   public static CompressingCodec randomInstance(Random random, boolean withSegmentSuffix)
{
-    return randomInstance(random, RandomInts.randomIntBetween(random, 1, 1 << 15),
RandomInts.randomIntBetween(random, 64, 1024), withSegmentSuffix);
+    return randomInstance(random, 
+                          RandomInts.randomIntBetween(random, 1, 1 << 15), 
+                          RandomInts.randomIntBetween(random, 64, 1024), 
+                          withSegmentSuffix,
+                          RandomInts.randomIntBetween(random, 1, 1024));
   }
 
   private final CompressingStoredFieldsFormat storedFieldsFormat;
@@ -74,17 +79,17 @@ public abstract class CompressingCodec e
   /**
    * Creates a compressing codec with a given segment suffix
    */
-  public CompressingCodec(String name, String segmentSuffix, CompressionMode compressionMode,
int chunkSize, int maxDocsPerChunk) {
+  public CompressingCodec(String name, String segmentSuffix, CompressionMode compressionMode,
int chunkSize, int maxDocsPerChunk, int blockSize) {
     super(name, TestUtil.getDefaultCodec());
-    this.storedFieldsFormat = new CompressingStoredFieldsFormat(name, segmentSuffix, compressionMode,
chunkSize, maxDocsPerChunk);
-    this.termVectorsFormat = new CompressingTermVectorsFormat(name, segmentSuffix, compressionMode,
chunkSize);
+    this.storedFieldsFormat = new CompressingStoredFieldsFormat(name, segmentSuffix, compressionMode,
chunkSize, maxDocsPerChunk, blockSize);
+    this.termVectorsFormat = new CompressingTermVectorsFormat(name, segmentSuffix, compressionMode,
chunkSize, blockSize);
   }
   
   /**
    * Creates a compressing codec with an empty segment suffix
    */
-  public CompressingCodec(String name, CompressionMode compressionMode, int chunkSize, int
maxDocsPerChunk) {
-    this(name, "", compressionMode, chunkSize, maxDocsPerChunk);
+  public CompressingCodec(String name, CompressionMode compressionMode, int chunkSize, int
maxDocsPerChunk, int blockSize) {
+    this(name, "", compressionMode, chunkSize, maxDocsPerChunk, blockSize);
   }
 
   @Override

Modified: lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/FastCompressingCodec.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/FastCompressingCodec.java?rev=1648849&r1=1648848&r2=1648849&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/FastCompressingCodec.java
(original)
+++ lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/FastCompressingCodec.java
Thu Jan  1 14:57:06 2015
@@ -21,14 +21,14 @@ package org.apache.lucene.codecs.compres
 public class FastCompressingCodec extends CompressingCodec {
 
   /** Constructor that allows to configure the chunk size. */
-  public FastCompressingCodec(int chunkSize, int maxDocsPerChunk, boolean withSegmentSuffix)
{
+  public FastCompressingCodec(int chunkSize, int maxDocsPerChunk, boolean withSegmentSuffix,
int blockSize) {
     super("FastCompressingStoredFields", 
           withSegmentSuffix ? "FastCompressingStoredFields" : "",
-          CompressionMode.FAST, chunkSize, maxDocsPerChunk);
+          CompressionMode.FAST, chunkSize, maxDocsPerChunk, blockSize);
   }
 
   /** Default constructor. */
   public FastCompressingCodec() {
-    this(1 << 14, 128, false);
+    this(1 << 14, 128, false, 1024);
   }
 }

Modified: lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/FastDecompressionCompressingCodec.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/FastDecompressionCompressingCodec.java?rev=1648849&r1=1648848&r2=1648849&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/FastDecompressionCompressingCodec.java
(original)
+++ lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/FastDecompressionCompressingCodec.java
Thu Jan  1 14:57:06 2015
@@ -21,14 +21,14 @@ package org.apache.lucene.codecs.compres
 public class FastDecompressionCompressingCodec extends CompressingCodec {
 
   /** Constructor that allows to configure the chunk size. */
-  public FastDecompressionCompressingCodec(int chunkSize, int maxDocsPerChunk, boolean withSegmentSuffix)
{
+  public FastDecompressionCompressingCodec(int chunkSize, int maxDocsPerChunk, boolean withSegmentSuffix,
int blockSize) {
     super("FastDecompressionCompressingStoredFields",
           withSegmentSuffix ? "FastDecompressionCompressingStoredFields" : "",
-          CompressionMode.FAST_DECOMPRESSION, chunkSize, maxDocsPerChunk);
+          CompressionMode.FAST_DECOMPRESSION, chunkSize, maxDocsPerChunk, blockSize);
   }
 
   /** Default constructor. */
   public FastDecompressionCompressingCodec() {
-    this(1 << 14, 256, false);
+    this(1 << 14, 256, false, 1024);
   }
 }

Modified: lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/HighCompressionCompressingCodec.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/HighCompressionCompressingCodec.java?rev=1648849&r1=1648848&r2=1648849&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/HighCompressionCompressingCodec.java
(original)
+++ lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/HighCompressionCompressingCodec.java
Thu Jan  1 14:57:06 2015
@@ -21,16 +21,16 @@ package org.apache.lucene.codecs.compres
 public class HighCompressionCompressingCodec extends CompressingCodec {
 
   /** Constructor that allows to configure the chunk size. */
-  public HighCompressionCompressingCodec(int chunkSize, int maxDocsPerChunk, boolean withSegmentSuffix)
{
+  public HighCompressionCompressingCodec(int chunkSize, int maxDocsPerChunk, boolean withSegmentSuffix,
int blockSize) {
     super("HighCompressionCompressingStoredFields",
           withSegmentSuffix ? "HighCompressionCompressingStoredFields" : "",
-          CompressionMode.HIGH_COMPRESSION, chunkSize, maxDocsPerChunk);
+          CompressionMode.HIGH_COMPRESSION, chunkSize, maxDocsPerChunk, blockSize);
   }
 
   /** Default constructor. */
   public HighCompressionCompressingCodec() {
     // we don't worry about zlib block overhead as it's
     // not bad and try to save space instead:
-    this(61440, 512, false);
+    this(61440, 512, false, 1024);
   }
 }

Modified: lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/dummy/DummyCompressingCodec.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/dummy/DummyCompressingCodec.java?rev=1648849&r1=1648848&r2=1648849&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/dummy/DummyCompressingCodec.java
(original)
+++ lucene/dev/trunk/lucene/test-framework/src/java/org/apache/lucene/codecs/compressing/dummy/DummyCompressingCodec.java
Thu Jan  1 14:57:06 2015
@@ -83,15 +83,15 @@ public class DummyCompressingCodec exten
   };
 
   /** Constructor that allows to configure the chunk size. */
-  public DummyCompressingCodec(int chunkSize, int maxDocsPerChunk, boolean withSegmentSuffix)
{
+  public DummyCompressingCodec(int chunkSize, int maxDocsPerChunk, boolean withSegmentSuffix,
int blockSize) {
     super("DummyCompressingStoredFields",
           withSegmentSuffix ? "DummyCompressingStoredFields" : "",
-          DUMMY, chunkSize, maxDocsPerChunk);
+          DUMMY, chunkSize, maxDocsPerChunk, blockSize);
   }
 
   /** Default constructor. */
   public DummyCompressingCodec() {
-    this(1 << 14, 128, false);
+    this(1 << 14, 128, false, 1024);
   }
 
 }



Mime
View raw message