public class MiniAccumuloConfigImpl extends Object
MiniAccumuloClusterImpl. Required configurations must be passed
to constructor(s) and all other configurations are optional.| Constructor and Description |
|---|
MiniAccumuloConfigImpl(File dir,
String rootPassword) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.conf.Configuration |
getAccumuloConfiguration() |
File |
getAccumuloDir() |
String[] |
getClasspathItems()
Gets the classpath elements to use when spawning processes.
|
File |
getClientConfFile() |
File |
getConfDir() |
Map<String,String> |
getConfiguredSiteConfig() |
int |
getConfiguredZooKeeperPort() |
long |
getDefaultMemory() |
File |
getDir() |
String |
getExistingZooKeepers() |
File |
getHadoopConfDir() |
org.apache.hadoop.conf.Configuration |
getHadoopConfiguration() |
String |
getInstanceName() |
File |
getLogDir() |
long |
getMemory(ServerType serverType) |
String[] |
getNativeLibPaths() |
int |
getNumTservers() |
String |
getRootPassword() |
String |
getRootUserName() |
Map<String,String> |
getSiteConfig() |
Map<String,String> |
getSystemProperties() |
int |
getZooKeeperPort() |
String |
getZooKeepers() |
long |
getZooKeeperStartupTime() |
boolean |
isJDWPEnabled() |
boolean |
isUseCredentialProvider() |
void |
setClasspathItems(String... classpathItems)
Sets the classpath elements to use when spawning processes.
|
MiniAccumuloConfigImpl |
setDefaultMemory(long memory,
MemoryUnit memoryUnit)
Sets the default memory size to use.
|
MiniAccumuloConfigImpl |
setExistingZooKeepers(String existingZooKeepers)
Configure an existing ZooKeeper instance to use.
|
MiniAccumuloConfigImpl |
setInstanceName(String instanceName)
Calling this method is optional.
|
MiniAccumuloConfigImpl |
setJDWPEnabled(boolean jdwpEnabled) |
MiniAccumuloConfigImpl |
setMemory(ServerType serverType,
long memory,
MemoryUnit memoryUnit)
Sets the amount of memory to use in the master process.
|
MiniAccumuloConfigImpl |
setNativeLibPaths(String... nativePathItems)
Sets the path for processes to use for loading native libraries
|
MiniAccumuloConfigImpl |
setNumTservers(int numTservers)
Calling this method is optional.
|
void |
setProperty(Property p,
String value)
Sets arbitrary configuration properties.
|
void |
setRootUserName(String rootUserName)
Sets the default Accumulo "superuser".
|
MiniAccumuloConfigImpl |
setSiteConfig(Map<String,String> siteConfig)
Calling this method is optional.
|
void |
setSystemProperties(Map<String,String> systemProperties)
sets system properties set for service processes
|
void |
setUseCredentialProvider(boolean useCredentialProvider) |
MiniAccumuloConfigImpl |
setZooKeeperPort(int zooKeeperPort)
Calling this method is optional.
|
MiniAccumuloConfigImpl |
setZooKeeperStartupTime(long zooKeeperStartupTime)
Configure the time to wait for ZooKeeper to startup.
|
boolean |
useExistingInstance() |
MiniAccumuloConfigImpl |
useExistingInstance(File accumuloSite,
File hadoopConfDir)
Informs MAC that it's running against an existing accumulo instance.
|
boolean |
useExistingZooKeepers() |
boolean |
useMiniDFS() |
void |
useMiniDFS(boolean useMiniDFS)
Configures this cluster to use miniDFS instead of the local
FileSystem. |
public MiniAccumuloConfigImpl(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 MiniAccumuloConfigImpl setNumTservers(int numTservers)
numTservers - the number of tablet servers that mini accumulo cluster should startpublic MiniAccumuloConfigImpl setInstanceName(String instanceName)
public MiniAccumuloConfigImpl setSiteConfig(Map<String,String> siteConfig)
siteConfig - key/values that you normally put in accumulo-site.xml can be put here.public MiniAccumuloConfigImpl setZooKeeperPort(int zooKeeperPort)
zooKeeperPort - A valid (and unused) port to use for the zookeeperpublic MiniAccumuloConfigImpl setZooKeeperStartupTime(long zooKeeperStartupTime)
zooKeeperStartupTime - Time to wait for ZooKeeper to startup, in millisecondspublic MiniAccumuloConfigImpl setExistingZooKeepers(String existingZooKeepers)
existingZooKeepers - Connection string for a already-running ZooKeeper instance. A null value will turn off
this feature.public MiniAccumuloConfigImpl 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 MiniAccumuloConfigImpl 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 int getConfiguredZooKeeperPort()
public long getZooKeeperStartupTime()
public String getExistingZooKeepers()
public boolean useExistingZooKeepers()
public File getConfDir()
public File getAccumuloDir()
public File getLogDir()
public long getMemory(ServerType serverType)
serverType - get configuration for this server typepublic long getDefaultMemory()
public String getZooKeepers()
public File getDir()
public String getRootPassword()
public int getNumTservers()
public boolean isJDWPEnabled()
public MiniAccumuloConfigImpl setJDWPEnabled(boolean jdwpEnabled)
jdwpEnabled - should the processes run remote jdwpEnabled servers?public boolean useMiniDFS()
public void useMiniDFS(boolean useMiniDFS)
FileSystem. Using this
feature will not allow you to re-start MiniAccumuloCluster by calling
MiniAccumuloCluster.start() after MiniAccumuloCluster.stop(), because the
underlying miniDFS cannot be restarted.public File getClientConfFile()
public void setSystemProperties(Map<String,String> systemProperties)
public Map<String,String> getSystemProperties()
public String[] getClasspathItems()
public void setClasspathItems(String... classpathItems)
classpathItems - the classpathItems to setpublic String[] getNativeLibPaths()
public MiniAccumuloConfigImpl setNativeLibPaths(String... nativePathItems)
nativePathItems - the nativePathItems to setpublic void setProperty(Property p, String value)
public boolean isUseCredentialProvider()
public void setUseCredentialProvider(boolean useCredentialProvider)
useCredentialProvider - the useCredentialProvider to setpublic MiniAccumuloConfigImpl useExistingInstance(File accumuloSite, File hadoopConfDir) throws IOException
accumuloSite - a File representation of the accumulo-site.xml file for the instance being runhadoopConfDir - a File representation of the hadoop configuration directory containing core-site.xml
and hdfs-site.xmlIOException - when there are issues converting the provided Files to URLspublic boolean useExistingInstance()
public File getHadoopConfDir()
public org.apache.hadoop.conf.Configuration getAccumuloConfiguration()
public org.apache.hadoop.conf.Configuration getHadoopConfiguration()
public String getRootUserName()
public void setRootUserName(String rootUserName)
rootUserName - The name of the user to create with administrative permissions during initializationCopyright © 2011–2019 The Apache Software Foundation. All rights reserved.