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 |
---|
MultiFSOMapWriter(String filename,
int numberOfValuesInMemory,
FixedSizeWriteableFactory _keyFactory,
FixedSizeWriteableFactory _valueFactory)
Constructs an instance of the MultiFSOMapWriter.
|
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 MultiFSOMapWriter(String filename, int numberOfValuesInMemory, FixedSizeWriteableFactory _keyFactory, FixedSizeWriteableFactory _valueFactory)
filename
- numberOfValuesInMemory
- _keyFactory
- _valueFactory
- public 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.MapFileWriter
IOException
public void flush() throws IOException
flush
in interface Flushable
IOException
protected void flushCache() throws IOException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
protected void mergeTwo(int id1, int id2, String filename) throws IOException
IOException
Terrier Information Retrieval Platform 5.1. Copyright © 2004-2019, University of Glasgow