public class CompressingMetaIndexBuilder extends MetaIndexBuilder implements Flushable
Constructor and Description |
---|
CompressingMetaIndexBuilder(IndexOnDisk _index,
String[] _keyNames,
int[] _valueLens,
String[] _forwardKeys)
constructor
|
CompressingMetaIndexBuilder(IndexOnDisk _index,
String _structureName,
String[] _keyNames,
int[] _valueLens,
String[] _forwardKeys)
constructor
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
void |
writeDocumentEntry(Map<String,String> data)
Write out metadata for current document, extracted from specified map
Typically, the MetaIndexBuilder will know which keys from data that
it is interested in.
|
void |
writeDocumentEntry(String[] data)
Write out metadata for current document.
|
protected final org.slf4j.Logger logger
protected final int MAX_MB_IN_MEM_RETRIEVAL
protected final int MAX_INDEX_MB_IN_MEM_RETRIEVAL
protected final boolean REVERSE_ALLOW_DUPS
protected final boolean CROP_LONG
protected final int REVERSE_KEY_LOOKUP_WRITING_BUFFER_SIZE
protected final int DOCS_PER_CHECK
protected final int ZIP_COMPRESSION_LEVEL
protected final gnu.trove.TObjectIntHashMap<String> key2Index
protected DataOutputStream dataOutput
protected final String[] keyNames
protected final int keyCount
protected Deflater zip
protected ByteArrayOutputStream baos
protected DataOutputStream indexOutput
protected byte[] compressedBuffer
protected IndexOnDisk index
protected int[] valueLensChars
protected int[] valueLensBytes
protected byte[] spaces
protected int entryLengthBytes
protected long currentOffset
protected long currentIndexOffset
protected int entryCount
protected int[] forwardKeys
protected String[] forwardKeyNames
protected FSOrderedMapFile.MapFileWriter[] forwardWriters
protected boolean[] forwardKeyValuesSorted
protected String[] lastValues
protected MemoryChecker memCheck
protected FixedSizeWriteableFactory<org.apache.hadoop.io.Text>[] keyFactories
protected String structureName
public CompressingMetaIndexBuilder(IndexOnDisk _index, String[] _keyNames, int[] _valueLens, String[] _forwardKeys)
_index
- _keyNames
- _valueLens
- _forwardKeys
- public CompressingMetaIndexBuilder(IndexOnDisk _index, String _structureName, String[] _keyNames, int[] _valueLens, String[] _forwardKeys)
_index
- _structureName
- _keyNames
- _valueLens
- _forwardKeys
- public void writeDocumentEntry(Map<String,String> data) throws IOException
writeDocumentEntry
in class MetaIndexBuilder
IOException
public void writeDocumentEntry(String[] data) throws IOException
writeDocumentEntry
in class MetaIndexBuilder
IOException
public void flush() throws IOException
flush
in interface Flushable
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Terrier Information Retrieval Platform 5.1. Copyright © 2004-2019, University of Glasgow