@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 String |
INVALID_CLUSTER_ID
Value to be used for the cluster ID when not assigned.
|
mBackupManager, mJournalSystem, mPort, mSafeModeManager, mStartTimeMs
mMasterContext
Modifier and Type | Method and Description |
---|---|
BackupStatus |
backup(BackupPRequest request,
StateLockOptions stateLockOptions)
Takes a backup.
|
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() |
String |
getClusterID() |
ConfigCheckReport |
getConfigCheckReport() |
ConfigHash |
getConfigHash() |
Configuration |
getConfiguration(GetConfigurationPOptions 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() |
boolean |
getNewerVersionAvailable() |
InetSocketAddress |
getRpcAddress() |
Map<ServiceType,GrpcService> |
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,
RegisterMasterPOptions options)
A standby master registers with the leader master.
|
boolean |
processJournalEntry(Journal.JournalEntry entry)
Attempts to apply a journal entry.
|
void |
removePathConfiguration(String path)
Removes all properties for a path.
|
void |
removePathConfiguration(String path,
Set<String> keys)
Removes properties for a path.
|
void |
resetState()
Resets the object's journaled state.
|
void |
setNewerVersionAvailable(boolean available)
Sets whether newer version Alluxio is available.
|
void |
setPathConfiguration(String path,
Map<PropertyKey,String> properties)
Sets properties for a path.
|
void |
start(Boolean isPrimary)
Starts the Alluxio server.
|
void |
stop()
Stops the Alluxio server.
|
close, createJournalContext, getExecutorService
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createJournalContext
applyAndJournal, restoreFromCheckpoint, writeToCheckpoint
public static final String INVALID_CLUSTER_ID
public Map<ServiceType,GrpcService> getServices()
getServices
in interface Server<Boolean>
public String getName()
public Set<Class<? extends Server>> getDependencies()
getDependencies
in interface Server<Boolean>
getDependencies
in class AbstractMaster
public 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 BackupStatus backup(BackupPRequest request, StateLockOptions stateLockOptions) throws AlluxioException
BackupOps
BackupOps.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 BackupOps
request
- the backup requeststateLockOptions
- the state lock options during the backupAlluxioException
public BackupStatus getBackupStatus(BackupStatusPRequest statusPRequest) throws AlluxioException
BackupOps
getBackupStatus
in interface BackupOps
statusPRequest
- status requestAlluxioException
public String checkpoint() throws IOException
MetaMaster
checkpoint
in interface MetaMaster
IOException
public ConfigCheckReport getConfigCheckReport()
getConfigCheckReport
in interface MetaMaster
public Configuration getConfiguration(GetConfigurationPOptions options)
getConfiguration
in interface MetaMaster
options
- method optionspublic ConfigHash getConfigHash()
getConfigHash
in interface MetaMaster
public void setPathConfiguration(String path, Map<PropertyKey,String> properties) throws UnavailableException
MetaMaster
setPathConfiguration
in interface MetaMaster
path
- the pathproperties
- the properties for pathUnavailableException
public void removePathConfiguration(String path, Set<String> keys) throws UnavailableException
MetaMaster
removePathConfiguration
in interface MetaMaster
path
- the pathkeys
- the property keysUnavailableException
public void removePathConfiguration(String path) throws UnavailableException
MetaMaster
removePathConfiguration
in interface MetaMaster
path
- the pathUnavailableException
public void setNewerVersionAvailable(boolean available)
MetaMaster
setNewerVersionAvailable
in interface MetaMaster
available
- new version is availablepublic boolean getNewerVersionAvailable()
getNewerVersionAvailable
in interface MetaMaster
public 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, RegisterMasterPOptions 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 foundpublic CheckpointName getCheckpointName()
getCheckpointName
in interface Checkpointed
public String getClusterID()
getClusterID
in interface MetaMaster
public Iterator<Journal.JournalEntry> getJournalEntryIterator()
getJournalEntryIterator
in interface JournalEntryIterable
Iterator
that iterates all the journal entriespublic boolean processJournalEntry(Journal.JournalEntry entry)
Journaled
processJournalEntry
in interface Journaled
entry
- the entry to applypublic void resetState()
Journaled
resetState
in interface Journaled
Copyright © 2023. All Rights Reserved.