@NotThreadSafe
public abstract class AbstractLocalAlluxioCluster
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
mHostname |
protected ProxyProcess |
mProxyProcess |
protected java.lang.Thread |
mProxyThread |
protected java.lang.String |
mWorkDirectory |
protected java.util.List<WorkerProcess> |
mWorkers |
protected java.util.List<java.lang.Thread> |
mWorkerThreads |
| Modifier and Type | Method and Description |
|---|---|
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 java.lang.Thread mProxyThread
protected java.util.List<WorkerProcess> mWorkers
protected java.util.List<java.lang.Thread> mWorkerThreads
protected java.lang.String mWorkDirectory
protected java.lang.String mHostname
public void start()
throws java.lang.Exception
java.lang.Exceptionprotected abstract void startMasters()
throws java.lang.Exception
java.lang.Exceptionpublic void restartMasters()
throws java.lang.Exception
java.lang.Exceptionpublic void startWorkers()
throws java.lang.Exception
java.lang.Exceptionprotected void setupTest()
throws java.io.IOException
java.io.IOExceptionpublic void stop()
throws java.lang.Exception
java.lang.Exceptionpublic void stopFS()
throws java.lang.Exception
java.lang.Exceptionprotected abstract void stopMasters()
throws java.lang.Exception
java.lang.Exceptionprotected void stopProxy()
throws java.lang.Exception
java.lang.Exceptionpublic void stopWorkers()
throws java.lang.Exception
java.lang.Exceptionpublic void initConfiguration()
throws java.io.IOException
Configuration for testing.java.io.IOExceptionpublic abstract FileSystem getClient() throws java.io.IOException
FileSystem client.FileSystem clientjava.io.IOExceptionpublic abstract FileSystem getClient(FileSystemContext context) throws java.io.IOException
context - the FileSystemContext to useFileSystem client, using a specific contextjava.io.IOExceptionprotected abstract LocalAlluxioMaster getLocalAlluxioMaster()
public ProxyProcess getProxyProcess()
protected void reset()
protected void resetClientPools()
throws java.io.IOException
java.io.IOExceptionprotected void setHostname()
protected void setAlluxioWorkDirectory()
Copyright © 2018. All Rights Reserved.