@ThreadSafe public class LazyUfsBlockLocationCache extends java.lang.Object implements UfsBlockLocationCache
UfsBlockLocationCache.Factory| Constructor and Description |
|---|
LazyUfsBlockLocationCache(MountTable mountTable)
Creates a new instance of
UfsBlockLocationCache. |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
get(long blockId) |
java.util.List<java.lang.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)
UfsBlockLocationCacheinvalidate in interface UfsBlockLocationCacheblockId - the block IDpublic java.util.List<java.lang.String> get(long blockId)
get in interface UfsBlockLocationCacheblockId - the block ID@Nullable
public java.util.List<java.lang.String> get(long blockId,
AlluxioURI fileUri,
long offset)
UfsBlockLocationCachenull is returned and nothing is cached.get in interface UfsBlockLocationCacheblockId - the block IDfileUri - the URI of the file which contains the blockoffset - the block's offset in the fileCopyright © 2019. All Rights Reserved.