@NotThreadSafe public final class LocalAlluxioCluster extends AbstractLocalAlluxioCluster
// Create a cluster instance localAlluxioCluster = new LocalAlluxioCluster(WORKER_CAPACITY_BYTES, BLOCK_SIZE_BYTES); // If you have special conf parameter to set for integration tests: AlluxioConfiguration testConf = localAlluxioCluster.newTestConf(); testConf.set(Constants.USER_FILE_BUFFER_BYTES, String.valueOf(BUFFER_BYTES)); // After setting up the test conf, start this local cluster: localAlluxioCluster.start(testConf);
mHostname, mProxyProcess, mProxyThread, mWorkDirectory, mWorkers, mWorkerThreads| Constructor and Description |
|---|
LocalAlluxioCluster()
Runs a test Alluxio cluster with a single Alluxio worker.
|
LocalAlluxioCluster(int numWorkers,
boolean includeSecondary) |
LocalAlluxioCluster(int numWorkers,
boolean includeSecondary,
boolean includeProxy) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAlluxioHome() |
FileSystem |
getClient()
Returns a
FileSystem client. |
FileSystem |
getClient(FileSystemContext context) |
java.lang.String |
getHostname() |
LocalAlluxioMaster |
getLocalAlluxioMaster() |
int |
getMasterRpcPort() |
java.lang.String |
getMasterURI() |
WorkerNetAddress |
getWorkerAddress() |
WorkerProcess |
getWorkerProcess() |
void |
initConfiguration(java.lang.String name)
Creates a default
Configuration for testing. |
void |
startMasters()
Configures and starts the master(s).
|
protected void |
startProxy()
Configures and starts the proxy.
|
void |
stop()
Stops both the alluxio and underfs service threads.
|
void |
stopMasters()
Stops the masters.
|
formatAndRestartMasters, formatJournal, getProxyProcess, isStartedWorkers, killWorkerProcesses, reset, resetClientPools, restartMasters, restartWorkers, setAlluxioWorkDirectory, setHostname, setupTest, start, startWorkers, stopFS, stopProxy, stopWorkers, waitForMasterServing, waitForWorkersRegisteredpublic LocalAlluxioCluster()
public LocalAlluxioCluster(int numWorkers,
boolean includeSecondary,
boolean includeProxy)
numWorkers - the number of workers to runincludeSecondary - weather to include the secondary masterincludeProxy - weather to include the proxypublic LocalAlluxioCluster(int numWorkers,
boolean includeSecondary)
numWorkers - the number of workers to runincludeSecondary - weather to include the secondary masterpublic FileSystem getClient() throws java.io.IOException
AbstractLocalAlluxioClusterFileSystem client.getClient in class AbstractLocalAlluxioClusterFileSystem clientjava.io.IOExceptionpublic FileSystem getClient(FileSystemContext context) throws java.io.IOException
getClient in class AbstractLocalAlluxioClustercontext - the FileSystemContext to useFileSystem client, using a specific contextjava.io.IOExceptionpublic LocalAlluxioMaster getLocalAlluxioMaster()
getLocalAlluxioMaster in class AbstractLocalAlluxioClusterpublic java.lang.String getHostname()
public java.lang.String getMasterURI()
public int getMasterRpcPort()
public java.lang.String getAlluxioHome()
public WorkerProcess getWorkerProcess()
public WorkerNetAddress getWorkerAddress()
public void initConfiguration(java.lang.String name)
throws java.io.IOException
AbstractLocalAlluxioClusterConfiguration for testing.initConfiguration in class AbstractLocalAlluxioClustername - the name of the test/clusterjava.io.IOExceptionpublic void startMasters()
throws java.lang.Exception
AbstractLocalAlluxioClusterstartMasters in class AbstractLocalAlluxioClusterjava.lang.Exceptionprotected void startProxy()
throws java.lang.Exception
AbstractLocalAlluxioClusterstartProxy in class AbstractLocalAlluxioClusterjava.lang.Exceptionpublic void stop()
throws java.lang.Exception
AbstractLocalAlluxioClusterstop in class AbstractLocalAlluxioClusterjava.lang.Exceptionpublic void stopMasters()
throws java.lang.Exception
AbstractLocalAlluxioClusterstopMasters in class AbstractLocalAlluxioClusterjava.lang.ExceptionCopyright © 2024. All Rights Reserved.