@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 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() |
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
applyAndJournal, processJournalEntry, resetState, restoreFromCheckpoint, writeToCheckpoint
getCheckpointName
getJournalEntryIterator
getName, getServices
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
Copyright © 2023. All Rights Reserved.