@NotThreadSafe public final class MultiMasterEmbeddedJournalLocalAlluxioCluster extends AbstractLocalAlluxioCluster
MultiProcessCluster
mHostname, mProxyProcess, mProxyThread, mWorkDirectory, mWorkers, mWorkerThreads
Constructor and Description |
---|
MultiMasterEmbeddedJournalLocalAlluxioCluster(int numMasters,
int numWorkers,
List<PortCoordination.ReservedPort> reservedPorts) |
Modifier and Type | Method and Description |
---|---|
protected void |
formatJournal() |
FileSystem |
getClient()
Returns a
FileSystem client. |
FileSystem |
getClient(FileSystemContext context) |
int |
getLeaderIndex() |
LocalAlluxioMaster |
getLocalAlluxioMaster() |
LocalAlluxioMaster |
getLocalAlluxioMasterByIndex(int index) |
List<InetSocketAddress> |
getMasterAddresses() |
WorkerProcess |
getWorkerProcess(int index) |
void |
initConfiguration(String name)
Creates a default
Configuration for testing. |
protected void |
startMasters()
Configures and starts the master(s).
|
void |
startWorkers()
Configures and starts the worker(s).
|
void |
stopFS()
Stops the alluxio filesystem's service thread only.
|
boolean |
stopLeader()
Iterates over the masters in the order of master creation, stops the leader master.
|
void |
stopMasters()
Stops the masters.
|
boolean |
stopStandby()
Iterates over the masters in the order of master creation, stops the first standby master.
|
void |
waitForPrimaryMasterServing(int timeoutMs)
Waits for the primary master to start until a timeout occurs.
|
formatAndRestartMasters, getProxyProcess, isStartedWorkers, killWorkerProcesses, reset, resetClientPools, restartMasters, restartWorkers, setAlluxioWorkDirectory, setHostname, setupTest, start, startProxy, stop, stopProxy, stopWorkers, waitForMasterServing, waitForWorkersRegistered
public MultiMasterEmbeddedJournalLocalAlluxioCluster(int numMasters, int numWorkers, List<PortCoordination.ReservedPort> reservedPorts) throws IOException
numMasters
- the number of masters to runnumWorkers
- the number of workers to runreservedPorts
- reserved portsIOException
public void initConfiguration(String name) throws IOException
AbstractLocalAlluxioCluster
Configuration
for testing.initConfiguration
in class AbstractLocalAlluxioCluster
name
- the name of the test/clusterIOException
public FileSystem getClient() throws IOException
AbstractLocalAlluxioCluster
FileSystem
client.getClient
in class AbstractLocalAlluxioCluster
FileSystem
clientIOException
public FileSystem getClient(FileSystemContext context) throws IOException
getClient
in class AbstractLocalAlluxioCluster
context
- the FileSystemContext to useFileSystem
client, using a specific contextIOException
public LocalAlluxioMaster getLocalAlluxioMaster()
getLocalAlluxioMaster
in class AbstractLocalAlluxioCluster
public LocalAlluxioMaster getLocalAlluxioMasterByIndex(int index)
index
- the indexpublic WorkerProcess getWorkerProcess(int index)
index
- the indexpublic int getLeaderIndex()
mMasters
, or -1 if there is no leader temporarilypublic List<InetSocketAddress> getMasterAddresses()
public boolean stopStandby()
public boolean stopLeader()
public void waitForPrimaryMasterServing(int timeoutMs) throws TimeoutException, InterruptedException
timeoutMs
- the number of milliseconds to wait before giving up and throwing an exceptionTimeoutException
InterruptedException
protected void startMasters() throws IOException
AbstractLocalAlluxioCluster
startMasters
in class AbstractLocalAlluxioCluster
IOException
public void startWorkers() throws Exception
AbstractLocalAlluxioCluster
startWorkers
in class AbstractLocalAlluxioCluster
Exception
public void stopFS() throws Exception
AbstractLocalAlluxioCluster
stopFS
in class AbstractLocalAlluxioCluster
Exception
public void stopMasters() throws Exception
AbstractLocalAlluxioCluster
stopMasters
in class AbstractLocalAlluxioCluster
Exception
protected void formatJournal()
formatJournal
in class AbstractLocalAlluxioCluster
Copyright © 2023. All Rights Reserved.