public class MiniAccumuloClusterImpl extends Object implements AccumuloCluster
MiniAccumuloCluster, and may contain
features for internal testing which have not yet been promoted to the public API. It's best to
use MiniAccumuloCluster whenever possible. Use of this class risks API breakage between
versions.| Modifier and Type | Class and Description |
|---|---|
static class |
MiniAccumuloClusterImpl.LogWriter |
| Constructor and Description |
|---|
MiniAccumuloClusterImpl(File dir,
String rootPassword) |
MiniAccumuloClusterImpl(MiniAccumuloConfigImpl config) |
| Modifier and Type | Method and Description |
|---|---|
Process |
exec(Class<?> clazz,
List<String> jvmArgs,
String... args) |
Process |
exec(Class<?> clazz,
String... args) |
ClientConfiguration |
getClientConfig()
Get the client configuration for the cluster
|
MiniAccumuloClusterControl |
getClusterControl()
Get an object that can manage a cluster
|
MiniAccumuloConfigImpl |
getConfig() |
Connector |
getConnector(String user,
AuthenticationToken token)
Utility method to get a connector to the cluster.
|
Set<Pair<ServerType,Integer>> |
getDebugPorts() |
org.apache.hadoop.fs.FileSystem |
getFileSystem() |
String |
getInstanceName() |
List<MiniAccumuloClusterImpl.LogWriter> |
getLogWriters() |
MasterMonitorInfo |
getMasterMonitorInfo()
Get programmatic interface to information available in a normal monitor.
|
org.apache.hadoop.hdfs.MiniDFSCluster |
getMiniDfs() |
Map<ServerType,Collection<ProcessReference>> |
getProcesses() |
protected ExecutorService |
getShutdownExecutor() |
AccumuloConfiguration |
getSiteConfiguration()
Get server side config derived from accumulo-site.xml
|
org.apache.hadoop.fs.Path |
getTemporaryPath() |
String |
getZooKeepers() |
void |
killProcess(ServerType type,
ProcessReference proc) |
protected void |
setShutdownExecutor(ExecutorService svc) |
void |
start()
Starts Accumulo and Zookeeper processes.
|
void |
stop()
Stops Accumulo and Zookeeper processes.
|
public MiniAccumuloClusterImpl(File dir, String rootPassword) throws IOException
dir - An empty or nonexistant temp directoy that Accumulo and Zookeeper can store data in.
Creating the directory is left to the user. Java 7, Guava, and Junit provide methods
for creating temporary directories.rootPassword - Initial root password for instance.IOExceptionpublic MiniAccumuloClusterImpl(MiniAccumuloConfigImpl config) throws IOException
config - initial configurationIOExceptionpublic List<MiniAccumuloClusterImpl.LogWriter> getLogWriters()
public Process exec(Class<?> clazz, String... args) throws IOException
IOExceptionpublic Process exec(Class<?> clazz, List<String> jvmArgs, String... args) throws IOException
IOExceptionpublic void start()
throws IOException,
InterruptedException
start in interface AccumuloClusterIOExceptionInterruptedExceptionpublic Set<Pair<ServerType,Integer>> getDebugPorts()
public Map<ServerType,Collection<ProcessReference>> getProcesses()
public void killProcess(ServerType type, ProcessReference proc) throws ProcessNotFoundException, InterruptedException
public String getInstanceName()
getInstanceName in interface AccumuloClusterpublic String getZooKeepers()
getZooKeepers in interface AccumuloClusterpublic void stop()
throws IOException,
InterruptedException
stop in interface AccumuloClusterIOExceptionInterruptedExceptionpublic MiniAccumuloConfigImpl getConfig()
public Connector getConnector(String user, AuthenticationToken token) throws AccumuloException, AccumuloSecurityException
AccumuloClustergetConnector in interface AccumuloClusterAccumuloExceptionAccumuloSecurityExceptionpublic ClientConfiguration getClientConfig()
AccumuloClustergetClientConfig in interface AccumuloClusterpublic org.apache.hadoop.fs.FileSystem getFileSystem()
getFileSystem in interface AccumuloClusterFileSystem in use by this clusterprotected void setShutdownExecutor(ExecutorService svc)
protected ExecutorService getShutdownExecutor()
public MasterMonitorInfo getMasterMonitorInfo() throws AccumuloException, AccumuloSecurityException
AccumuloExceptionAccumuloSecurityExceptionpublic org.apache.hadoop.hdfs.MiniDFSCluster getMiniDfs()
public MiniAccumuloClusterControl getClusterControl()
AccumuloClustergetClusterControl in interface AccumuloClusterpublic org.apache.hadoop.fs.Path getTemporaryPath()
getTemporaryPath in interface AccumuloClusterFileSystem this cluster is running on that can be used for temporary
filespublic AccumuloConfiguration getSiteConfiguration()
AccumuloClustergetSiteConfiguration in interface AccumuloClusterCopyright © 2011–2019 The Apache Software Foundation. All rights reserved.