@NotThreadSafe public abstract class AbstractLocalAlluxioCluster extends Object
Modifier and Type | Field and Description |
---|---|
protected String |
mHostname |
protected ProxyProcess |
mProxyProcess |
protected Thread |
mProxyThread |
protected String |
mWorkDirectory |
protected List<WorkerProcess> |
mWorkers |
protected List<Thread> |
mWorkerThreads |
Modifier and Type | Method and Description |
---|---|
void |
formatAndRestartMasters()
Stops the masters, formats them, and then restarts them.
|
abstract FileSystem |
getClient()
Returns a
FileSystem client. |
abstract FileSystem |
getClient(FileSystemContext context) |
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.
|
void |
restartMasters()
Restarts the master(s).
|
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.
|
void |
stopWorkers()
Stops the workers.
|
protected ProxyProcess mProxyProcess
protected Thread mProxyThread
protected List<WorkerProcess> mWorkers
protected String mWorkDirectory
protected String mHostname
public void start() throws Exception
Exception
protected abstract void startMasters() throws Exception
Exception
public void restartMasters() throws Exception
Exception
public void startWorkers() throws Exception
Exception
protected void setupTest() throws IOException
IOException
public void stop() throws Exception
Exception
public void stopFS() throws Exception
Exception
public void formatAndRestartMasters() throws Exception
Exception
protected abstract void stopMasters() throws Exception
Exception
public void initConfiguration() throws IOException
Configuration
for testing.IOException
public abstract FileSystem getClient() throws IOException
FileSystem
client.FileSystem
clientIOException
public abstract FileSystem getClient(FileSystemContext context) throws IOException
context
- the FileSystemContext to useFileSystem
client, using a specific contextIOException
protected abstract LocalAlluxioMaster getLocalAlluxioMaster()
public ProxyProcess getProxyProcess()
protected void reset()
protected void resetClientPools() throws IOException
IOException
protected void setHostname()
protected void setAlluxioWorkDirectory()
Copyright © 2023. All Rights Reserved.