public class RTreeGridRecordWriter<S extends Shape> extends GridRecordWriter<S>
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
fastRTree
Whether to use the fast mode for building RTree or not.
|
static Log |
LOG |
protected int |
maximumStorageOverhead
The maximum storage (in bytes) that can be accepted by the user
|
blockSize, cells, cellsMbr, closingThreads, ExpandedIndexes, fileSystem, intermediateCellPath, intermediateCellRecordCount, intermediateCellSize, intermediateCellStreams, jobConf, masterFile, NEW_LINE, outDir, pack, PackedIndexes, prefix, ReplicatedIndexes, stockObject, text| Constructor and Description |
|---|
RTreeGridRecordWriter(Path outDir,
JobConf job,
java.lang.String prefix,
CellInfo[] cells)
Initializes a new RTreeGridRecordWriter.
|
| Modifier and Type | Method and Description |
|---|---|
protected Path |
flushAllEntries(Path intermediateCellPath,
java.io.OutputStream intermediateCellStream,
Path finalCellPath)
Closes a cell by writing all outstanding objects and closing current file.
|
protected java.io.OutputStream |
getIntermediateCellStream(int cellIndex)
Returns an output stream in which records are written as they come before
they are finally flushed to the cell file.
|
protected void |
writeInternal(int cellIndex,
S shape)
Write the given shape to the cellIndex indicated.
|
close, closeCell, closeCellBackground, createFinalCellStream, getFilePath, getFinalCellPath, getMasterFilePath, setStockObject, writepublic static final Log LOG
protected boolean fastRTree
protected int maximumStorageOverhead
public RTreeGridRecordWriter(Path outDir,
JobConf job,
java.lang.String prefix,
CellInfo[] cells)
throws java.io.IOException
fileSystem - - of output fileoutDir - - output file pathcells - - the cells used to partition the inputoverwrite - - whether to overwrite existing files or notjava.io.IOExceptionprotected void writeInternal(int cellIndex,
S shape)
throws java.io.IOException
GridRecordWriterwriteInternal in class GridRecordWriter<S extends Shape>java.io.IOExceptionprotected Path flushAllEntries(Path intermediateCellPath,
java.io.OutputStream intermediateCellStream,
Path finalCellPath)
throws java.io.IOException
flushAllEntries in class GridRecordWriter<S extends Shape>java.io.IOExceptionprotected java.io.OutputStream getIntermediateCellStream(int cellIndex)
throws java.io.IOException
GridRecordWritergetIntermediateCellStream in class GridRecordWriter<S extends Shape>java.io.IOException