@NotThreadSafe public class AlluxioMasterProcess extends MasterProcess
Modifier and Type | Class and Description |
---|---|
static class |
AlluxioMasterProcess.Factory
Factory for creating
AlluxioMasterProcess . |
Modifier and Type | Field and Description |
---|---|
protected CoreMasterContext |
mContext
Master context.
|
protected AtomicBoolean |
mIsStopped
See
isStopped() . |
protected SafeModeManager |
mSafeModeManager
The manager of safe mode state.
|
mJournalSystem, mLeaderSelector, mRegistry
Modifier and Type | Method and Description |
---|---|
protected CoreMasterContext.Builder |
createBaseMasterContext() |
GrpcServerBuilder |
createBaseRpcServer() |
Optional<AlluxioExecutorService> |
createRpcExecutorService()
This method is decoupled from
MasterProcess.createBaseRpcServer() because the
AlluxioExecutorService needs to be managed (i.e. |
WebServer |
createWebServer() |
Optional<SafeModeManager> |
getSafeModeManager() |
boolean |
isInSafeMode() |
boolean |
isStopped()
Indicates if all master resources have been successfully released when stopping.
|
void |
start()
Starts the Alluxio process.
|
protected void |
startMasterComponents(boolean isLeader)
Starts all masters, including block master, FileSystem master, and additional masters.
|
void |
stop()
Stops the Alluxio process, blocking until the action is completed.
|
protected void |
stopMasterComponents()
Stops all masters, including block master, fileSystem master and additional masters.
|
protected void |
takeEmergencyBackup() |
String |
toString() |
getMaster, getPrimarySelector, getRegistry, getRpcAddress, getRpcBindAddress, getStartTimeMs, getUptimeMs, getWebAddress, getWebBindAddress, isGrpcServing, isMetricSinkServing, isWebServing, registerService, waitForGrpcServerReady, waitForMetricSinkServing, waitForReady, waitForWebServerReady
protected final SafeModeManager mSafeModeManager
protected final CoreMasterContext mContext
protected final AtomicBoolean mIsStopped
isStopped()
.protected CoreMasterContext.Builder createBaseMasterContext()
public WebServer createWebServer()
createWebServer
in class MasterProcess
public GrpcServerBuilder createBaseRpcServer()
createBaseRpcServer
in class MasterProcess
MasterProcess.createRpcExecutorService()
) and the rpc services (provided by MasterProcess.mRegistry
public Optional<AlluxioExecutorService> createRpcExecutorService()
MasterProcess
MasterProcess.createBaseRpcServer()
because the
AlluxioExecutorService
needs to be managed (i.e. started and stopped) independently
of the rpc server that uses itcreateRpcExecutorService
in class MasterProcess
public Optional<SafeModeManager> getSafeModeManager()
getSafeModeManager
in class MasterProcess
SafeModeManager
if you have onepublic boolean isInSafeMode()
public void start() throws Exception
Process
Process.stop()
.
The Process.waitForReady(int)
method can be used to make sure that the process is ready to
serve requests.Exception
protected void takeEmergencyBackup() throws AlluxioException, InterruptedException, TimeoutException
protected void startMasterComponents(boolean isLeader) throws IOException
isLeader
- if the Master is leaderIOException
protected void stopMasterComponents()
public void stop() throws Exception
Process
Exception
public boolean isStopped()
stop()
might fail while a second call
might succeed.stop()
has concluded successfully at least onceCopyright © 2023. All Rights Reserved.