public class SpilledRun extends BatchGroup
Starts out with no current batch. Defines the current batch to be the (shell: schema without data) of the last batch spilled to disk.
When reading, has destructive read-once behavior: closing the batch (after reading) deletes the underlying spill file.
This single class does three tasks: load data, hold data and read data. This should be split into three separate classes. But, the original (combined) structure is retained for expedience at present.
currentContainer, mergeIndex, schema| Constructor and Description |
|---|
SpilledRun(SpillSet spillSet,
String path,
BufferAllocator allocator) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close resources owned by this batch group.
|
void |
closeWriter() |
long |
getBatchSize() |
int |
getNextIndex() |
String |
getPath() |
void |
setBatchSize(long batchSize) |
void |
spillBatch(VectorContainer newContainer) |
closeAll, getContainer, getRecordCount, getSchema, getSelectionVector2, getSelectionVector4, getUnfilteredRecordCount, getValueAccessorById, getValueVectorId, iterator, setSchemaclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic SpilledRun(SpillSet spillSet, String path, BufferAllocator allocator) throws IOException
IOExceptionpublic void spillBatch(VectorContainer newContainer) throws IOException
IOExceptionpublic void setBatchSize(long batchSize)
public long getBatchSize()
public String getPath()
public int getNextIndex()
getNextIndex in class BatchGrouppublic void close()
throws IOException
close in interface AutoCloseableclose in class BatchGroupIOExceptionpublic void closeWriter()
throws IOException
IOExceptionCopyright © 2021 The Apache Software Foundation. All rights reserved.