@ThreadSafe public class RocksDBDoraMetaStore extends Object implements DoraMetaStore
Constructor and Description |
---|
RocksDBDoraMetaStore(String baseDir,
long metaTTL)
Creates and initializes a rocks block store.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears all the metadata in this RocksDB.
|
void |
close()
Closes the RocksDb and all resources.
|
Optional<DoraMeta.FileStatus> |
getDoraMeta(String path)
Queries the metadata for a file.
|
void |
putDoraMeta(String path,
DoraMeta.FileStatus meta)
Stores the metadata identified by URI of the file into this RocksDB.
|
void |
removeDoraMeta(String path)
Removes the metadata from the RocksDB.
|
Optional<Long> |
size()
Queries the estimated number of the records in this RocksDB.
|
public RocksDBDoraMetaStore(String baseDir, long metaTTL)
baseDir
- the base directory in which to store inode metadatametaTTL
- The TTL for this metastorepublic Optional<DoraMeta.FileStatus> getDoraMeta(String path)
getDoraMeta
in interface DoraMetaStore
path
- the full path of this filepublic void putDoraMeta(String path, DoraMeta.FileStatus meta)
putDoraMeta
in interface DoraMetaStore
path
- the full path of this filemeta
- the block metadatapublic void removeDoraMeta(String path)
removeDoraMeta
in interface DoraMetaStore
path
- the full path of the file whose metadata to be removedpublic void clear()
clear
in interface DoraMetaStore
public void close()
close
in interface DoraMetaStore
public Optional<Long> size()
size
in interface DoraMetaStore
Copyright © 2023. All Rights Reserved.