public class FSOMapFileLexiconOutputStream extends LexiconOutputStream<String>
Modifier and Type | Field and Description |
---|---|
protected IndexOnDisk |
index |
protected FixedSizeWriteableFactory<org.apache.hadoop.io.Text> |
keyFactory |
protected String |
leValueClassname |
protected FSOrderedMapFile.MapFileWriter |
mapFileWriter |
protected String |
structureName |
protected org.apache.hadoop.io.Text |
tempKey |
lexiconStream, numPointersWritten, numTermsWritten, numTokensWritten
Constructor and Description |
---|
FSOMapFileLexiconOutputStream(IndexOnDisk _index,
String _structureName,
Class<? extends FixedSizeWriteableFactory<LexiconEntry>> valueFactoryClass)
Construct an instance of the class with
|
FSOMapFileLexiconOutputStream(IndexOnDisk _index,
String _structureName,
FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory,
Class<? extends FixedSizeWriteableFactory<LexiconEntry>> valueFactoryClass)
Construct an instance of the class with
|
FSOMapFileLexiconOutputStream(IndexOnDisk _index,
String _structureName,
FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory,
String valueFactoryClassName)
Construct an instance of the class with
|
FSOMapFileLexiconOutputStream(String filename,
FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory)
Construct an instance of the class with
|
FSOMapFileLexiconOutputStream(String path,
String prefix,
String _structureName,
FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory)
Construct an instance of the class with
|
Modifier and Type | Method and Description |
---|---|
static void |
addLexiconToIndex(IndexOnDisk index,
String structureName,
String leValueClassname)
Adds Lexicon to index
|
void |
close()
Closes the lexicon stream.
|
int |
writeNextEntry(String _key,
LexiconEntry _value)
Writes a lexicon entry.
|
getNumberOfPointersWritten, getNumberOfTermsWritten, getNumberOfTokensWritten, incrementCounters
protected FixedSizeWriteableFactory<org.apache.hadoop.io.Text> keyFactory
protected org.apache.hadoop.io.Text tempKey
protected final FSOrderedMapFile.MapFileWriter mapFileWriter
protected IndexOnDisk index
protected String leValueClassname
protected final String structureName
public FSOMapFileLexiconOutputStream(String filename, FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory) throws IOException
filename
- _keyFactory
- IOException
public FSOMapFileLexiconOutputStream(String path, String prefix, String _structureName, FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory) throws IOException
path
- prefix
- _structureName
- _keyFactory
- IOException
public FSOMapFileLexiconOutputStream(IndexOnDisk _index, String _structureName, Class<? extends FixedSizeWriteableFactory<LexiconEntry>> valueFactoryClass) throws IOException
_index
- _structureName
- valueFactoryClass
- IOException
public FSOMapFileLexiconOutputStream(IndexOnDisk _index, String _structureName, FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory, Class<? extends FixedSizeWriteableFactory<LexiconEntry>> valueFactoryClass) throws IOException
_index
- _structureName
- _keyFactory
- valueFactoryClass
- IOException
public FSOMapFileLexiconOutputStream(IndexOnDisk _index, String _structureName, FixedSizeWriteableFactory<org.apache.hadoop.io.Text> _keyFactory, String valueFactoryClassName) throws IOException
_index
- _structureName
- _keyFactory
- valueFactoryClassName
- IOException
public int writeNextEntry(String _key, LexiconEntry _value) throws IOException
LexiconOutputStream
writeNextEntry
in class LexiconOutputStream<String>
_key
- the key - usually the term_value
- the lexicon entry valueIOException
- if an I/O error occurspublic void close()
LexiconOutputStream
close
in interface Closeable
close
in interface AutoCloseable
close
in class LexiconOutputStream<String>
public static void addLexiconToIndex(IndexOnDisk index, String structureName, String leValueClassname)
index
- structureName
- leValueClassname
- Terrier 4.0. Copyright © 2004-2014 University of Glasgow