@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 |
|---|---|
BackupStatus |
backup(BackupPRequest request,
StateLockOptions stateLockOptions)
Takes a backup.
|
java.lang.String |
checkpoint()
Creates a checkpoint in the primary master journal system.
|
BackupStatus |
getBackupStatus(BackupStatusPRequest statusPRequest)
Used to query the status of a backup.
|
CheckpointName |
getCheckpointName() |
java.lang.String |
getClusterID() |
ConfigCheckReport |
getConfigCheckReport() |
ConfigHash |
getConfigHash() |
Configuration |
getConfiguration(GetConfigurationPOptions options) |
java.util.Set<java.lang.Class<? extends Server>> |
getDependencies() |
CloseableIterator<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 |
setNewerVersionAvailable(boolean available)
Sets whether newer version Alluxio is available.
|
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 BackupStatus backup(BackupPRequest request, StateLockOptions stateLockOptions) throws AlluxioException
BackupOpsBackupOps.getBackupStatus(alluxio.grpc.BackupStatusPRequest) should be called
for querying the status of the on-going backup.
Note: When leader has no secondary in an HA cluster, it will reject backup. This could be
allowed by passing "AllowLeader" option in the request.backup in interface BackupOpsrequest - the backup requeststateLockOptions - the state lock options during the backupAlluxioExceptionpublic BackupStatus getBackupStatus(BackupStatusPRequest statusPRequest) throws AlluxioException
BackupOpsgetBackupStatus in interface BackupOpsstatusPRequest - status requestAlluxioExceptionpublic 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 void setNewerVersionAvailable(boolean available)
MetaMastersetNewerVersionAvailable in interface MetaMasteravailable - new version is availablepublic 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 CloseableIterator<Journal.JournalEntry> getJournalEntryIterator()
getJournalEntryIterator in interface JournalEntryIterablepublic boolean processJournalEntry(Journal.JournalEntry entry)
processJournalEntry in interface Journaledpublic void resetState()
resetState in interface JournaledCopyright © 2020. All Rights Reserved.