@ThreadSafe public class DefaultKeyValueMaster extends AbstractMaster implements KeyValueMaster
mBackupManager, mClock, mPauseStateLock, mSafeModeManager, mStateChangeLock
Modifier and Type | Method and Description |
---|---|
void |
completePartition(AlluxioURI path,
PartitionInfo info)
Marks a partition complete and adds it to an incomplete key-value store.
|
void |
completeStore(AlluxioURI path)
Marks a key-value store complete.
|
void |
createStore(AlluxioURI path)
Creates a new key-value store.
|
void |
deleteStore(AlluxioURI uri)
Deletes a completed key-value store.
|
Set<Class<? extends Server>> |
getDependencies() |
Iterator<Journal.JournalEntry> |
getJournalEntryIterator() |
String |
getName() |
List<PartitionInfo> |
getPartitionInfo(AlluxioURI path)
Gets a list of partitions of a given key-value store.
|
Map<String,org.apache.thrift.TProcessor> |
getServices() |
void |
mergeStore(AlluxioURI fromUri,
AlluxioURI toUri)
Merges one completed key-value store to another completed key-value store.
|
void |
processJournalEntry(Journal.JournalEntry entry)
Applies a journal entry to the state machine.
|
void |
renameStore(AlluxioURI oldUri,
AlluxioURI newUri)
Renames one completed key-value store.
|
void |
resetState()
Resets the journaled internal state of the state machine.
|
void |
start(Boolean isLeader)
Starts the Alluxio server.
|
createJournalContext, getExecutorService, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createJournalContext
public Map<String,org.apache.thrift.TProcessor> getServices()
getServices
in interface Server<Boolean>
TProcessor
s that serve RPCs for this serverpublic String getName()
getName
in interface JournalEntryStateMachine
getName
in interface Server<Boolean>
public Set<Class<? extends Server>> getDependencies()
getDependencies
in interface Server<Boolean>
getDependencies
in class AbstractMaster
public void processJournalEntry(Journal.JournalEntry entry) throws IOException
JournalEntryStateMachine
processJournalEntry
in interface JournalEntryStateMachine
entry
- the entry to process to update the state of the state machineIOException
public void resetState()
JournalEntryStateMachine
resetState
in interface JournalEntryStateMachine
public Iterator<Journal.JournalEntry> getJournalEntryIterator()
getJournalEntryIterator
in interface JournalEntryIterable
Iterator
that iterates all the journal entriespublic void start(Boolean isLeader) throws IOException
Server
start
in interface Server<Boolean>
start
in class AbstractMaster
isLeader
- the start optionsIOException
public void completePartition(AlluxioURI path, PartitionInfo info) throws AccessControlException, FileDoesNotExistException, InvalidPathException, UnavailableException
KeyValueMaster
completePartition
in interface KeyValueMaster
path
- URI of the key-value storeinfo
- information of this completed partitionAccessControlException
- if permission checking failsFileDoesNotExistException
- if the key-value store URI does not existsInvalidPathException
- if the path is invalidUnavailableException
public void completeStore(AlluxioURI path) throws FileDoesNotExistException, InvalidPathException, AccessControlException, UnavailableException
KeyValueMaster
completeStore
in interface KeyValueMaster
path
- URI of the key-value storeFileDoesNotExistException
- if the key-value store URI does not existsInvalidPathException
- if the path is not validAccessControlException
- if permission checking failsUnavailableException
public void createStore(AlluxioURI path) throws FileAlreadyExistsException, InvalidPathException, AccessControlException, UnavailableException
KeyValueMaster
createStore
in interface KeyValueMaster
path
- URI of the key-value storeFileAlreadyExistsException
- if a key-value store URI existsInvalidPathException
- if the given path is invalidAccessControlException
- if permission checking failsUnavailableException
public void deleteStore(AlluxioURI uri) throws IOException, InvalidPathException, FileDoesNotExistException, AlluxioException
KeyValueMaster
deleteStore
in interface KeyValueMaster
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
KeyValueMaster
renameStore
in interface KeyValueMaster
oldUri
- the old AlluxioURI
to the storenewUri
- the AlluxioURI
to the storeIOException
AlluxioException
public void mergeStore(AlluxioURI fromUri, AlluxioURI toUri) throws IOException, FileDoesNotExistException, InvalidPathException, AlluxioException
KeyValueMaster
mergeStore
in interface KeyValueMaster
fromUri
- the AlluxioURI
to the store to be mergedtoUri
- the AlluxioURI
to the store to be merged toFileDoesNotExistException
- if the uri does not existInvalidPathException
- if the uri exists but is not a key-value storeIOException
AlluxioException
public List<PartitionInfo> getPartitionInfo(AlluxioURI path) throws FileDoesNotExistException, AccessControlException, InvalidPathException, UnavailableException
KeyValueMaster
getPartitionInfo
in interface KeyValueMaster
path
- URI of the key-value storeFileDoesNotExistException
- if the key-value store URI does not existsAccessControlException
- if permission checking failsInvalidPathException
- if the path is invalidUnavailableException
Copyright © 2023. All Rights Reserved.