@ThreadSafe public class LazyUfsBlockLocationCache extends Object implements UfsBlockLocationCache
UfsBlockLocationCache.Factory
Constructor and Description |
---|
LazyUfsBlockLocationCache(MountTable mountTable)
Creates a new instance of
UfsBlockLocationCache . |
Modifier and Type | Method and Description |
---|---|
List<String> |
get(long blockId) |
List<String> |
get(long blockId,
AlluxioURI fileUri,
long offset)
If the locations exist in the cache, return them, otherwise, retrieves the block locations
from UFS, and caches the result.
|
void |
invalidate(long blockId)
Invalidates the UFS locations for the block.
|
public LazyUfsBlockLocationCache(MountTable mountTable)
UfsBlockLocationCache
.mountTable
- the mount tablepublic void invalidate(long blockId)
UfsBlockLocationCache
invalidate
in interface UfsBlockLocationCache
blockId
- the block IDpublic List<String> get(long blockId)
get
in interface UfsBlockLocationCache
blockId
- the block ID@Nullable public List<String> get(long blockId, AlluxioURI fileUri, long offset)
UfsBlockLocationCache
null
is returned and nothing is cached.get
in interface UfsBlockLocationCache
blockId
- the block IDfileUri
- the URI of the file which contains the blockoffset
- the block's offset in the fileCopyright © 2023. All Rights Reserved.