@NotThreadSafe public final class MultiMasterEmbeddedJournalLocalAlluxioCluster extends AbstractLocalAlluxioCluster
MultiProcessClustermHostname, mProxyProcess, mProxyThread, mWorkDirectory, mWorkers, mWorkerThreads| Constructor and Description |
|---|
MultiMasterEmbeddedJournalLocalAlluxioCluster(int numMasters,
int numWorkers,
java.util.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) |
java.util.List<java.net.InetSocketAddress> |
getMasterAddresses() |
WorkerProcess |
getWorkerProcess(int index) |
void |
initConfiguration(java.lang.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, waitForWorkersRegisteredpublic MultiMasterEmbeddedJournalLocalAlluxioCluster(int numMasters,
int numWorkers,
java.util.List<PortCoordination.ReservedPort> reservedPorts)
throws java.io.IOException
numMasters - the number of masters to runnumWorkers - the number of workers to runreservedPorts - reserved portsjava.io.IOExceptionpublic void initConfiguration(java.lang.String name)
throws java.io.IOException
AbstractLocalAlluxioClusterConfiguration for testing.initConfiguration in class AbstractLocalAlluxioClustername - the name of the test/clusterjava.io.IOExceptionpublic FileSystem getClient() throws java.io.IOException
AbstractLocalAlluxioClusterFileSystem client.getClient in class AbstractLocalAlluxioClusterFileSystem clientjava.io.IOExceptionpublic FileSystem getClient(FileSystemContext context) throws java.io.IOException
getClient in class AbstractLocalAlluxioClustercontext - the FileSystemContext to useFileSystem client, using a specific contextjava.io.IOExceptionpublic LocalAlluxioMaster getLocalAlluxioMaster()
getLocalAlluxioMaster in class AbstractLocalAlluxioClusterpublic 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 java.util.List<java.net.InetSocketAddress> getMasterAddresses()
public boolean stopStandby()
public boolean stopLeader()
public void waitForPrimaryMasterServing(int timeoutMs)
throws java.util.concurrent.TimeoutException,
java.lang.InterruptedException
timeoutMs - the number of milliseconds to wait before giving up and throwing an exceptionjava.util.concurrent.TimeoutExceptionjava.lang.InterruptedExceptionprotected void startMasters()
throws java.io.IOException
AbstractLocalAlluxioClusterstartMasters in class AbstractLocalAlluxioClusterjava.io.IOExceptionpublic void startWorkers()
throws java.lang.Exception
AbstractLocalAlluxioClusterstartWorkers in class AbstractLocalAlluxioClusterjava.lang.Exceptionpublic void stopFS()
throws java.lang.Exception
AbstractLocalAlluxioClusterstopFS in class AbstractLocalAlluxioClusterjava.lang.Exceptionpublic void stopMasters()
throws java.lang.Exception
AbstractLocalAlluxioClusterstopMasters in class AbstractLocalAlluxioClusterjava.lang.Exceptionprotected void formatJournal()
formatJournal in class AbstractLocalAlluxioClusterCopyright © 2023. All Rights Reserved.