Package org.terrier.structures.indexing
Class CompressingMetaIndexBuilder
- java.lang.Object
-
- org.terrier.structures.indexing.MetaIndexBuilder
-
- org.terrier.structures.indexing.BaseMetaIndexBuilder
-
- org.terrier.structures.indexing.CompressingMetaIndexBuilder
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
public class CompressingMetaIndexBuilder extends BaseMetaIndexBuilder
Creates a metaindex structure that compresses all values using Deflate.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.zip.Deflater
zip
protected int
ZIP_COMPRESSION_LEVEL
-
Fields inherited from class org.terrier.structures.indexing.BaseMetaIndexBuilder
baos, compressedBuffer, CROP_LONG, currentIndexOffset, currentOffset, dataOutput, DOCS_PER_CHECK, entryCount, entryLengthBytes, index, indexOutput, key2Index, keyCount, keyFactories, keyNames, lastValues, logger, MAX_INDEX_MB_IN_MEM_RETRIEVAL, MAX_MB_IN_MEM_RETRIEVAL, memCheck, REVERSE_ALLOW_DUPS, REVERSE_KEY_LOOKUP_WRITING_BUFFER_SIZE, reverseKeyNames, reverseKeys, reverseWriters, spaces, structureClass, structureInputStreamClass, structureName, valueLensBytes, valueLensChars, valuesSorted
-
-
Constructor Summary
Constructors Constructor Description CompressingMetaIndexBuilder(IndexOnDisk _index, java.lang.String[] _keyNames, int[] _valueLens, java.lang.String[] _reverseKeys)
CompressingMetaIndexBuilder(IndexOnDisk _index, java.lang.String _structureName, java.lang.String[] _keyNames, int[] _valueLens, java.lang.String[] _reverseKeys)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
protected int
writeData(byte[] data)
-
Methods inherited from class org.terrier.structures.indexing.BaseMetaIndexBuilder
flush, writeDocumentEntry, writeDocumentEntry
-
Methods inherited from class org.terrier.structures.indexing.MetaIndexBuilder
create
-
-
-
-
Field Detail
-
zip
protected java.util.zip.Deflater zip
-
ZIP_COMPRESSION_LEVEL
protected final int ZIP_COMPRESSION_LEVEL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CompressingMetaIndexBuilder
public CompressingMetaIndexBuilder(IndexOnDisk _index, java.lang.String[] _keyNames, int[] _valueLens, java.lang.String[] _reverseKeys)
-
CompressingMetaIndexBuilder
public CompressingMetaIndexBuilder(IndexOnDisk _index, java.lang.String _structureName, java.lang.String[] _keyNames, int[] _valueLens, java.lang.String[] _reverseKeys)
-
-
Method Detail
-
writeData
protected int writeData(byte[] data) throws java.io.IOException
- Specified by:
writeData
in classBaseMetaIndexBuilder
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
Description copied from class:BaseMetaIndexBuilder
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classBaseMetaIndexBuilder
- Throws:
java.io.IOException
-
-