@NotThreadSafe public final class MultiMasterLocalAlluxioCluster extends AbstractLocalAlluxioCluster
mHostname, mProxyProcess, mProxyThread, mWorkDirectory, mWorkers, mWorkerThreads| Constructor and Description |
|---|
MultiMasterLocalAlluxioCluster(int numMasters)
Runs a multi master local Alluxio cluster with a single worker.
|
| Modifier and Type | Method and Description |
|---|---|
FileSystem |
getClient()
Returns a
FileSystem client. |
int |
getLeaderIndex() |
LocalAlluxioMaster |
getLocalAlluxioMaster() |
String |
getUri() |
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 |
waitForNewMaster(int timeoutMs)
Waits for a new master to start until a timeout occurs.
|
getProxyProcess, initConfiguration, reset, resetClientPools, restartMasters, setAlluxioWorkDirectory, setHostname, setupTest, start, stop, stopProxy, stopWorkerspublic MultiMasterLocalAlluxioCluster(int numMasters)
numMasters - the number masters to runpublic FileSystem getClient() throws IOException
AbstractLocalAlluxioClusterFileSystem client.getClient in class AbstractLocalAlluxioClusterFileSystem clientIOExceptionpublic String getUri()
public LocalAlluxioMaster getLocalAlluxioMaster()
getLocalAlluxioMaster in class AbstractLocalAlluxioClusterpublic int getLeaderIndex()
mMasters, or -1 if there is no leader temporarilypublic boolean stopStandby()
public boolean stopLeader()
public void waitForNewMaster(int timeoutMs)
timeoutMs - the number of milliseconds to wait before giving up and throwing an exceptionprotected void startMasters()
throws IOException
AbstractLocalAlluxioClusterstartMasters in class AbstractLocalAlluxioClusterIOExceptionpublic void startWorkers()
throws Exception
AbstractLocalAlluxioClusterstartWorkers in class AbstractLocalAlluxioClusterExceptionpublic void stopFS()
throws Exception
AbstractLocalAlluxioClusterstopFS in class AbstractLocalAlluxioClusterExceptionpublic void stopMasters()
throws Exception
AbstractLocalAlluxioClusterstopMasters in class AbstractLocalAlluxioClusterExceptionCopyright © 2017. All Rights Reserved.