public static class FSOrderedMapFile.MultiFSOMapWriter extends Object implements FSOrderedMapFile.MapFileWriter, Flushable
| Modifier and Type | Field and Description |
|---|---|
protected FixedSizeWriteableFactory |
keyFactory |
protected FixedSizeWriteableFactory |
valueFactory |
| Constructor and Description |
|---|
FSOrderedMapFile.MultiFSOMapWriter(String filename,
int numberOfValuesInMemory,
FixedSizeWriteableFactory _keyFactory,
FixedSizeWriteableFactory _valueFactory)
Constructs an instance of the MultiFSOMapWriter.
|
FSOrderedMapFile.MultiFSOMapWriter(String filename,
int numberOfValuesInMemory,
FixedSizeWriteableFactory _keyFactory,
FixedSizeWriteableFactory _valueFactory,
boolean dupsAllows)
Constructs an instance of the MultiFSOMapWriter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
protected void |
flushCache() |
protected void |
mergeTwo(int id1,
int id2,
String filename) |
void |
write(org.apache.hadoop.io.WritableComparable key,
org.apache.hadoop.io.Writable value)
Add this (key, value) tuple to the MapFile
|
protected FixedSizeWriteableFactory keyFactory
protected FixedSizeWriteableFactory valueFactory
public FSOrderedMapFile.MultiFSOMapWriter(String filename, int numberOfValuesInMemory, FixedSizeWriteableFactory _keyFactory, FixedSizeWriteableFactory _valueFactory)
filename - numberOfValuesInMemory - _keyFactory - _valueFactory - public FSOrderedMapFile.MultiFSOMapWriter(String filename, int numberOfValuesInMemory, FixedSizeWriteableFactory _keyFactory, FixedSizeWriteableFactory _valueFactory, boolean dupsAllows)
filename - numberOfValuesInMemory - _keyFactory - _valueFactory - dupsAllows - are duplicates allowedpublic void write(org.apache.hadoop.io.WritableComparable key,
org.apache.hadoop.io.Writable value)
throws IOException
write in interface FSOrderedMapFile.MapFileWriterIOExceptionpublic void flush()
throws IOException
flush in interface FlushableIOExceptionprotected void flushCache()
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionprotected void mergeTwo(int id1,
int id2,
String filename)
throws IOException
IOExceptionTerrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow