public class BatchShuffleReadBufferPool extends Object
MemorySegment pool used by batch shuffle for shuffle data read (currently
only used by sort-merge blocking shuffle).| Constructor and Description |
|---|
BatchShuffleReadBufferPool(long totalBytes,
int bufferSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroys this buffer pool and after which, no buffer can be allocated any more.
|
int |
getAvailableBuffers() |
int |
getAverageBuffersPerRequester() |
int |
getBufferSize() |
long |
getLastBufferOperationTimestamp() |
int |
getMaxConcurrentRequests() |
int |
getNumBuffersPerRequest() |
int |
getNumTotalBuffers() |
void |
initialize()
Initializes this buffer pool which allocates all the buffers.
|
boolean |
isDestroyed() |
void |
recycle(Collection<org.apache.flink.core.memory.MemorySegment> segments)
Recycles a collection of buffers to this buffer pool.
|
void |
recycle(org.apache.flink.core.memory.MemorySegment segment)
Recycles the target buffer to this buffer pool.
|
void |
registerRequester(Object requester) |
List<org.apache.flink.core.memory.MemorySegment> |
requestBuffers()
Requests a collection of buffers (determined by
numBuffersPerRequest) from this
buffer pool. |
void |
unregisterRequester(Object requester) |
public BatchShuffleReadBufferPool(long totalBytes,
int bufferSize)
@VisibleForTesting public int getNumTotalBuffers()
@VisibleForTesting public int getAvailableBuffers()
public int getNumBuffersPerRequest()
public int getMaxConcurrentRequests()
public int getBufferSize()
public void initialize()
public void registerRequester(Object requester)
public void unregisterRequester(Object requester)
public int getAverageBuffersPerRequester()
public List<org.apache.flink.core.memory.MemorySegment> requestBuffers() throws Exception
numBuffersPerRequest) from this
buffer pool.Exceptionpublic void recycle(org.apache.flink.core.memory.MemorySegment segment)
public void recycle(Collection<org.apache.flink.core.memory.MemorySegment> segments)
public long getLastBufferOperationTimestamp()
public void destroy()
public boolean isDestroyed()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.