Updated Branches: refs/heads/master 2a2f42464 -> 505009437
ACCUMULO-1689 Remove unnecessary javadoc Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/50500943 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/50500943 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/50500943 Branch: refs/heads/master Commit: 5050094377ce9f766a0c449eb05b36405affa9d4 Parents: 2a2f424 Author: Christopher Tubbs <[email protected]> Authored: Mon Sep 9 14:18:45 2013 -0400 Committer: Christopher Tubbs <[email protected]> Committed: Mon Sep 9 14:18:45 2013 -0400 ---------------------------------------------------------------------- .../minicluster/MiniAccumuloConfig.java | 92 ++++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/50500943/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java ---------------------------------------------------------------------- diff --git a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java index 2d6393f..ff18a6d 100644 --- a/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java +++ b/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java @@ -31,34 +31,34 @@ import org.apache.accumulo.server.util.PortUtils; * @since 1.5.0 */ public class MiniAccumuloConfig { - + private static final String DEFAULT_INSTANCE_SECRET = "DONTTELL"; - + private File dir = null; private String rootPassword = null; private Map<String,String> siteConfig = new HashMap<String,String>(); private int numTservers = 2; private Map<ServerType,Long> memoryConfig = new HashMap<ServerType,Long>(); - + private boolean jdwpEnabled = false; - + private String instanceName = "miniInstance"; - + private File libDir; private File confDir; private File zooKeeperDir; private File accumuloDir; private File logDir; private File walogDir; - + private Integer zooKeeperPort; private long defaultMemorySize = 128 * 1024 * 1024; - + private boolean initialized = false; - + private boolean useMiniDFS = false; private boolean runGC = false; - + /** * @param 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 @@ -70,19 +70,19 @@ public class MiniAccumuloConfig { this.dir = dir; this.rootPassword = rootPassword; } - + /** * Set directories and fully populate site config */ MiniAccumuloConfig initialize() { - + // Sanity checks if (this.getDir().exists() && !this.getDir().isDirectory()) throw new IllegalArgumentException("Must pass in directory, " + this.getDir() + " is a file"); - + if (this.getDir().exists() && this.getDir().list().length != 0) throw new IllegalArgumentException("Directory " + this.getDir() + " is not empty"); - + if (!initialized) { libDir = new File(dir, "lib"); confDir = new File(dir, "conf"); @@ -90,13 +90,13 @@ public class MiniAccumuloConfig { zooKeeperDir = new File(dir, "zookeeper"); logDir = new File(dir, "logs"); walogDir = new File(dir, "walogs"); - + String[] paths = {"$ACCUMULO_HOME/lib/.*.jar", "$ZOOKEEPER_HOME/zookeeper[^.].*.jar", "$HADOOP_PREFIX/[^.].*.jar", "$HADOOP_PREFIX/lib/[^.].*.jar", "$HADOOP_PREFIX/share/hadoop/common/.*.jar", "$HADOOP_PREFIX/share/hadoop/common/lib/.*.jar", "$HADOOP_PREFIX/share/hadoop/hdfs/.*.jar", "$HADOOP_PREFIX/share/hadoop/mapreduce/.*.jar"}; - + String classpath = StringUtil.join(Arrays.asList(paths), ","); - + mergeProp(Property.INSTANCE_DFS_URI.getKey(), "file:///"); mergeProp(Property.INSTANCE_DFS_DIR.getKey(), accumuloDir.getAbsolutePath()); mergeProp(Property.INSTANCE_SECRET.getKey(), DEFAULT_INSTANCE_SECRET); @@ -118,7 +118,7 @@ public class MiniAccumuloConfig { mergePropWithRandomPort(Property.TSERV_CLIENTPORT.getKey()); mergePropWithRandomPort(Property.MONITOR_PORT.getKey()); mergePropWithRandomPort(Property.GC_PORT.getKey()); - + // zookeeper port should be set explicitly in this class, not just on the site config if (zooKeeperPort == null) zooKeeperPort = PortUtils.getRandomFreePort(); @@ -127,7 +127,7 @@ public class MiniAccumuloConfig { } return this; } - + /** * Set a given key/value on the site config if it doesn't already exist */ @@ -136,7 +136,7 @@ public class MiniAccumuloConfig { siteConfig.put(key, value); } } - + /** * Sets a given key with a random port for the value on the site config if it doesn't already exist. */ @@ -145,7 +145,7 @@ public class MiniAccumuloConfig { siteConfig.put(key, PortUtils.getRandomFreePort() + ""); } } - + /** * Calling this method is optional. If not set, it defaults to two. * @@ -158,7 +158,7 @@ public class MiniAccumuloConfig { this.numTservers = numTservers; return this; } - + /** * Calling this method is optional. If not set, defaults to 'miniInstance' * @@ -168,7 +168,7 @@ public class MiniAccumuloConfig { this.instanceName = instanceName; return this; } - + /** * Calling this method is optional. If not set, it defaults to an empty map. * @@ -179,7 +179,7 @@ public class MiniAccumuloConfig { this.siteConfig = new HashMap<String,String>(siteConfig); return this; } - + /** * Calling this method is optional. A random port is generated by default * @@ -192,7 +192,7 @@ public class MiniAccumuloConfig { this.zooKeeperPort = zooKeeperPort; return this; } - + /** * Sets the amount of memory to use in the master process. Calling this method is optional. Default memory is 128M * @@ -210,7 +210,7 @@ public class MiniAccumuloConfig { this.memoryConfig.put(serverType, memoryUnit.toBytes(memory)); return this; } - + /** * Sets 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 @@ -227,14 +227,14 @@ public class MiniAccumuloConfig { this.defaultMemorySize = memoryUnit.toBytes(memory); return this; } - + /** * @return a copy of the site config */ public Map<String,String> getSiteConfig() { return new HashMap<String,String>(siteConfig); } - + /** * @return name of configured instance * @@ -243,7 +243,7 @@ public class MiniAccumuloConfig { public String getInstanceName() { return instanceName; } - + /** * @return The configured zookeeper port * @@ -252,31 +252,31 @@ public class MiniAccumuloConfig { public int getZooKeeperPort() { return zooKeeperPort; } - + File getLibDir() { return libDir; } - + File getConfDir() { return confDir; } - + File getZooKeeperDir() { return zooKeeperDir; } - + File getAccumuloDir() { return accumuloDir; } - + public File getLogDir() { return logDir; } - + File getWalogDir() { return walogDir; } - + /** * @param serverType * get configuration for this server type @@ -288,7 +288,7 @@ public class MiniAccumuloConfig { public long getMemory(ServerType serverType) { return memoryConfig.containsKey(serverType) ? memoryConfig.get(serverType) : defaultMemorySize; } - + /** * @return memory configured in bytes * @@ -297,7 +297,7 @@ public class MiniAccumuloConfig { public long getDefaultMemory() { return defaultMemorySize; } - + /** * @return zookeeper connection string * @@ -306,28 +306,28 @@ public class MiniAccumuloConfig { public String getZooKeepers() { return siteConfig.get(Property.INSTANCE_ZK_HOST.getKey()); } - + /** * @return the base directory of the cluster configuration */ public File getDir() { return dir; } - + /** * @return the root password of this cluster configuration */ public String getRootPassword() { return rootPassword; } - + /** * @return the number of tservers configured for this cluster */ public int getNumTservers() { return numTservers; } - + /** * @return is the current configuration in jdwpEnabled mode? * @@ -336,7 +336,7 @@ public class MiniAccumuloConfig { public boolean isJDWPEnabled() { return jdwpEnabled; } - + /** * @param jdwpEnabled * should the processes run remote jdwpEnabled servers? @@ -348,25 +348,25 @@ public class MiniAccumuloConfig { this.jdwpEnabled = jdwpEnabled; return this; } - + public boolean useMiniDFS() { return useMiniDFS; } - + public void useMiniDFS(boolean useMiniDFS) { this.useMiniDFS = useMiniDFS; } /** * Whether or not the Accumulo garbage collector proces will run - * @return */ public boolean shouldRunGC() { return runGC; } - + /** * Sets if the Accumulo garbage collector process should run + * * @param shouldRunGC */ public void runGC(boolean shouldRunGC) {
