@ThreadSafe public class DefaultKeyValueMaster extends AbstractMaster implements KeyValueMaster
AbstractMaster.MasterJournalContextmClock| 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.
|
java.util.Set<java.lang.Class<? extends Server>> |
getDependencies() |
java.util.Iterator<Journal.JournalEntry> |
getJournalEntryIterator() |
java.lang.String |
getName() |
java.util.List<PartitionInfo> |
getPartitionInfo(AlluxioURI path)
Gets a list of partitions of a given key-value store.
|
java.util.Map<java.lang.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) |
void |
renameStore(AlluxioURI oldUri,
AlluxioURI newUri)
Renames one completed key-value store.
|
void |
resetState() |
void |
start(java.lang.Boolean isLeader) |
appendJournalEntry, createJournalContext, flushJournal, getExecutorService, stop, writeJournalEntrypublic java.util.Map<java.lang.String,org.apache.thrift.TProcessor> getServices()
getServices in interface Server<java.lang.Boolean>public java.lang.String getName()
getName in interface JournalEntryStateMachinegetName in interface Server<java.lang.Boolean>public java.util.Set<java.lang.Class<? extends Server>> getDependencies()
getDependencies in interface Server<java.lang.Boolean>getDependencies in class AbstractMasterpublic void processJournalEntry(Journal.JournalEntry entry) throws java.io.IOException
processJournalEntry in interface JournalEntryStateMachinejava.io.IOExceptionpublic void resetState()
resetState in interface JournalEntryStateMachinepublic java.util.Iterator<Journal.JournalEntry> getJournalEntryIterator()
getJournalEntryIterator in interface JournalEntryIterablepublic void start(java.lang.Boolean isLeader)
throws java.io.IOException
start in interface Server<java.lang.Boolean>start in class AbstractMasterjava.io.IOExceptionpublic void completePartition(AlluxioURI path, PartitionInfo info) throws AccessControlException, FileDoesNotExistException, InvalidPathException
KeyValueMastercompletePartition in interface KeyValueMasterpath - 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 invalidpublic void completeStore(AlluxioURI path) throws FileDoesNotExistException, InvalidPathException, AccessControlException
KeyValueMastercompleteStore in interface KeyValueMasterpath - URI of the key-value storeFileDoesNotExistException - if the key-value store URI does not existsInvalidPathException - if the path is not validAccessControlException - if permission checking failspublic void createStore(AlluxioURI path) throws FileAlreadyExistsException, InvalidPathException, AccessControlException
KeyValueMastercreateStore in interface KeyValueMasterpath - URI of the key-value storeFileAlreadyExistsException - if a key-value store URI existsInvalidPathException - if the given path is invalidAccessControlException - if permission checking failspublic void deleteStore(AlluxioURI uri) throws java.io.IOException, InvalidPathException, FileDoesNotExistException, AlluxioException
KeyValueMasterdeleteStore in interface KeyValueMasteruri - AlluxioURI to the storeInvalidPathException - if the uri exists but is not a key-value storeFileDoesNotExistException - if the uri does not existjava.io.IOExceptionAlluxioExceptionpublic void renameStore(AlluxioURI oldUri, AlluxioURI newUri) throws java.io.IOException, AlluxioException
KeyValueMasterrenameStore in interface KeyValueMasteroldUri - the old AlluxioURI to the storenewUri - the AlluxioURI to the storejava.io.IOExceptionAlluxioExceptionpublic void mergeStore(AlluxioURI fromUri, AlluxioURI toUri) throws java.io.IOException, FileDoesNotExistException, InvalidPathException, AlluxioException
KeyValueMastermergeStore in interface KeyValueMasterfromUri - 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 storejava.io.IOExceptionAlluxioExceptionpublic java.util.List<PartitionInfo> getPartitionInfo(AlluxioURI path) throws FileDoesNotExistException, AccessControlException, InvalidPathException
KeyValueMastergetPartitionInfo in interface KeyValueMasterpath - URI of the key-value storeFileDoesNotExistException - if the key-value store URI does not existsAccessControlException - if permission checking failsInvalidPathException - if the path is invalidCopyright © 2017. All Rights Reserved.