Class MiniAccumuloClusterControl
- java.lang.Object
-
- org.apache.accumulo.miniclusterImpl.MiniAccumuloClusterControl
-
- All Implemented Interfaces:
ClusterControl
public class MiniAccumuloClusterControl extends Object implements ClusterControl
-
-
Field Summary
Fields Modifier and Type Field Description protected MiniAccumuloClusterImplcluster
-
Constructor Summary
Constructors Constructor Description MiniAccumuloClusterControl(MiniAccumuloClusterImpl cluster)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadminStopAll()Issue an orderly shutdown of the cluster, throws an exception if it fails to return successfully (return value of 0).intexec(Class<?> clz, String[] args)Execute the given class against the cluster with the provided arguments and waits for completion.Map.Entry<Integer,String>execWithStdout(Class<?> clz, String[] args)Execute the given class against the cluster with the provided arguments and waits for completion.voidkill(ServerType server, String hostname)Send SIGKILL to the given process on the hostvoidkillProcess(ServerType type, ProcessReference procRef)voidresume(ServerType server, String hostname)Send SIGCONT to the given process on the hostvoidsignal(ServerType server, String hostname, String signal)Send the provided signal to the process on the hostvoidstart(ServerType server)voidstart(ServerType server, String hostname)Start the given process on the hostvoidstart(ServerType server, Map<String,String> configOverrides, int limit)voidstartAllServers(ServerType server)Starts all occurrences of the given servervoidstop(ServerType server)voidstop(ServerType server, String hostname)Stop the given process on the hostvoidstopAllServers(ServerType server)Stops all occurrences of the given servervoidsuspend(ServerType server, String hostname)Send SIGSTOP to the given process on the host
-
-
-
Field Detail
-
cluster
protected MiniAccumuloClusterImpl cluster
-
-
Constructor Detail
-
MiniAccumuloClusterControl
public MiniAccumuloClusterControl(MiniAccumuloClusterImpl cluster)
-
-
Method Detail
-
start
public void start(ServerType server) throws IOException
- Throws:
IOException
-
exec
public int exec(Class<?> clz, String[] args) throws IOException
Description copied from interface:ClusterControlExecute the given class against the cluster with the provided arguments and waits for completion. Returns the exit code of the process.- Specified by:
execin interfaceClusterControl- Throws:
IOException
-
execWithStdout
public Map.Entry<Integer,String> execWithStdout(Class<?> clz, String[] args) throws IOException
Description copied from interface:ClusterControlExecute the given class against the cluster with the provided arguments and waits for completion. Returns the exit code of the process with the stdout.- Specified by:
execWithStdoutin interfaceClusterControl- Throws:
IOException
-
adminStopAll
public void adminStopAll() throws IOExceptionDescription copied from interface:ClusterControlIssue an orderly shutdown of the cluster, throws an exception if it fails to return successfully (return value of 0).- Specified by:
adminStopAllin interfaceClusterControl- Throws:
IOException
-
startAllServers
public void startAllServers(ServerType server) throws IOException
Description copied from interface:ClusterControlStarts all occurrences of the given server- Specified by:
startAllServersin interfaceClusterControl- Throws:
IOException
-
start
public void start(ServerType server, String hostname) throws IOException
Description copied from interface:ClusterControlStart the given process on the host- Specified by:
startin interfaceClusterControl- Throws:
IOException
-
start
public void start(ServerType server, Map<String,String> configOverrides, int limit) throws IOException
- Throws:
IOException
-
stopAllServers
public void stopAllServers(ServerType server) throws IOException
Description copied from interface:ClusterControlStops all occurrences of the given server- Specified by:
stopAllServersin interfaceClusterControl- Throws:
IOException
-
stop
public void stop(ServerType server) throws IOException
- Throws:
IOException
-
stop
public void stop(ServerType server, String hostname) throws IOException
Description copied from interface:ClusterControlStop the given process on the host- Specified by:
stopin interfaceClusterControl- Throws:
IOException
-
signal
public void signal(ServerType server, String hostname, String signal) throws IOException
Description copied from interface:ClusterControlSend the provided signal to the process on the host- Specified by:
signalin interfaceClusterControl- Throws:
IOException
-
suspend
public void suspend(ServerType server, String hostname) throws IOException
Description copied from interface:ClusterControlSend SIGSTOP to the given process on the host- Specified by:
suspendin interfaceClusterControl- Throws:
IOException
-
resume
public void resume(ServerType server, String hostname) throws IOException
Description copied from interface:ClusterControlSend SIGCONT to the given process on the host- Specified by:
resumein interfaceClusterControl- Throws:
IOException
-
killProcess
public void killProcess(ServerType type, ProcessReference procRef) throws ProcessNotFoundException, InterruptedException
-
kill
public void kill(ServerType server, String hostname) throws IOException
Description copied from interface:ClusterControlSend SIGKILL to the given process on the host- Specified by:
killin interfaceClusterControl- Throws:
IOException
-
-