@NotThreadSafe public final class MultiMasterLocalAlluxioCluster extends AbstractLocalAlluxioCluster
LOG, mHostname, mUfsCluster, mWorkDirectory, mWorkers| Constructor and Description |
|---|
MultiMasterLocalAlluxioCluster(int masters)
Runs a multi master local Alluxio cluster with a single worker.
|
MultiMasterLocalAlluxioCluster(int masters,
int numWorkers) |
| Modifier and Type | Method and Description |
|---|---|
FileSystem |
getClient()
Returns a
FileSystem client. |
int |
getLeaderIndex() |
LocalAlluxioMaster |
getMaster()
Gets the master which should be listening for RPC and Web requests.
|
String |
getUri() |
boolean |
killLeader()
Iterates over the masters in the order of master creation, kill the leader master.
|
boolean |
killStandby()
Iterates over the masters in the order of master creation, kill the first standby master.
|
protected void |
startMaster()
Configures and starts a master.
|
protected void |
startWorkers()
Configures and starts the workers.
|
void |
stopFS()
Stops the alluxio filesystem's service thread only.
|
initConfiguration, reset, runWorkers, setAlluxioWorkDirectory, setHostname, setupTest, start, stop, stopUFSpublic MultiMasterLocalAlluxioCluster(int masters)
masters - the number masters to runpublic MultiMasterLocalAlluxioCluster(int masters,
int numWorkers)
masters - the number of masters to runnumWorkers - the number of workers to runpublic FileSystem getClient() throws IOException
AbstractLocalAlluxioClusterFileSystem client.getClient in class AbstractLocalAlluxioClusterFileSystem clientIOException - when the operation failspublic String getUri()
public LocalAlluxioMaster getMaster()
AbstractLocalAlluxioClustergetMaster in class AbstractLocalAlluxioClusterpublic int getLeaderIndex()
mMasters, or -1 if there is no leader temporarilypublic boolean killStandby()
public boolean killLeader()
protected void startWorkers()
throws IOException,
ConnectionFailedException
AbstractLocalAlluxioClusterstartWorkers in class AbstractLocalAlluxioClusterIOException - if an I/O error occursConnectionFailedException - if network connection failedprotected void startMaster()
throws IOException
AbstractLocalAlluxioClusterstartMaster in class AbstractLocalAlluxioClusterIOException - when the operation failspublic void stopFS()
throws Exception
AbstractLocalAlluxioClusterstopFS in class AbstractLocalAlluxioClusterException - when the operation failsCopyright © 2016. All Rights Reserved.