@NotThreadSafe public class AlluxioMasterProcess extends Object implements MasterProcess
MasterProcess.Factory
Modifier and Type | Field and Description |
---|---|
protected ExecutorService |
mExecutorService
The ExecutorService for RPC server.
|
protected JournalSystem |
mJournalSystem
The journal system for writing journal entries and restoring master state.
|
protected SafeModeManager |
mSafeModeManager
The manager of safe mode state.
|
Modifier and Type | Method and Description |
---|---|
<T extends Master> |
getMaster(Class<T> clazz) |
InetSocketAddress |
getRpcAddress() |
long |
getStartTimeMs() |
long |
getUptimeMs() |
InetSocketAddress |
getWebAddress() |
boolean |
isInSafeMode() |
boolean |
isServing() |
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, lineage 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 Thrift RPC 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 lineage master, block master and 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() |
boolean |
waitForReady(int timeoutMs)
Waits until the process is ready to serve requests.
|
protected ExecutorService mExecutorService
protected final JournalSystem mJournalSystem
protected final SafeModeManager mSafeModeManager
public <T extends Master> T getMaster(Class<T> clazz)
getMaster
in interface MasterProcess
T
- the type of the master to getclazz
- the class of the master to getpublic InetSocketAddress getRpcAddress()
getRpcAddress
in interface MasterProcess
public long getStartTimeMs()
getStartTimeMs
in interface MasterProcess
public long getUptimeMs()
getUptimeMs
in interface MasterProcess
@Nullable public InetSocketAddress getWebAddress()
getWebAddress
in interface MasterProcess
public boolean isInSafeMode()
isInSafeMode
in interface MasterProcess
public boolean isServing()
isServing
in interface MasterProcess
public boolean waitForReady(int timeoutMs)
Process
waitForReady
in interface Process
timeoutMs
- how long to wait in millisecondspublic 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.public void stop() throws Exception
Process
protected void startMasters(boolean isLeader)
isLeader
- if the Master is leaderprotected void stopMasters()
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 startServingWebServer()
protected void startJvmMonitorProcess()
protected void startServingRPCServer()
Master
s and meta services to a multiplexed processor, then creates the master thrift
service with the multiplexed processor.protected void stopServing() throws Exception
MetricsSystem
stop
all the sinks.Exception
Copyright © 2023. All Rights Reserved.