@NotThreadSafe public final class FileDataManager extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FileDataManager.PersistedFilesInfo
Information about persisted files.
|
Constructor and Description |
---|
FileDataManager(BlockWorker blockWorker,
com.google.common.util.concurrent.RateLimiter persistenceRateLimiter,
UfsManager ufsManager)
Creates a new instance of
FileDataManager . |
Modifier and Type | Method and Description |
---|---|
void |
clearPersistedFiles(List<Long> persistedFiles)
Clears the given persisted files stored in
mPersistedUfsFingerprints . |
FileDataManager.PersistedFilesInfo |
getPersistedFileInfos() |
boolean |
isFilePersisted(long fileId)
Checks if the given file is persisted.
|
void |
lockBlocks(long fileId,
List<Long> blockIds)
Locks all the blocks of a given file Id.
|
boolean |
needPersistence(long fileId)
Checks if the given file needs persistence.
|
void |
persistFile(long fileId,
List<Long> blockIds)
Persists the blocks of a file into the under file system.
|
public FileDataManager(BlockWorker blockWorker, com.google.common.util.concurrent.RateLimiter persistenceRateLimiter, UfsManager ufsManager)
FileDataManager
.blockWorker
- the block worker handlepersistenceRateLimiter
- a per worker rate limiter to throttle async persistenceufsManager
- the ufs managerpublic boolean needPersistence(long fileId)
fileId
- the file idpublic boolean isFilePersisted(long fileId)
fileId
- the file idpublic void lockBlocks(long fileId, List<Long> blockIds) throws IOException
fileId
- the id of the fileblockIds
- the ids of the file's blocksIOException
public void persistFile(long fileId, List<Long> blockIds) throws AlluxioException, IOException
fileId
- the id of the fileblockIds
- the list of block idsAlluxioException
IOException
public FileDataManager.PersistedFilesInfo getPersistedFileInfos()
public void clearPersistedFiles(List<Long> persistedFiles)
mPersistedUfsFingerprints
.persistedFiles
- the list of persisted files to clearCopyright © 2023. All Rights Reserved.