@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 MasterContext |
mContext
Master context.
|
protected SafeModeManager |
mSafeModeManager
The manager of safe mode state.
|
mGrpcServer, mJournalSystem, mWebServer
Modifier and Type | Method and Description |
---|---|
protected void |
closeMasters()
Closes all masters, including block master, fileSystem master and additional masters.
|
<T extends Master> |
getMaster(Class<T> clazz)
Gets the registered class from the master registry.
|
InetSocketAddress |
getRpcAddress() |
InetSocketAddress |
getWebAddress() |
boolean |
isInSafeMode() |
void |
start()
Starts the Alluxio process.
|
protected void |
startJvmMonitorProcess()
Starts jvm monitor process, to monitor jvm.
|
protected void |
startMasters(boolean isLeader)
Starts all masters, including block master, FileSystem master, and additional masters.
|
protected void |
startServing(String startMessage,
String stopMessage)
Starts serving, letting
MetricsSystem start sink and starting the web ui server and RPC
Server. |
protected void |
startServingRPCServer()
Starts the gRPC server.
|
protected void |
startServingWebServer()
Starts serving web ui server, resetting master web port, adding the metrics servlet to the web
server and starting web ui.
|
void |
stop()
Stops the Alluxio process, blocking until the action is completed.
|
protected void |
stopMasters()
Stops all masters, including block master, fileSystem master and additional masters.
|
protected void |
stopServing()
Stops serving, trying stop RPC server and web ui server and letting
MetricsSystem stop
all the sinks. |
String |
toString() |
getStartTimeMs, getUptimeMs, isServing, startRejectingServers, startServing, stopRejectingRpcServer, stopRejectingServers, stopRejectingWebServer, waitForReady
protected final SafeModeManager mSafeModeManager
protected final MasterContext mContext
public <T extends Master> T getMaster(Class<T> clazz)
MasterProcess
getMaster
in class MasterProcess
T
- the type of the master to getclazz
- the class of the master to getpublic boolean isInSafeMode()
@Nullable public InetSocketAddress getWebAddress()
getWebAddress
in class MasterProcess
public InetSocketAddress getRpcAddress()
getRpcAddress
in class MasterProcess
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
public void stop() throws Exception
Process
Exception
protected void startMasters(boolean isLeader) throws IOException
isLeader
- if the Master is leaderIOException
protected void stopMasters()
protected void closeMasters()
protected void startServingWebServer()
protected void startJvmMonitorProcess()
protected void startServing(String startMessage, String stopMessage)
MetricsSystem
start sink and starting the web ui server and RPC
Server.startMessage
- empty string or the message that the master gains the leadershipstopMessage
- empty string or the message that the master loses the leadershipprotected void startServingRPCServer()
Master
s and meta services.protected void stopServing() throws Exception
MetricsSystem
stop
all the sinks.Exception
Copyright © 2023. All Rights Reserved.