@NotThreadSafe public final class DefaultMetaMaster extends AbstractMaster implements MetaMaster
mBackupManager, mPauseStateLock, mStateChangeLock
Modifier and Type | Method and Description |
---|---|
BackupResponse |
backup(BackupOptions options)
Backs up the master.
|
ConfigCheckReport |
getConfigCheckReport() |
List<ConfigProperty> |
getConfiguration(GetConfigurationOptions options) |
Set<Class<? extends Server>> |
getDependencies() |
Iterator<Journal.JournalEntry> |
getJournalEntryIterator() |
List<Address> |
getMasterAddresses() |
long |
getMasterId(Address address)
Returns a master id for the given master, creating one if the master is new.
|
String |
getName() |
InetSocketAddress |
getRpcAddress() |
Map<String,org.apache.thrift.TProcessor> |
getServices() |
long |
getStartTimeMs() |
long |
getUptimeMs() |
int |
getWebPort() |
List<Address> |
getWorkerAddresses() |
boolean |
isInSafeMode() |
MetaCommand |
masterHeartbeat(long masterId)
A standby master periodically heartbeats with the leader master.
|
void |
masterRegister(long masterId,
RegisterMasterTOptions options)
A standby master registers with the leader master.
|
void |
processJournalEntry(Journal.JournalEntry entry)
Applies a journal entry to the state machine.
|
void |
resetState()
Resets the journaled internal state of the state machine.
|
void |
start(Boolean isPrimary)
Starts the Alluxio server.
|
void |
stop()
Stops the Alluxio server.
|
createJournalContext, getExecutorService
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 isPrimary) throws IOException
Server
start
in interface Server<Boolean>
start
in class AbstractMaster
isPrimary
- the start optionsIOException
public void stop() throws IOException
Server
#start(T)
should be
cleaned up and shutdown.stop
in interface Server<Boolean>
stop
in class AbstractMaster
IOException
public BackupResponse backup(BackupOptions options) throws IOException
MetaMaster
backup
in interface MetaMaster
options
- method optionsIOException
public ConfigCheckReport getConfigCheckReport()
getConfigCheckReport
in interface MetaMaster
public List<ConfigProperty> getConfiguration(GetConfigurationOptions options)
getConfiguration
in interface MetaMaster
options
- method optionspublic List<Address> getMasterAddresses()
getMasterAddresses
in interface MetaMaster
public List<Address> getWorkerAddresses()
getWorkerAddresses
in interface MetaMaster
public long getMasterId(Address address)
MetaMaster
getMasterId
in interface MetaMaster
address
- the master hostnamepublic InetSocketAddress getRpcAddress()
getRpcAddress
in interface MetaMaster
public long getStartTimeMs()
getStartTimeMs
in interface MetaMaster
public long getUptimeMs()
getUptimeMs
in interface MetaMaster
public int getWebPort()
getWebPort
in interface MetaMaster
public boolean isInSafeMode()
isInSafeMode
in interface MetaMaster
public MetaCommand masterHeartbeat(long masterId)
MetaMaster
masterHeartbeat
in interface MetaMaster
masterId
- the master idpublic void masterRegister(long masterId, RegisterMasterTOptions options) throws NotFoundException
MetaMaster
masterRegister
in interface MetaMaster
masterId
- the master id of the standby master registeringoptions
- the options that contains master configurationNotFoundException
- if masterId cannot be foundCopyright © 2023. All Rights Reserved.