@NotThreadSafe public abstract class AbstractMaster extends Object implements Master
Modifier and Type | Field and Description |
---|---|
protected BackupManager |
mBackupManager
The manager for creating and restoring backups.
|
protected java.time.Clock |
mClock
The clock to use for determining the time.
|
protected Lock |
mPauseStateLock
A lock which prevents any changes to persistent (journaled) state.
|
protected SafeModeManager |
mSafeModeManager
The manager for safe mode state.
|
protected Lock |
mStateChangeLock
A lock which must be taken before modifying persistent (journaled) state.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractMaster(MasterContext masterContext,
java.time.Clock clock,
ExecutorServiceFactory executorServiceFactory) |
Modifier and Type | Method and Description |
---|---|
JournalContext |
createJournalContext() |
Set<Class<? extends Server>> |
getDependencies() |
protected ExecutorService |
getExecutorService() |
void |
start(Boolean isPrimary)
Starts the Alluxio server.
|
void |
stop()
Stops the Alluxio server.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName, processJournalEntry, resetState
getJournalEntryIterator
getName, getServices
protected final java.time.Clock mClock
protected final SafeModeManager mSafeModeManager
protected final BackupManager mBackupManager
protected final Lock mStateChangeLock
mPauseStateLock
.protected final Lock mPauseStateLock
mStateChangeLock
.protected AbstractMaster(MasterContext masterContext, java.time.Clock clock, ExecutorServiceFactory executorServiceFactory)
masterContext
- the context for Alluxio masterclock
- the Clock to use for determining the timeexecutorServiceFactory
- a factory for creating the executor service to use for
running maintenance threadspublic Set<Class<? extends Server>> getDependencies()
getDependencies
in interface Server<Boolean>
public void start(Boolean isPrimary) throws IOException
Server
start
in interface Server<Boolean>
isPrimary
- the start optionsIOException
public void stop() throws IOException
Server
#start(T)
should be
cleaned up and shutdown.stop
in interface Server<Boolean>
IOException
protected ExecutorService getExecutorService()
ExecutorService
for this masterpublic JournalContext createJournalContext() throws UnavailableException
createJournalContext
in interface Master
UnavailableException
Copyright © 2023. All Rights Reserved.