@NotThreadSafe public abstract class AbstractMaster extends Object implements Master
Modifier and Type | Field and Description |
---|---|
protected java.time.Clock |
mClock
The clock to use for determining the time.
|
protected Journal |
mJournal
A handler to the journal for this master.
|
protected MasterContext |
mMasterContext
The context of Alluxio masters.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractMaster(MasterContext masterContext,
java.time.Clock clock,
ExecutorServiceFactory executorServiceFactory) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the server.
|
JournalContext |
createJournalContext() |
Set<Class<? extends Server>> |
getDependencies() |
protected ExecutorService |
getExecutorService() |
MasterContext |
getMasterContext() |
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
getStandbyServices
applyAndJournal, processJournalEntry, resetState, restoreFromCheckpoint, writeToCheckpoint
getCheckpointName, restoreFromCheckpoint, writeToCheckpoint
getJournalEntryIterator
getName, getServices
protected final Journal mJournal
protected final java.time.Clock mClock
protected final MasterContext mMasterContext
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
public void close() throws IOException
Server
close
in interface Server<Boolean>
IOException
public MasterContext getMasterContext()
getMasterContext
in interface Master
Copyright © 2023. All Rights Reserved.