public class HsMemoryDataSpiller extends Object implements AutoCloseable
Constructor and Description |
---|
HsMemoryDataSpiller(Path dataFilePath) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close this
HsMemoryDataSpiller when resultPartition is closed. |
void |
release()
Release this
HsMemoryDataSpiller when resultPartition is released. |
CompletableFuture<List<HsFileDataIndex.SpilledBuffer>> |
spillAsync(List<BufferWithIdentity> bufferToSpill)
Spilling buffers to disk asynchronously.
|
public HsMemoryDataSpiller(Path dataFilePath) throws IOException
IOException
public CompletableFuture<List<HsFileDataIndex.SpilledBuffer>> spillAsync(List<BufferWithIdentity> bufferToSpill)
bufferToSpill
- buffers need to be spilled, must ensure that it is sorted by
(subpartitionId, bufferIndex).public void close()
HsMemoryDataSpiller
when resultPartition is closed. It means spiller will
no longer accept new spilling operation.
This method only called by main task thread.
close
in interface AutoCloseable
public void release()
HsMemoryDataSpiller
when resultPartition is released. It means spiller
will wait for all previous spilling operation done blocking and close the file channel.
This method only called by rpc thread.
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.