@NotThreadSafe public final class MultiMasterLocalAlluxioCluster extends AbstractLocalAlluxioCluster
LOG, mHome, mHostname, mMasterConf, mUfsCluster, mUserBlockSize, mWorker, mWorkerCapacityBytes, mWorkerConf, mWorkerThread| Constructor and Description |
|---|
MultiMasterLocalAlluxioCluster(long workerCapacityBytes,
int masters,
int userBlockSize) |
| 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(Configuration conf)
Configures and starts a master.
|
protected void |
startWorker(Configuration conf)
Configures and starts a worker.
|
void |
stopTFS()
Stops the alluxio filesystem's service thread only.
|
getMasterConf, newTestConf, resetContext, runWorker, setAlluxioHome, setHostname, setupTest, start, start, stop, stopUFSpublic MultiMasterLocalAlluxioCluster(long workerCapacityBytes,
int masters,
int userBlockSize)
workerCapacityBytes - the capacity of the worker in bytesmasters - the number of the masteruserBlockSize - the block size for a userpublic 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 startWorker(Configuration conf) throws IOException, ConnectionFailedException
AbstractLocalAlluxioClusterstartWorker in class AbstractLocalAlluxioClusterconf - configuration of this testIOException - if an I/O error occursConnectionFailedException - if network connection failedprotected void startMaster(Configuration conf) throws IOException
AbstractLocalAlluxioClusterstartMaster in class AbstractLocalAlluxioClusterconf - configuration of this testIOException - when the operation failspublic void stopTFS()
throws Exception
AbstractLocalAlluxioClusterstopTFS in class AbstractLocalAlluxioClusterException - when the operation failsCopyright © 2016. All Rights Reserved.