@PublicApi @ThreadSafe public final class BaseKeyValueSystem extends Object implements KeyValueSystem
KeyValueSystem
interface. Developers can extend this class
instead of implementing the interface. This implementation reads and writes key-value data
through BaseKeyValueStoreReader
and BaseKeyValueStoreWriter
.KeyValueSystem.Factory
Constructor and Description |
---|
BaseKeyValueSystem()
Constructs a new
BaseKeyValueSystem . |
Modifier and Type | Method and Description |
---|---|
KeyValueStoreWriter |
createStore(AlluxioURI uri)
Gets a writer to create a new key-value store.
|
void |
deleteStore(AlluxioURI uri)
Deletes a completed key-value store.
|
void |
mergeStore(AlluxioURI fromUri,
AlluxioURI toUri)
Merges one completed key-value store to another completed key-value store.
|
KeyValueStoreReader |
openStore(AlluxioURI uri)
Gets a reader to access a key-value store.
|
void |
renameStore(AlluxioURI oldUri,
AlluxioURI newUri)
Rename a completed key-value store.
|
public BaseKeyValueSystem()
BaseKeyValueSystem
.public KeyValueStoreReader openStore(AlluxioURI uri) throws IOException, AlluxioException
KeyValueSystem
openStore
in interface KeyValueSystem
uri
- AlluxioURI
to the storeBaseKeyValueStoreReader
instanceIOException
AlluxioException
public KeyValueStoreWriter createStore(AlluxioURI uri) throws IOException, AlluxioException
KeyValueSystem
createStore
in interface KeyValueSystem
uri
- AlluxioURI
to the storeBaseKeyValueStoreWriter
instanceIOException
AlluxioException
public void deleteStore(AlluxioURI uri) throws IOException, InvalidPathException, FileDoesNotExistException, AlluxioException
KeyValueSystem
deleteStore
in interface KeyValueSystem
uri
- AlluxioURI
to the storeInvalidPathException
- if the uri exists but is not a key-value storeFileDoesNotExistException
- if the uri does not existIOException
AlluxioException
public void renameStore(AlluxioURI oldUri, AlluxioURI newUri) throws IOException, AlluxioException
KeyValueSystem
renameStore
in interface KeyValueSystem
oldUri
- the old AlluxioURI
to the storenewUri
- the new AlluxioURI
to the storeIOException
AlluxioException
public void mergeStore(AlluxioURI fromUri, AlluxioURI toUri) throws IOException, AlluxioException
KeyValueSystem
mergeStore
in interface KeyValueSystem
fromUri
- the AlluxioURI
to the store to be mergedtoUri
- the AlluxioURI
to the store to be merged toIOException
AlluxioException
Copyright © 2023. All Rights Reserved.