@ThreadSafe public class CacheRequestManager extends Object
Constructor and Description |
---|
CacheRequestManager(ExecutorService service,
DefaultBlockWorker blockWorker,
FileSystemContext fsContext) |
Modifier and Type | Method and Description |
---|---|
RemoteBlockReader |
getRemoteBlockReader(long blockId,
long blockSize,
InetSocketAddress sourceAddress,
Protocol.OpenUfsBlockOptions openUfsBlockOptions)
only public to test since we want to mock remoteBlockReader.
|
void |
submitRequest(CacheRequest request)
Handles a request to cache a block.
|
public CacheRequestManager(ExecutorService service, DefaultBlockWorker blockWorker, FileSystemContext fsContext)
service
- thread pool to run the background caching workblockWorker
- handler to the block workerfsContext
- contextpublic void submitRequest(CacheRequest request) throws AlluxioException, IOException
request
- the cache request fields will be availableAlluxioException
IOException
public RemoteBlockReader getRemoteBlockReader(long blockId, long blockSize, InetSocketAddress sourceAddress, Protocol.OpenUfsBlockOptions openUfsBlockOptions)
blockId
- block IDblockSize
- block sizesourceAddress
- remote source addressopenUfsBlockOptions
- options to open the UFS fileCopyright © 2023. All Rights Reserved.