@NotThreadSafe public final class DefaultMetaMaster extends CoreMaster implements MetaMaster
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultMetaMaster.State
Journaled state for MetaMaster.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
INVALID_CLUSTER_ID
Value to be used for the cluster ID when not assigned.
|
mBackupManager, mJournalSystem, mPort, mSafeModeManager, mStartTimeMsmMasterContext| Modifier and Type | Method and Description |
|---|---|
BackupResponse |
backup(BackupPOptions options)
Backs up the master.
|
java.lang.String |
checkpoint()
Creates a checkpoint in the primary master journal system.
|
CheckpointName |
getCheckpointName() |
java.lang.String |
getClusterID() |
ConfigCheckReport |
getConfigCheckReport() |
ConfigHash |
getConfigHash() |
Configuration |
getConfiguration(GetConfigurationPOptions options) |
java.util.Set<java.lang.Class<? extends Server>> |
getDependencies() |
java.util.Iterator<Journal.JournalEntry> |
getJournalEntryIterator() |
java.util.List<Address> |
getMasterAddresses() |
long |
getMasterId(Address address)
Returns a master id for the given master, creating one if the master is new.
|
java.lang.String |
getName() |
boolean |
getNewerVersionAvailable() |
java.net.InetSocketAddress |
getRpcAddress() |
java.util.Map<ServiceType,GrpcService> |
getServices() |
long |
getStartTimeMs() |
long |
getUptimeMs() |
int |
getWebPort() |
java.util.List<Address> |
getWorkerAddresses() |
boolean |
isInSafeMode() |
MetaCommand |
masterHeartbeat(long masterId)
A standby master periodically heartbeats with the leader master.
|
void |
masterRegister(long masterId,
RegisterMasterPOptions options)
A standby master registers with the leader master.
|
boolean |
processJournalEntry(Journal.JournalEntry entry) |
void |
removePathConfiguration(java.lang.String path)
Removes all properties for a path.
|
void |
removePathConfiguration(java.lang.String path,
java.util.Set<java.lang.String> keys)
Removes properties for a path.
|
void |
resetState() |
void |
setPathConfiguration(java.lang.String path,
java.util.Map<PropertyKey,java.lang.String> properties)
Sets properties for a path.
|
void |
start(java.lang.Boolean isPrimary) |
void |
stop() |
close, createJournalContext, getExecutorServiceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateJournalContextapplyAndJournal, restoreFromCheckpoint, writeToCheckpointpublic static final java.lang.String INVALID_CLUSTER_ID
public java.util.Map<ServiceType,GrpcService> getServices()
getServices in interface Server<java.lang.Boolean>public java.lang.String getName()
public java.util.Set<java.lang.Class<? extends Server>> getDependencies()
getDependencies in interface Server<java.lang.Boolean>getDependencies in class AbstractMasterpublic void start(java.lang.Boolean isPrimary)
throws java.io.IOException
start in interface Server<java.lang.Boolean>start in class AbstractMasterjava.io.IOExceptionpublic void stop()
throws java.io.IOException
stop in interface Server<java.lang.Boolean>stop in class AbstractMasterjava.io.IOExceptionpublic BackupResponse backup(BackupPOptions options) throws java.io.IOException
MetaMasterbackup in interface MetaMasteroptions - method optionsjava.io.IOExceptionpublic java.lang.String checkpoint()
throws java.io.IOException
MetaMastercheckpoint in interface MetaMasterjava.io.IOExceptionpublic ConfigCheckReport getConfigCheckReport()
getConfigCheckReport in interface MetaMasterpublic Configuration getConfiguration(GetConfigurationPOptions options)
getConfiguration in interface MetaMasteroptions - method optionspublic ConfigHash getConfigHash()
getConfigHash in interface MetaMasterpublic void setPathConfiguration(java.lang.String path,
java.util.Map<PropertyKey,java.lang.String> properties)
throws UnavailableException
MetaMastersetPathConfiguration in interface MetaMasterpath - the pathproperties - the properties for pathUnavailableExceptionpublic void removePathConfiguration(java.lang.String path,
java.util.Set<java.lang.String> keys)
throws UnavailableException
MetaMasterremovePathConfiguration in interface MetaMasterpath - the pathkeys - the property keysUnavailableExceptionpublic void removePathConfiguration(java.lang.String path)
throws UnavailableException
MetaMasterremovePathConfiguration in interface MetaMasterpath - the pathUnavailableExceptionpublic boolean getNewerVersionAvailable()
getNewerVersionAvailable in interface MetaMasterpublic java.util.List<Address> getMasterAddresses()
getMasterAddresses in interface MetaMasterpublic java.util.List<Address> getWorkerAddresses()
getWorkerAddresses in interface MetaMasterpublic long getMasterId(Address address)
MetaMastergetMasterId in interface MetaMasteraddress - the master hostnamepublic java.net.InetSocketAddress getRpcAddress()
getRpcAddress in interface MetaMasterpublic long getStartTimeMs()
getStartTimeMs in interface MetaMasterpublic long getUptimeMs()
getUptimeMs in interface MetaMasterpublic int getWebPort()
getWebPort in interface MetaMasterpublic boolean isInSafeMode()
isInSafeMode in interface MetaMasterpublic MetaCommand masterHeartbeat(long masterId)
MetaMastermasterHeartbeat in interface MetaMastermasterId - the master idpublic void masterRegister(long masterId,
RegisterMasterPOptions options)
throws NotFoundException
MetaMastermasterRegister in interface MetaMastermasterId - the master id of the standby master registeringoptions - the options that contains master configurationNotFoundException - if masterId cannot be foundpublic CheckpointName getCheckpointName()
getCheckpointName in interface Checkpointedpublic java.lang.String getClusterID()
getClusterID in interface MetaMasterpublic java.util.Iterator<Journal.JournalEntry> getJournalEntryIterator()
getJournalEntryIterator in interface JournalEntryIterablepublic boolean processJournalEntry(Journal.JournalEntry entry)
processJournalEntry in interface Journaledpublic void resetState()
resetState in interface JournaledCopyright © 2019. All Rights Reserved.