public interface PageStoreDir
Modifier and Type | Field and Description |
---|---|
static org.slf4j.Logger |
LOG |
Modifier and Type | Method and Description |
---|---|
static void |
clear(Path rootPath)
Clear the dir.
|
void |
close()
Close the page store dir.
|
static PageStoreDir |
createPageStoreDir(AlluxioConfiguration conf,
PageStoreOptions pageStoreOptions)
Create an instance of PageStoreDir.
|
static List<PageStoreDir> |
createPageStoreDirs(AlluxioConfiguration conf)
Create a list of PageStoreDir based on the configuration.
|
long |
deletePage(PageInfo bytes) |
long |
getCachedBytes() |
long |
getCapacityBytes() |
CacheEvictor |
getEvictor() |
static String |
getFileBucket(int fileBuckets,
String fileId) |
PageStore |
getPageStore() |
Path |
getRootPath() |
boolean |
hasFile(String fileId) |
boolean |
putPage(PageInfo pageInfo) |
boolean |
putTempFile(String fileId) |
long |
release(int bytes)
Release the pre-reserved space.
|
boolean |
reserve(int bytes) |
void |
reset()
Reset page store.
|
void |
scanPages(java.util.function.Consumer<Optional<PageInfo>> pageInfoConsumer)
Scan the pages under this dir.
|
static List<PageStoreDir> createPageStoreDirs(AlluxioConfiguration conf) throws IOException
conf
- AlluxioConfigurationIOException
static PageStoreDir createPageStoreDir(AlluxioConfiguration conf, PageStoreOptions pageStoreOptions)
conf
- pageStoreOptions
- static String getFileBucket(int fileBuckets, String fileId)
fileBuckets
- number of bucketsfileId
- file idstatic void clear(Path rootPath) throws IOException
rootPath
- IOException
- when failed to clean up the specific locationPath getRootPath()
PageStore getPageStore()
long getCapacityBytes()
void reset() throws IOException
IOException
void scanPages(java.util.function.Consumer<Optional<PageInfo>> pageInfoConsumer) throws IOException
pageInfoConsumer
- IOException
long getCachedBytes()
boolean putPage(PageInfo pageInfo)
pageInfo
- boolean putTempFile(String fileId)
fileId
- boolean reserve(int bytes)
bytes
- long deletePage(PageInfo bytes)
bytes
- long release(int bytes)
bytes
- boolean hasFile(String fileId)
fileId
- CacheEvictor getEvictor()
void close()
Copyright © 2023. All Rights Reserved.