public class BlockingPhysicalFilePool extends PhysicalFilePool
PhysicalFilePool which may block when polling physical files. This class try
best to reuse a physical file until its size > maxFileSize.PhysicalFilePool.TypeexclusivePhysicalFilePool, maxFileSize, physicalFileCreator, sharedPhysicalFilePoolBySubtask| Constructor and Description |
|---|
BlockingPhysicalFilePool(long maxFileSize,
PhysicalFile.PhysicalFileCreator physicalFileCreator) |
| Modifier and Type | Method and Description |
|---|---|
protected Queue<PhysicalFile> |
createFileQueue()
Create and return a file queue.
|
PhysicalFile |
pollFile(FileMergingSnapshotManager.SubtaskKey subtaskKey,
CheckpointedStateScope scope)
Poll a physical file from the pool.
|
boolean |
tryPutFile(FileMergingSnapshotManager.SubtaskKey subtaskKey,
PhysicalFile physicalFile)
Try to put a physical file into file pool.
|
close, close, getFileQueue, isEmptypublic BlockingPhysicalFilePool(long maxFileSize,
PhysicalFile.PhysicalFileCreator physicalFileCreator)
public boolean tryPutFile(FileMergingSnapshotManager.SubtaskKey subtaskKey, PhysicalFile physicalFile) throws IOException
PhysicalFilePooltryPutFile in class PhysicalFilePoolsubtaskKey - the key of current subtask.physicalFile - target physical file.IOException@Nonnull public PhysicalFile pollFile(FileMergingSnapshotManager.SubtaskKey subtaskKey, CheckpointedStateScope scope) throws IOException
PhysicalFilePoolpollFile in class PhysicalFilePoolsubtaskKey - the key of current subtask.scope - the scope of the checkpoint.IOExceptionprotected Queue<PhysicalFile> createFileQueue()
PhysicalFilePoolcreateFileQueue in class PhysicalFilePoolCopyright © 2014–2025 The Apache Software Foundation. All rights reserved.