@NotThreadSafe public class FileSingleStreamSpiller extends Object implements SingleStreamSpiller
| Constructor and Description |
|---|
FileSingleStreamSpiller(PagesSerde serde,
com.google.common.util.concurrent.ListeningExecutorService executor,
Path spillPath,
SpillerStats spillerStats,
SpillContext spillContext,
LocalMemoryContext memoryContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close releases/removes all underlying resources used during spilling
like for example all created temporary files.
|
com.google.common.util.concurrent.ListenableFuture<List<Page>> |
getAllSpilledPages()
Initiates read of previously spilled pages.
|
Iterator<Page> |
getSpilledPages()
Returns list of previously spilled Pages as a single stream.
|
long |
getSpilledPagesInMemorySize()
Returns estimate size of pages that would be returned by
SingleStreamSpiller.getAllSpilledPages(). |
com.google.common.util.concurrent.ListenableFuture<?> |
spill(Iterator<Page> pageIterator)
Initiate spilling of pages stream.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitspillpublic FileSingleStreamSpiller(PagesSerde serde, com.google.common.util.concurrent.ListeningExecutorService executor, Path spillPath, SpillerStats spillerStats, SpillContext spillContext, LocalMemoryContext memoryContext)
public com.google.common.util.concurrent.ListenableFuture<?> spill(Iterator<Page> pageIterator)
SingleStreamSpillerspill in interface SingleStreamSpillerpublic long getSpilledPagesInMemorySize()
SingleStreamSpillerSingleStreamSpiller.getAllSpilledPages().getSpilledPagesInMemorySize in interface SingleStreamSpillerpublic Iterator<Page> getSpilledPages()
SingleStreamSpillergetSpilledPages in interface SingleStreamSpillerpublic com.google.common.util.concurrent.ListenableFuture<List<Page>> getAllSpilledPages()
SingleStreamSpillerFuture will be complete once all pages are read.getAllSpilledPages in interface SingleStreamSpillerpublic void close()
SingleStreamSpillerclose in interface SingleStreamSpillerclose in interface Closeableclose in interface AutoCloseableCopyright © 2012–2019. All rights reserved.