@NotThreadSafe public abstract class AbstractLocalAlluxioCluster extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
mHostname |
protected ProxyProcess |
mProxyProcess |
protected Thread |
mProxyThread |
protected UnderFileSystemCluster |
mUfsCluster |
protected String |
mWorkDirectory |
protected List<WorkerProcess> |
mWorkers |
protected List<Thread> |
mWorkerThreads |
| Modifier and Type | Method and Description |
|---|---|
abstract FileSystem |
getClient()
Returns a
FileSystem client. |
protected abstract LocalAlluxioMaster |
getLocalAlluxioMaster() |
ProxyProcess |
getProxyProcess()
Gets the proxy process.
|
void |
initConfiguration()
Creates a default
Configuration for testing. |
protected void |
reset()
Resets the cluster to original state.
|
protected void |
resetClientPools()
Resets the client pools to the original state.
|
protected void |
setAlluxioWorkDirectory()
Sets Alluxio work directory.
|
protected void |
setHostname()
Sets hostname.
|
protected void |
setupTest()
Sets up corresponding directories for tests.
|
void |
start()
Starts both master and a worker using the configurations in test conf respectively.
|
protected abstract void |
startMasters()
Configures and starts the master(s).
|
void |
startWorkers()
Configures and starts the worker(s).
|
void |
stop()
Stops both the alluxio and underfs service threads.
|
void |
stopFS()
Stops the alluxio filesystem's service thread only.
|
protected abstract void |
stopMasters()
Stops the masters.
|
protected void |
stopProxy()
Stops the proxy.
|
protected void |
stopUFS()
Cleans up the underfs cluster test folder only.
|
void |
stopWorkers()
Stops the workers.
|
protected ProxyProcess mProxyProcess
protected Thread mProxyThread
protected List<WorkerProcess> mWorkers
protected UnderFileSystemCluster mUfsCluster
protected String mWorkDirectory
protected String mHostname
public void start()
throws Exception
Exceptionprotected abstract void startMasters()
throws Exception
Exceptionpublic void startWorkers()
throws Exception
Exceptionprotected void setupTest()
throws IOException
IOExceptionpublic void stop()
throws Exception
Exceptionpublic void stopFS()
throws Exception
Exceptionprotected void stopUFS()
throws Exception
Exceptionprotected abstract void stopMasters()
throws Exception
Exceptionpublic void initConfiguration()
throws IOException
Configuration for testing.IOExceptionpublic abstract FileSystem getClient() throws IOException
FileSystem client.FileSystem clientIOExceptionprotected abstract LocalAlluxioMaster getLocalAlluxioMaster()
public ProxyProcess getProxyProcess()
protected void reset()
protected void resetClientPools()
throws IOException
IOExceptionprotected void setHostname()
protected void setAlluxioWorkDirectory()
Copyright © 2017. All Rights Reserved.