Package org.apache.accumulo.minicluster
Class MiniAccumuloConfig
java.lang.Object
org.apache.accumulo.minicluster.MiniAccumuloConfig
Holds configuration for 
MiniAccumuloCluster. Required configurations must be passed to
 constructor(s) and all other configurations are optional.- Since:
- 1.5.0
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionlonggetDir()longgetMemory(ServerType serverType) String[]intintbooleansetClasspath(String... classpathItems) Sets the classpath elements to use when spawning processes.setDefaultMemory(long memory, MemoryUnit memoryUnit) Sets the default memory size to use.setExistingZooKeepers(String existingZooKeepers) Configure an existing ZooKeeper instance to use.setInstanceName(String instanceName) Calling this method is optional.setJDWPEnabled(boolean jdwpEnabled) setMemory(ServerType serverType, long memory, MemoryUnit memoryUnit) Sets the amount of memory to use in the manager process.setNativeLibPaths(String... nativePathItems) Sets the path for processes to use for loading native librariessetNumScanServers(int numScanServers) Calling this method is optional.setNumTservers(int numTservers) Calling this method is optional.setSiteConfig(Map<String, String> siteConfig) Calling this method is optional.setZooKeeperPort(int zooKeeperPort) Calling this method is optional.setZooKeeperStartupTime(long zooKeeperStartupTime) Configure the time to wait for ZooKeeper to startup.
- 
Constructor Details- 
MiniAccumuloConfig- Parameters:
- dir- An empty or nonexistent directory 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- The initial password for the Accumulo root user
 
 
- 
- 
Method Details- 
setNumTserversCalling this method is optional. If not set, it defaults to two.- Parameters:
- numTservers- the number of tablet servers that mini accumulo cluster should start
 
- 
setNumScanServersCalling this method is optional. If not set, it defaults to zero.- Parameters:
- numScanServers- the number of scan servers that mini accumulo cluster should start
- Since:
- 2.1.0
 
- 
setInstanceNameCalling this method is optional. If not set, defaults to 'miniInstance'- Since:
- 1.6.0
 
- 
setSiteConfigCalling this method is optional. If not set, it defaults to an empty map.- Parameters:
- siteConfig- key/values that you normally put in accumulo.properties can be put here.
 
- 
setZooKeeperPortCalling this method is optional. A random port is generated by default- Parameters:
- zooKeeperPort- A valid (and unused) port to use for the zookeeper
- Since:
- 1.6.0
 
- 
setExistingZooKeepersConfigure an existing ZooKeeper instance to use. Calling this method is optional. If not set, a new ZooKeeper instance is created.- Parameters:
- existingZooKeepers- Connection string for a already-running ZooKeeper instance. A null value will turn off this feature.
- Since:
- 2.1.0
 
- 
setZooKeeperStartupTimeConfigure the time to wait for ZooKeeper to startup. Calling this method is optional. The default is 20000 milliseconds- Parameters:
- zooKeeperStartupTime- Time to wait for ZooKeeper to startup, in milliseconds
- Since:
- 1.6.1
 
- 
setMemorySets the amount of memory to use in the manager process. Calling this method is optional. Default memory is 128M- Parameters:
- serverType- the type of server to apply the memory settings
- memory- amount of memory to set
- memoryUnit- the units for which to apply with the memory size
- Since:
- 1.6.0
 
- 
setDefaultMemorySets the default memory size to use. This value is also used when a ServerType has not been configured explicitly. Calling this method is optional. Default memory is 128M- Parameters:
- memory- amount of memory to set
- memoryUnit- the units for which to apply with the memory size
- Since:
- 1.6.0
 
- 
getSiteConfig- Returns:
- a copy of the site config
 
- 
getInstanceName- Returns:
- name of configured instance
- Since:
- 1.6.0
 
- 
getZooKeeperPortpublic int getZooKeeperPort()- Returns:
- The configured zookeeper port
- Since:
- 1.6.0
 
- 
getMemory- Parameters:
- serverType- get configuration for this server type
- Returns:
- memory configured in bytes, returns default if this server type is not configured
- Since:
- 1.6.0
 
- 
getDefaultMemorypublic long getDefaultMemory()- Returns:
- memory configured in bytes
- Since:
- 1.6.0
 
- 
getDir- Returns:
- the base directory of the cluster configuration
 
- 
getRootPassword- Returns:
- the root password of this cluster configuration
 
- 
getNumTserverspublic int getNumTservers()- Returns:
- the number of tservers configured for this cluster
 
- 
isJDWPEnabledpublic boolean isJDWPEnabled()- Returns:
- is the current configuration in jdwpEnabled mode?
- Since:
- 1.6.0
 
- 
setJDWPEnabled- Parameters:
- jdwpEnabled- should the processes run remote jdwpEnabled servers?
- Returns:
- the current instance
- Since:
- 1.6.0
 
- 
getNativeLibPaths- Returns:
- the paths to use for loading native libraries
- Since:
- 1.6.0
 
- 
setNativeLibPathsSets the path for processes to use for loading native libraries- Parameters:
- nativePathItems- the nativePathItems to set
- Since:
- 1.6.0
 
- 
setClasspathSets the classpath elements to use when spawning processes.- Parameters:
- classpathItems- the classpathItems to set
- Returns:
- the current instance
- Since:
- 2.0.0
 
 
-