@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,
Optional<SpillCipher> spillCipher) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close releases/removes all underlying resources used during spilling
like for example all created temporary files.
|
void |
commit()
Commit the spill file.
|
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, wait
spill
public FileSingleStreamSpiller(PagesSerde serde, com.google.common.util.concurrent.ListeningExecutorService executor, Path spillPath, SpillerStats spillerStats, SpillContext spillContext, LocalMemoryContext memoryContext, Optional<SpillCipher> spillCipher)
public com.google.common.util.concurrent.ListenableFuture<?> spill(Iterator<Page> pageIterator)
SingleStreamSpiller
spill
in interface SingleStreamSpiller
public long getSpilledPagesInMemorySize()
SingleStreamSpiller
SingleStreamSpiller.getAllSpilledPages()
.getSpilledPagesInMemorySize
in interface SingleStreamSpiller
public Iterator<Page> getSpilledPages()
SingleStreamSpiller
getSpilledPages
in interface SingleStreamSpiller
public com.google.common.util.concurrent.ListenableFuture<List<Page>> getAllSpilledPages()
SingleStreamSpiller
Future
will be complete once all pages are read.getAllSpilledPages
in interface SingleStreamSpiller
public void commit()
SingleStreamSpiller
commit
in interface SingleStreamSpiller
public void close()
SingleStreamSpiller
close
in interface SingleStreamSpiller
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2012–2022. All rights reserved.