public class NonBlockingPhysicalFilePool extends PhysicalFilePool
PhysicalFilePool which will always provide usable physical file without
blocking. It may create many physical files if pollFile(FileMergingSnapshotManager.SubtaskKey,
CheckpointedStateScope) frequently.PhysicalFilePool.TypeexclusivePhysicalFilePool, maxFileSize, physicalFileCreator, sharedPhysicalFilePoolBySubtask| 构造器和说明 |
|---|
NonBlockingPhysicalFilePool(long maxFileSize,
PhysicalFile.PhysicalFileCreator physicalFileCreator) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 NonBlockingPhysicalFilePool(long maxFileSize,
PhysicalFile.PhysicalFileCreator physicalFileCreator)
public boolean tryPutFile(FileMergingSnapshotManager.SubtaskKey subtaskKey, PhysicalFile physicalFile)
PhysicalFilePooltryPutFile 在类中 PhysicalFilePoolsubtaskKey - the key of current subtask.physicalFile - target physical file.@Nonnull public PhysicalFile pollFile(FileMergingSnapshotManager.SubtaskKey subtaskKey, CheckpointedStateScope scope) throws IOException
PhysicalFilePoolpollFile 在类中 PhysicalFilePoolsubtaskKey - the key of current subtask.scope - the scope of the checkpoint.IOExceptionprotected Queue<PhysicalFile> createFileQueue()
PhysicalFilePoolcreateFileQueue 在类中 PhysicalFilePoolCopyright © 2014–2024 The Apache Software Foundation. All rights reserved.