Package alluxio.master
Class LocalAlluxioJobCluster
- java.lang.Object
-
- alluxio.master.LocalAlluxioJobCluster
-
@NotThreadSafe public final class LocalAlluxioJobCluster extends java.lang.ObjectLocal Alluxio job cluster. This cluster is should only be used in conjunction with anAbstractLocalAlluxioCluster.
-
-
Constructor Summary
Constructors Constructor Description LocalAlluxioJobCluster()Creates a new instance ofLocalAlluxioJobCluster.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetHostname()alluxio.master.AlluxioJobMasterProcessgetMaster()alluxio.worker.JobWorkerProcessgetWorker()voidrestartWorker()Stops the current worker and starts a new one.voidsetProperty(alluxio.conf.PropertyKey pk, java.lang.String value)Overrides properties for the Job Master and Worker before starting.voidstart()Starts both master and a worker using the configurations in test conf respectively.voidstop()Stops the alluxio job service threads.
-
-
-
Constructor Detail
-
LocalAlluxioJobCluster
public LocalAlluxioJobCluster()
Creates a new instance ofLocalAlluxioJobCluster.
-
-
Method Detail
-
start
public void start() throws java.io.IOException, alluxio.exception.ConnectionFailedExceptionStarts both master and a worker using the configurations in test conf respectively.- Throws:
java.io.IOException- if an I/O error occursalluxio.exception.ConnectionFailedException- if network connection failed
-
stop
public void stop() throws java.lang.ExceptionStops the alluxio job service threads.- Throws:
java.lang.Exception- when the operation fails
-
getMaster
public alluxio.master.AlluxioJobMasterProcess getMaster()
- Returns:
- the job master
-
getWorker
public alluxio.worker.JobWorkerProcess getWorker()
- Returns:
- the job worker
-
getHostname
public java.lang.String getHostname()
- Returns:
- the hostname of the cluster
-
restartWorker
public void restartWorker() throws java.lang.ExceptionStops the current worker and starts a new one.- Throws:
java.lang.Exception- if the the worker fails to stop or start
-
setProperty
public void setProperty(alluxio.conf.PropertyKey pk, java.lang.String value)Overrides properties for the Job Master and Worker before starting.- Parameters:
pk- the property key to setvalue- the value to set for the key
-
-