public class MiniAccumuloConfig extends Object
MiniAccumuloCluster
. Required configurations must be passed to constructor(s) and all other configurations are optional.Constructor and Description |
---|
MiniAccumuloConfig(File dir,
String rootPassword) |
Modifier and Type | Method and Description |
---|---|
long |
getDefaultMemory() |
File |
getDir() |
String |
getInstanceName() |
long |
getMemory(ServerType serverType) |
String[] |
getNativeLibPaths() |
int |
getNumTservers() |
String |
getRootPassword() |
Map<String,String> |
getSiteConfig() |
int |
getZooKeeperPort() |
boolean |
isJDWPEnabled() |
MiniAccumuloConfig |
setDefaultMemory(long memory,
MemoryUnit memoryUnit)
Sets the default memory size to use.
|
MiniAccumuloConfig |
setInstanceName(String instanceName)
Calling this method is optional.
|
MiniAccumuloConfig |
setJDWPEnabled(boolean jdwpEnabled) |
MiniAccumuloConfig |
setMemory(ServerType serverType,
long memory,
MemoryUnit memoryUnit)
Sets the amount of memory to use in the master process.
|
MiniAccumuloConfig |
setNativeLibPaths(String... nativePathItems)
Sets the path for processes to use for loading native libraries
|
MiniAccumuloConfig |
setNumTservers(int numTservers)
Calling this method is optional.
|
MiniAccumuloConfig |
setSiteConfig(Map<String,String> siteConfig)
Calling this method is optional.
|
MiniAccumuloConfig |
setZooKeeperPort(int zooKeeperPort)
Calling this method is optional.
|
MiniAccumuloConfig |
setZooKeeperStartupTime(long zooKeeperStartupTime)
Configure the time to wait for ZooKeeper to startup.
|
public MiniAccumuloConfig(File dir, String rootPassword)
dir
- An empty or nonexistant 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 userpublic MiniAccumuloConfig setNumTservers(int numTservers)
numTservers
- the number of tablet servers that mini accumulo cluster should startpublic MiniAccumuloConfig setInstanceName(String instanceName)
public MiniAccumuloConfig setSiteConfig(Map<String,String> siteConfig)
siteConfig
- key/values that you normally put in accumulo-site.xml can be put here.public MiniAccumuloConfig setZooKeeperPort(int zooKeeperPort)
zooKeeperPort
- A valid (and unused) port to use for the zookeeperpublic MiniAccumuloConfig setZooKeeperStartupTime(long zooKeeperStartupTime)
zooKeeperStartupTime
- Time to wait for ZooKeeper to startup, in millisecondspublic MiniAccumuloConfig setMemory(ServerType serverType, long memory, MemoryUnit memoryUnit)
serverType
- the type of server to apply the memory settingsmemory
- amount of memory to setmemoryUnit
- the units for which to apply with the memory sizepublic MiniAccumuloConfig setDefaultMemory(long memory, MemoryUnit memoryUnit)
memory
- amount of memory to setmemoryUnit
- the units for which to apply with the memory sizepublic String getInstanceName()
public int getZooKeeperPort()
public long getMemory(ServerType serverType)
serverType
- get configuration for this server typepublic long getDefaultMemory()
public File getDir()
public String getRootPassword()
public int getNumTservers()
public boolean isJDWPEnabled()
public MiniAccumuloConfig setJDWPEnabled(boolean jdwpEnabled)
jdwpEnabled
- should the processes run remote jdwpEnabled servers?public String[] getNativeLibPaths()
public MiniAccumuloConfig setNativeLibPaths(String... nativePathItems)
nativePathItems
- the nativePathItems to setCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.