accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cjno...@apache.org
Subject svn commit: r1484912 - in /accumulo/trunk: ./ assemble/ docs/src/main/latex/accumulo_user_manual/chapters/ minicluster/ minicluster/src/main/java/org/apache/accumulo/minicluster/ minicluster/src/test/java/org/apache/accumulo/minicluster/ proxy/ proxy/s...
Date Tue, 21 May 2013 19:26:53 GMT
Author: cjnolet
Date: Tue May 21 19:26:52 2013
New Revision: 1484912

URL: http://svn.apache.org/r1484912
Log:
ACCUMULO-1438, ACCUMULO-1414 merging to trunk

Added:
    accumulo/trunk/minicluster/   (props changed)
      - copied from r1484904, accumulo/branches/1.5/minicluster/
    accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/MemoryUnit.java
      - copied, changed from r1484903, accumulo/trunk/server/src/main/java/org/apache/accumulo/server/mini/MemoryUnit.java
    accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java
      - copied, changed from r1484903, accumulo/trunk/server/src/main/java/org/apache/accumulo/server/mini/MiniAccumuloRunner.java
    accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/ServerType.java
      - copied, changed from r1484903, accumulo/trunk/server/src/main/java/org/apache/accumulo/server/mini/ServerType.java
    accumulo/trunk/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloConfigTest.java
      - copied, changed from r1484903, accumulo/trunk/server/src/test/java/org/apache/accumulo/server/mini/MiniAccumuloConfigTest.java
Removed:
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/mini/
    accumulo/trunk/server/src/test/java/org/apache/accumulo/server/mini/
    accumulo/trunk/server/src/test/resources/FooFilter.jar
Modified:
    accumulo/trunk/   (props changed)
    accumulo/trunk/assemble/   (props changed)
    accumulo/trunk/assemble/pom.xml
    accumulo/trunk/docs/src/main/latex/accumulo_user_manual/chapters/clients.tex
    accumulo/trunk/minicluster/pom.xml
    accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
    accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java
    accumulo/trunk/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterTest.java
    accumulo/trunk/pom.xml   (contents, props changed)
    accumulo/trunk/proxy/pom.xml
    accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java
    accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java
    accumulo/trunk/server/   (props changed)
    accumulo/trunk/server/pom.xml
    accumulo/trunk/server/src/test/resources/log4j.properties
    accumulo/trunk/test/pom.xml
    accumulo/trunk/test/src/test/java/org/apache/accumulo/fate/zookeeper/ZooLockTest.java
    accumulo/trunk/test/src/test/java/org/apache/accumulo/test/MetaSplitTest.java
    accumulo/trunk/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java
    accumulo/trunk/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java
    accumulo/trunk/test/src/test/java/org/apache/accumulo/test/TestAccumuloSplitRecovery.java

Propchange: accumulo/trunk/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5:r1484867-1484904

Propchange: accumulo/trunk/assemble/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/assemble:r1484297-1484330,1484332-1484336,1484340-1484579,1484581-1484904

Modified: accumulo/trunk/assemble/pom.xml
URL: http://svn.apache.org/viewvc/accumulo/trunk/assemble/pom.xml?rev=1484912&r1=1484911&r2=1484912&view=diff
==============================================================================
--- accumulo/trunk/assemble/pom.xml (original)
+++ accumulo/trunk/assemble/pom.xml Tue May 21 19:26:52 2013
@@ -51,6 +51,10 @@
     </dependency>
     <dependency>
       <groupId>org.apache.accumulo</groupId>
+      <artifactId>accumulo-minicluster</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.accumulo</groupId>
       <artifactId>accumulo-proxy</artifactId>
     </dependency>
     <dependency>

Modified: accumulo/trunk/docs/src/main/latex/accumulo_user_manual/chapters/clients.tex
URL: http://svn.apache.org/viewvc/accumulo/trunk/docs/src/main/latex/accumulo_user_manual/chapters/clients.tex?rev=1484912&r1=1484911&r2=1484912&view=diff
==============================================================================
--- accumulo/trunk/docs/src/main/latex/accumulo_user_manual/chapters/clients.tex (original)
+++ accumulo/trunk/docs/src/main/latex/accumulo_user_manual/chapters/clients.tex Tue May 21 19:26:52 2013
@@ -37,7 +37,7 @@ configured Accumulo system to see what i
 
 \small 
 \begin{verbatim} 
-$ACCUMULO_HOME/bin/accumulo classpath 
+$ACCUMULO_HOME/bin/accumulo classpath
 \end{verbatim}
 \normalsize
 
@@ -168,7 +168,7 @@ crash a tablet server. By default rows a
 can easily supply their own buffer if they wish to buffer to disk when rows are
 large.
 
-For an example, look at the following\\ 
+For an example, look at the following\\
 \texttt{examples/simple/src/main/java/org/apache/accumulo/examples/simple/isolation/InterferenceTest.java}
 
 \subsection{BatchScanner}
@@ -193,7 +193,6 @@ BatchScanner bscan =
 
 bscan.setRanges(ranges);
 bscan.fetchFamily("attributes");
-
 for(Entry<Key,Value> entry : scan)
     System.out.println(entry.getValue());
 \end{verbatim}
@@ -202,3 +201,132 @@ for(Entry<Key,Value> entry : scan)
 An example of the BatchScanner can be found at\\
 accumulo/docs/examples/README.batch
 
+\section{Proxy}
+
+The proxy API allows the interaction with Accumulo with languages other than Java.
+A proxy server is provided in the codebase and a client can further be generated.
+
+\subsection{Prequisites}
+
+The proxy server can live on any node in which the basic client API would work. That
+means it must be able to communicate with the Master, ZooKeepers, NameNode, and the
+Data nodes. A proxy client only needs the ability to communicate with the proxy server.
+
+
+\subsection{Configuration}
+
+The configuration options for the proxy server live inside of a properties file. At
+the very least, you need to supply the following properties:
+
+\small
+\begin{verbatim}
+protocolFactory=org.apache.thrift.protocol.TCompactProtocol$Factory
+tokenClass=org.apache.accumulo.core.client.security.tokens.PasswordToken
+port=42424
+instance=test
+zookeepers=localhost:2181
+\end{verbatim}
+\normalsize
+
+You can find a sample configuration file in your distribution:
+
+\small
+\begin{verbatim}
+$ACCUMULO_HOME/proxy/proxy.properties.
+\end{verbatim}
+\normalsize
+
+This sample configuration file further demonstrates an abilty to back the proxy server
+by MockAccumulo or the MiniAccumuloCluster.
+
+\subsection{Running the Proxy Server}
+
+After the properties file holding the configuration is created, the proxy server
+can be started using the following command in the Accumulo distribution (assuming
+you your properties file is named config.properties):
+
+\small
+\begin{verbatim}
+$ACCUMULO_HOME/bin/accumulo proxy -p config.properties
+\end{verbatim}
+\normalsize
+
+\subsection{Creating a Proxy Client}
+
+Aside from installing the Thrift compiler, you will also need the language-specific library
+for Thrift installed to generate client code in that language. Typically, your operating
+system's package manager will be able to automatically install these for you in an expected
+location such as /usr/lib/python/site-packages/thrift.
+
+You can find the thrift file for generating the client:
+
+\small
+\begin{verbatim}
+$ACCUMULO_HOME/proxy/proxy.thrift.
+\end{verbatim}
+\normalsize
+
+After a client is generated, the port specified in the configuration properties above will be
+used to connect to the server.
+
+\subsection{Using a Proxy Client}
+
+The following examples have been written in Java and the method signatures may be
+slightly different depending on the language specified when generating client with
+the Thrift compiler. After initiating a connection to the Proxy (see Apache Thrift's
+documentation for examples of connecting to a Thrift service), the methods on the
+proxy client will be available. The first thing to do is log in:
+
+\small
+\begin{verbatim}
+Map password = new HashMap<String,String>();
+password.put("password", "secret");
+ByteBuffer token = client.login("root", password);
+\end{verbatim}
+\normalsize
+
+Once logged in, the token returned will be used for most subsequent calls to the client.
+Let's create a table, add some data, scan the table, and delete it.
+
+
+First, create a table.
+
+\small
+\begin{verbatim}
+client.createTable(token, "myTable", true, TimeType.MILLIS);
+\end{verbatim}
+\normalsize
+
+
+Next, add some data:
+
+\small
+\begin{verbatim}
+// first, create a writer on the server
+String writer = client.createWriter(token, "myTable", new WriterOptions());
+
+// build column updates
+Map<ByteBuffer, List<ColumnUpdate> cells> cellsToUpdate = //...
+
+// send updates to the server
+client.updateAndFlush(writer, "myTable", cellsToUpdate);
+
+client.closeWriter(writer);
+\end{verbatim}
+\normalsize
+
+
+Scan for the data and batch the return of the results on the server:
+
+\small
+\begin{verbatim}
+String scanner = client.createScanner(token, "myTable", new ScanOptions());
+ScanResult results = client.nextK(scanner, 100);
+
+for(KeyValue keyValue : results.getResultsIterator()) {
+  // do something with results
+}
+
+client.closeScanner(scanner);
+\end{verbatim}
+\normalsize
\ No newline at end of file

Propchange: accumulo/trunk/minicluster/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue May 21 19:26:52 2013
@@ -0,0 +1,5 @@
+target
+.project
+.settings
+.classpath
+accumulo-minicluster.iml

Modified: accumulo/trunk/minicluster/pom.xml
URL: http://svn.apache.org/viewvc/accumulo/trunk/minicluster/pom.xml?rev=1484912&r1=1484904&r2=1484912&view=diff
==============================================================================
Binary files - no diff available.

Copied: accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/MemoryUnit.java (from r1484903, accumulo/trunk/server/src/main/java/org/apache/accumulo/server/mini/MemoryUnit.java)
URL: http://svn.apache.org/viewvc/accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/MemoryUnit.java?p2=accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/MemoryUnit.java&p1=accumulo/trunk/server/src/main/java/org/apache/accumulo/server/mini/MemoryUnit.java&r1=1484903&r2=1484912&rev=1484912&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/mini/MemoryUnit.java (original)
+++ accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/MemoryUnit.java Tue May 21 19:26:52 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.accumulo.server.mini;
+package org.apache.accumulo.minicluster;
 
 /**
  * @since 1.6.0

Modified: accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java?rev=1484912&r1=1484904&r2=1484912&view=diff
==============================================================================
--- accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java (original)
+++ accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloCluster.java Tue May 21 19:26:52 2013
@@ -25,13 +25,14 @@ import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.HashMap;
+import java.util.Collections;
+import java.util.HashSet;
 import java.util.List;
-import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Properties;
+import java.util.Set;
 
-import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.server.master.Master;
 import org.apache.accumulo.server.tabletserver.TabletServer;
@@ -43,19 +44,16 @@ import org.apache.zookeeper.server.ZooKe
 
 /**
  * A utility class that will create Zookeeper and Accumulo processes that write all of their data to a single local directory. This class makes it easy to test
- * code against a real Accumulo instance. Its much more accurate for testing than MockAccumulo, but much slower than MockAccumulo.
- * 
+ * code against a real Accumulo instance. Its much more accurate for testing than {@link org.apache.accumulo.core.client.mock.MockAccumulo}, but much slower.
+ *
  * @since 1.5.0
  */
 public class MiniAccumuloCluster {
-  
-  private static final String INSTANCE_SECRET = "DONTTELL";
-  private static final String INSTANCE_NAME = "miniInstance";
-  
+
   private static class LogWriter extends Thread {
     private BufferedReader in;
     private BufferedWriter out;
-    
+
     /**
      * @throws IOException
      */
@@ -63,7 +61,7 @@ public class MiniAccumuloCluster {
       this.setDaemon(true);
       this.in = new BufferedReader(new InputStreamReader(stream));
       out = new BufferedWriter(new FileWriter(logFile));
-      
+
       SimpleTimer.getInstance().schedule(new Runnable() {
         @Override
         public void run() {
@@ -75,71 +73,68 @@ public class MiniAccumuloCluster {
         }
       }, 1000, 1000);
     }
-    
+
     public synchronized void flush() throws IOException {
       if (out != null)
         out.flush();
     }
-    
+
     @Override
     public void run() {
       String line;
-      
+
       try {
         while ((line = in.readLine()) != null) {
           out.append(line);
           out.append("\n");
         }
-        
+
         synchronized (this) {
           out.close();
           out = null;
           in.close();
         }
-        
+
       } catch (IOException e) {}
     }
   }
-  
-  private File libDir;
-  private File confDir;
-  private File zooKeeperDir;
-  private File accumuloDir;
-  private File zooCfgFile;
-  private File logDir;
-  private File walogDir;
-  
+
   private Process zooKeeperProcess;
   private Process masterProcess;
-  
-  private int zooKeeperPort;
-  
+  private Process[] tabletServerProcesses;
+
+  private Set<Pair<ServerType,Integer>> debugPorts = new HashSet<Pair<ServerType,Integer>>();
+
+  private File zooCfgFile;
+
   private List<LogWriter> logWriters = new ArrayList<MiniAccumuloCluster.LogWriter>();
-  
+
   private MiniAccumuloConfig config;
-  private Process[] tabletServerProcesses;
-  
+
   private Process exec(Class<? extends Object> clazz, String... args) throws IOException {
+    return exec(clazz, Collections.singletonList("-Xmx" + config.getDefaultMemory()), args);
+  }
+
+  private Process exec(Class<? extends Object> clazz, List<String> extraJvmOpts, String... args) throws IOException {
     String javaHome = System.getProperty("java.home");
     String javaBin = javaHome + File.separator + "bin" + File.separator + "java";
     String classpath = System.getProperty("java.class.path");
-    
-    classpath = confDir.getAbsolutePath() + File.pathSeparator + classpath;
-    
+
+    classpath = config.getConfDir().getAbsolutePath() + File.pathSeparator + classpath;
+
     String className = clazz.getCanonicalName();
-    
+
     ArrayList<String> argList = new ArrayList<String>();
-    
-    argList.addAll(Arrays.asList(javaBin, "-cp", classpath, "-Xmx128m", "-XX:+UseConcMarkSweepGC", "-XX:CMSInitiatingOccupancyFraction=75",
-        Main.class.getName(), className));
-    
+    argList.addAll(Arrays.asList(javaBin, "-cp", classpath));
+    argList.addAll(extraJvmOpts);
+    argList.addAll(Arrays.asList("-XX:+UseConcMarkSweepGC", "-XX:CMSInitiatingOccupancyFraction=75", Main.class.getName(), className));
     argList.addAll(Arrays.asList(args));
-    
+
     ProcessBuilder builder = new ProcessBuilder(argList);
-    
+
     builder.environment().put("ACCUMULO_HOME", config.getDir().getAbsolutePath());
-    builder.environment().put("ACCUMULO_LOG_DIR", logDir.getAbsolutePath());
-    
+    builder.environment().put("ACCUMULO_LOG_DIR", config.getLogDir().getAbsolutePath());
+
     // if we're running under accumulo.start, we forward these env vars
     String env = System.getenv("HADOOP_PREFIX");
     if (env != null)
@@ -147,31 +142,35 @@ public class MiniAccumuloCluster {
     env = System.getenv("ZOOKEEPER_HOME");
     if (env != null)
       builder.environment().put("ZOOKEEPER_HOME", env);
-    
+
     Process process = builder.start();
-    
+
     LogWriter lw;
-    lw = new LogWriter(process.getErrorStream(), new File(logDir, clazz.getSimpleName() + "_" + process.hashCode() + ".err"));
+    lw = new LogWriter(process.getErrorStream(), new File(config.getLogDir(), clazz.getSimpleName() + "_" + process.hashCode() + ".err"));
     logWriters.add(lw);
     lw.start();
-    lw = new LogWriter(process.getInputStream(), new File(logDir, clazz.getSimpleName() + "_" + process.hashCode() + ".out"));
+    lw = new LogWriter(process.getInputStream(), new File(config.getLogDir(), clazz.getSimpleName() + "_" + process.hashCode() + ".out"));
     logWriters.add(lw);
     lw.start();
-    
+
     return process;
   }
-  
-  private void appendProp(FileWriter fileWriter, Property key, String value, Map<String,String> siteConfig) throws IOException {
-    appendProp(fileWriter, key.getKey(), value, siteConfig);
-  }
-  
-  private void appendProp(FileWriter fileWriter, String key, String value, Map<String,String> siteConfig) throws IOException {
-    if (!siteConfig.containsKey(key))
-      fileWriter.append("<property><name>" + key + "</name><value>" + value + "</value></property>\n");
+
+  private Process exec(Class<? extends Object> clazz, ServerType serverType, String... args) throws IOException {
+
+    List<String> jvmOpts = new ArrayList<String>();
+    jvmOpts.add("-Xmx" + config.getMemory(serverType));
+
+    if (config.isJWDPEnabled()) {
+      Integer port = PortUtils.getRandomFreePort();
+      jvmOpts.addAll(buildRemoteDebugParams(port));
+      debugPorts.add(new Pair<ServerType,Integer>(serverType, port));
+    }
+    return exec(clazz, jvmOpts, args);
   }
-  
+
   /**
-   * 
+   *
    * @param 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.
@@ -182,104 +181,67 @@ public class MiniAccumuloCluster {
   public MiniAccumuloCluster(File dir, String rootPassword) throws IOException {
     this(new MiniAccumuloConfig(dir, rootPassword));
   }
-  
+
   /**
    * @param config
    *          initial configuration
    * @throws IOException
    */
-  
   public MiniAccumuloCluster(MiniAccumuloConfig config) throws IOException {
-    
+
     if (config.getDir().exists() && !config.getDir().isDirectory())
       throw new IllegalArgumentException("Must pass in directory, " + config.getDir() + " is a file");
-    
+
     if (config.getDir().exists() && config.getDir().list().length != 0)
       throw new IllegalArgumentException("Directory " + config.getDir() + " is not empty");
-    
-    this.config = config;
-    
-    libDir = new File(config.getDir(), "lib");
-    confDir = new File(config.getDir(), "conf");
-    accumuloDir = new File(config.getDir(), "accumulo");
-    zooKeeperDir = new File(config.getDir(), "zookeeper");
-    logDir = new File(config.getDir(), "logs");
-    walogDir = new File(config.getDir(), "walogs");
-    
-    confDir.mkdirs();
-    accumuloDir.mkdirs();
-    zooKeeperDir.mkdirs();
-    logDir.mkdirs();
-    walogDir.mkdirs();
-    libDir.mkdirs();
-    
-    zooKeeperPort = PortUtils.getRandomFreePort();
-    
-    File siteFile = new File(confDir, "accumulo-site.xml");
-    
+
+    this.config = config.initialize();
+
+    config.getConfDir().mkdirs();
+    config.getAccumuloDir().mkdirs();
+    config.getZooKeeperDir().mkdirs();
+    config.getLogDir().mkdirs();
+    config.getWalogDir().mkdirs();
+    config.getLibDir().mkdirs();
+
+    File siteFile = new File(config.getConfDir(), "accumulo-site.xml");
+
     FileWriter fileWriter = new FileWriter(siteFile);
     fileWriter.append("<configuration>\n");
-    
-    HashMap<String,String> siteConfig = new HashMap<String,String>(config.getSiteConfig());
-    
-    appendProp(fileWriter, Property.INSTANCE_DFS_URI, "file:///", siteConfig);
-    appendProp(fileWriter, Property.INSTANCE_DFS_DIR, accumuloDir.getAbsolutePath(), siteConfig);
-    appendProp(fileWriter, Property.INSTANCE_ZK_HOST, "localhost:" + zooKeeperPort, siteConfig);
-    appendProp(fileWriter, Property.INSTANCE_SECRET, INSTANCE_SECRET, siteConfig);
-    appendProp(fileWriter, Property.MASTER_CLIENTPORT, "" + PortUtils.getRandomFreePort(), siteConfig);
-    appendProp(fileWriter, Property.TSERV_CLIENTPORT, "" + PortUtils.getRandomFreePort(), siteConfig);
-    appendProp(fileWriter, Property.TSERV_PORTSEARCH, "true", siteConfig);
-    appendProp(fileWriter, Property.LOGGER_DIR, walogDir.getAbsolutePath(), siteConfig);
-    appendProp(fileWriter, Property.TSERV_DATACACHE_SIZE, "10M", siteConfig);
-    appendProp(fileWriter, Property.TSERV_INDEXCACHE_SIZE, "10M", siteConfig);
-    appendProp(fileWriter, Property.TSERV_MAXMEM, "50M", siteConfig);
-    appendProp(fileWriter, Property.TSERV_WALOG_MAX_SIZE, "100M", siteConfig);
-    appendProp(fileWriter, Property.TSERV_NATIVEMAP_ENABLED, "false", siteConfig);
-    appendProp(fileWriter, Property.TRACE_TOKEN_PROPERTY_PREFIX + ".password", config.getRootPassword(), siteConfig);
-    appendProp(fileWriter, Property.TRACE_PORT, "" + PortUtils.getRandomFreePort(), siteConfig);
-    // since there is a small amount of memory, check more frequently for majc... setting may not be needed in 1.5
-    appendProp(fileWriter, Property.TSERV_MAJC_DELAY, "3", siteConfig);
-    String cp = System.getenv("ACCUMULO_HOME") + "/lib/.*.jar," + "$ZOOKEEPER_HOME/zookeeper[^.].*.jar," + "$HADOOP_HOME/[^.].*.jar,"
-        + "$HADOOP_HOME/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";
-    appendProp(fileWriter, Property.GENERAL_CLASSPATHS, cp, siteConfig);
-    appendProp(fileWriter, Property.GENERAL_DYNAMIC_CLASSPATHS, libDir.getAbsolutePath(), siteConfig);
-    
-    for (Entry<String,String> entry : siteConfig.entrySet())
+
+    for (Entry<String,String> entry : config.getSiteConfig().entrySet())
       fileWriter.append("<property><name>" + entry.getKey() + "</name><value>" + entry.getValue() + "</value></property>\n");
     fileWriter.append("</configuration>\n");
     fileWriter.close();
-    
-    zooCfgFile = new File(confDir, "zoo.cfg");
+
+    zooCfgFile = new File(config.getConfDir(), "zoo.cfg");
     fileWriter = new FileWriter(zooCfgFile);
-    
+
     // zookeeper uses Properties to read its config, so use that to write in order to properly escape things like Windows paths
     Properties zooCfg = new Properties();
     zooCfg.setProperty("tickTime", "1000");
     zooCfg.setProperty("initLimit", "10");
     zooCfg.setProperty("syncLimit", "5");
-    zooCfg.setProperty("clientPort", zooKeeperPort + "");
+    zooCfg.setProperty("clientPort", config.getZooKeeperPort() + "");
     zooCfg.setProperty("maxClientCnxns", "100");
-    zooCfg.setProperty("dataDir", zooKeeperDir.getAbsolutePath());
+    zooCfg.setProperty("dataDir", config.getZooKeeperDir().getAbsolutePath());
     zooCfg.store(fileWriter, null);
-    
+
     fileWriter.close();
-    
   }
-  
+
   /**
    * Starts Accumulo and Zookeeper processes. Can only be called once.
-   * 
+   *
    * @throws IOException
    * @throws InterruptedException
    * @throws IllegalStateException
    *           if already started
    */
-  
   public void start() throws IOException, InterruptedException {
     if (zooKeeperProcess != null)
       throw new IllegalStateException("Already started");
-    
+
     Runtime.getRuntime().addShutdownHook(new Thread() {
       @Override
       public void run() {
@@ -292,50 +254,60 @@ public class MiniAccumuloCluster {
         }
       }
     });
-    
-    zooKeeperProcess = exec(Main.class, ZooKeeperServerMain.class.getName(), zooCfgFile.getAbsolutePath());
-    
+
+    zooKeeperProcess = exec(Main.class, ServerType.ZOOKEEPER, ZooKeeperServerMain.class.getName(), zooCfgFile.getAbsolutePath());
+
     // sleep a little bit to let zookeeper come up before calling init, seems to work better
     UtilWaitThread.sleep(250);
-    
-    Process initProcess = exec(Initialize.class, "--instance-name", INSTANCE_NAME, "--password", config.getRootPassword(), "--username", "root");
+
+    Process initProcess = exec(Initialize.class, "--instance-name", config.getInstanceName(), "--password", config.getRootPassword(), "--username", "root");
     int ret = initProcess.waitFor();
     if (ret != 0) {
       throw new RuntimeException("Initialize process returned " + ret);
     }
-    
+
     tabletServerProcesses = new Process[config.getNumTservers()];
     for (int i = 0; i < config.getNumTservers(); i++) {
-      tabletServerProcesses[i] = exec(TabletServer.class);
+      tabletServerProcesses[i] = exec(TabletServer.class, ServerType.TABLET_SERVER);
     }
-    
-    masterProcess = exec(Master.class);
+
+    masterProcess = exec(Master.class, ServerType.MASTER);
+  }
+
+  private List<String> buildRemoteDebugParams(int port) {
+    return Arrays.asList(new String[] {"-Xdebug", String.format("-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=%d", port)});
+  }
+
+  /**
+   * @return generated remote debug ports if in debug mode.
+   *
+   * @since 1.6.0
+   */
+  public Set<Pair<ServerType,Integer>> getDebugPorts() {
+    return debugPorts;
   }
-  
+
   /**
    * @return Accumulo instance name
    */
-  
   public String getInstanceName() {
-    return INSTANCE_NAME;
+    return config.getInstanceName();
   }
-  
+
   /**
    * @return zookeeper connection string
    */
-  
   public String getZooKeepers() {
-    return "localhost:" + zooKeeperPort;
+    return config.getZooKeepers();
   }
-  
+
   /**
-   * Stops Accumulo and Zookeeper processes. If stop is not called, there is a shutdown hook that is setup to kill the processes. Howerver its probably best to
+   * Stops Accumulo and Zookeeper processes. If stop is not called, there is a shutdown hook that is setup to kill the processes. However its probably best to
    * call stop in a finally block as soon as possible.
-   * 
+   *
    * @throws IOException
    * @throws InterruptedException
    */
-  
   public void stop() throws IOException, InterruptedException {
     if (zooKeeperProcess != null)
       zooKeeperProcess.destroy();
@@ -346,8 +318,15 @@ public class MiniAccumuloCluster {
         tserver.destroy();
       }
     }
-    
+
     for (LogWriter lw : logWriters)
       lw.flush();
   }
+
+  /**
+   * @since 1.6.0
+   */
+  public MiniAccumuloConfig getConfig() {
+    return config;
+  }
 }

Modified: accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java?rev=1484912&r1=1484904&r2=1484912&view=diff
==============================================================================
--- accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java (original)
+++ accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloConfig.java Tue May 21 19:26:52 2013
@@ -17,45 +17,116 @@
 package org.apache.accumulo.minicluster;
 
 import java.io.File;
-import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.server.util.PortUtils;
+
 /**
- * Holds configuration for {@link MiniAccumuloCluster}. Required configurations must be passed to constructor and all other configurations are optional.
+ * Holds configuration for {@link org.apache.accumulo.server.mini.MiniAccumuloCluster}. Required configurations must be passed to constructor(s) and all other
+ * configurations are optional.
  * 
  * @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 = Collections.emptyMap();
+  private Map<String,String> siteConfig = new HashMap<String,String>();
   private int numTservers = 2;
+  private Map<ServerType,Long> memoryConfig = new HashMap<ServerType,Long>();
+  
+  private boolean jwdpEnabled = 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;
   
   /**
    * @param 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.
+   *          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.
    * @param rootPassword
    *          The initial password for the Accumulo root user
    */
-  
   public MiniAccumuloConfig(File dir, String rootPassword) {
     this.dir = dir;
     this.rootPassword = rootPassword;
   }
   
-  public File getDir() {
-    return dir;
+  /**
+   * Set directories and fully populate site config
+   */
+  MiniAccumuloConfig initialize() {
+    if (!initialized) {
+      libDir = new File(dir, "lib");
+      confDir = new File(dir, "conf");
+      accumuloDir = new File(dir, "accumulo");
+      zooKeeperDir = new File(dir, "zookeeper");
+      logDir = new File(dir, "logs");
+      walogDir = new File(dir, "walogs");
+      
+      String classpath = System.getenv("ACCUMULO_HOME") + "/lib/.*.jar," + "$ZOOKEEPER_HOME/zookeeper[^.].*.jar," + "$HADOOP_HOME/[^.].*.jar,"
+          + "$HADOOP_HOME/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";
+      
+      mergeProp(Property.INSTANCE_DFS_URI.getKey(), "file:///");
+      mergeProp(Property.INSTANCE_DFS_DIR.getKey(), accumuloDir.getAbsolutePath());
+      mergeProp(Property.INSTANCE_SECRET.getKey(), DEFAULT_INSTANCE_SECRET);
+      mergeProp(Property.TSERV_PORTSEARCH.getKey(), "true");
+      mergeProp(Property.LOGGER_DIR.getKey(), walogDir.getAbsolutePath());
+      mergeProp(Property.TSERV_DATACACHE_SIZE.getKey(), "10M");
+      mergeProp(Property.TSERV_INDEXCACHE_SIZE.getKey(), "10M");
+      mergeProp(Property.TSERV_MAXMEM.getKey(), "50M");
+      mergeProp(Property.TSERV_WALOG_MAX_SIZE.getKey(), "100M");
+      mergeProp(Property.TSERV_NATIVEMAP_ENABLED.getKey(), "false");
+      mergeProp(Property.TRACE_TOKEN_PROPERTY_PREFIX + ".password", getRootPassword());
+      // since there is a small amount of memory, check more frequently for majc... setting may not be needed in 1.5
+      mergeProp(Property.TSERV_MAJC_DELAY.getKey(), "3");
+      mergeProp(Property.GENERAL_CLASSPATHS.getKey(), classpath);
+      mergeProp(Property.GENERAL_DYNAMIC_CLASSPATHS.getKey(), libDir.getAbsolutePath());
+      mergePropWithRandomPort(Property.MASTER_CLIENTPORT.getKey());
+      mergePropWithRandomPort(Property.TRACE_PORT.getKey());
+      mergePropWithRandomPort(Property.TSERV_CLIENTPORT.getKey());
+      
+      // zookeeper port should be set explicitly in this class, not just on the site config
+      if (zooKeeperPort == null)
+        zooKeeperPort = PortUtils.getRandomFreePort();
+      siteConfig.put(Property.INSTANCE_ZK_HOST.getKey(), "localhost:" + zooKeeperPort);
+      initialized = true;
+    }
+    return this;
   }
   
-  public String getRootPassword() {
-    return rootPassword;
+  /**
+   * Set a given key/value on the site config if it doesn't already exist
+   */
+  private void mergeProp(String key, String value) {
+    if (!siteConfig.containsKey(key)) {
+      siteConfig.put(key, value);
+    }
   }
   
-  public int getNumTservers() {
-    return numTservers;
+  /**
+   * Sets a given key with a random port for the value on the site config if it doesn't already exist.
+   */
+  private void mergePropWithRandomPort(String key) {
+    if (!siteConfig.containsKey(key)) {
+      siteConfig.put(key, PortUtils.getRandomFreePort() + "");
+    }
   }
   
   /**
@@ -64,7 +135,6 @@ public class MiniAccumuloConfig {
    * @param numTservers
    *          the number of tablet servers that mini accumulo cluster should start
    */
-  
   public MiniAccumuloConfig setNumTservers(int numTservers) {
     if (numTservers < 1)
       throw new IllegalArgumentException("Must have at least one tablet server");
@@ -72,19 +142,194 @@ public class MiniAccumuloConfig {
     return this;
   }
   
-  public Map<String,String> getSiteConfig() {
-    return siteConfig;
+  /**
+   * Calling this method is optional. If not set, defaults to 'miniInstance'
+   * 
+   * @since 1.6.0
+   */
+  public MiniAccumuloConfig setInstanceName(String instanceName) {
+    this.instanceName = instanceName;
+    return this;
   }
   
   /**
-   * Calling this method is optional. If not set, it defautls to an empty map.
+   * Calling this method is optional. If not set, it defaults to an empty map.
    * 
    * @param siteConfig
-   *          key/values that you normally put in accumulo-site.xml can be put here
+   *          key/values that you normally put in accumulo-site.xml can be put here.
    */
-  
   public MiniAccumuloConfig setSiteConfig(Map<String,String> siteConfig) {
-    this.siteConfig = siteConfig;
+    this.siteConfig = new HashMap<String,String>(siteConfig);
     return this;
   }
+  
+  /**
+   * Calling this method is optional. A random port is generated by default
+   * 
+   * @param zooKeeperPort
+   *          A valid (and unused) port to use for the zookeeper
+   * 
+   * @since 1.6.0
+   */
+  public MiniAccumuloConfig setZooKeeperPort(int zooKeeperPort) {
+    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
+   * 
+   * @param serverType
+   *          the type of server to apply the memory settings
+   * @param memory
+   *          amount of memory to set
+   * 
+   * @param memoryUnit
+   *          the units for which to apply with the memory size
+   * 
+   * @since 1.6.0
+   */
+  public MiniAccumuloConfig setMemory(ServerType serverType, long memory, MemoryUnit memoryUnit) {
+    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
+   * 
+   * @param memory
+   *          amount of memory to set
+   * 
+   * @param memoryUnit
+   *          the units for which to apply with the memory size
+   * 
+   * @since 1.6.0
+   */
+  public MiniAccumuloConfig setDefaultMemory(long memory, MemoryUnit memoryUnit) {
+    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
+   * 
+   * @since 1.6.0
+   */
+  public String getInstanceName() {
+    return instanceName;
+  }
+  
+  /**
+   * @return The configured zookeeper port
+   * 
+   * @since 1.6.0
+   */
+  public int getZooKeeperPort() {
+    return zooKeeperPort;
+  }
+  
+  File getLibDir() {
+    return libDir;
+  }
+  
+  File getConfDir() {
+    return confDir;
+  }
+  
+  File getZooKeeperDir() {
+    return zooKeeperDir;
+  }
+  
+  File getAccumuloDir() {
+    return accumuloDir;
+  }
+  
+  File getLogDir() {
+    return logDir;
+  }
+  
+  File getWalogDir() {
+    return walogDir;
+  }
+  
+  /**
+   * @param serverType
+   *          get configuration for this server type
+   * 
+   * @return memory configured in bytes, returns default if this server type is not configured
+   * 
+   * @since 1.6.0
+   */
+  public long getMemory(ServerType serverType) {
+    return memoryConfig.containsKey(serverType) ? memoryConfig.get(serverType) : defaultMemorySize;
+  }
+  
+  /**
+   * @return memory configured in bytes
+   * 
+   * @since 1.6.0
+   */
+  public long getDefaultMemory() {
+    return defaultMemorySize;
+  }
+  
+  /**
+   * @return zookeeper connection string
+   * 
+   * @since 1.6.0
+   */
+  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 jwdpEnabled mode?
+   * 
+   * @since 1.6.0
+   */
+  public boolean isJWDPEnabled() {
+    return jwdpEnabled;
+  }
+  
+  /**
+   * @param jwdpEnabled
+   *          should the processes run remote jwdpEnabled servers?
+   * @return the current instance
+   * 
+   * @since 1.6.0
+   */
+  public MiniAccumuloConfig setJWDPEnabled(boolean jwdpEnabled) {
+    this.jwdpEnabled = jwdpEnabled;
+    return this;
+  }
+  
 }

Copied: accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java (from r1484903, accumulo/trunk/server/src/main/java/org/apache/accumulo/server/mini/MiniAccumuloRunner.java)
URL: http://svn.apache.org/viewvc/accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java?p2=accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java&p1=accumulo/trunk/server/src/main/java/org/apache/accumulo/server/mini/MiniAccumuloRunner.java&r1=1484903&r2=1484912&rev=1484912&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/mini/MiniAccumuloRunner.java (original)
+++ accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/MiniAccumuloRunner.java Tue May 21 19:26:52 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.accumulo.server.mini;
+package org.apache.accumulo.minicluster;
 
 import java.io.File;
 import java.io.FileInputStream;

Copied: accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/ServerType.java (from r1484903, accumulo/trunk/server/src/main/java/org/apache/accumulo/server/mini/ServerType.java)
URL: http://svn.apache.org/viewvc/accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/ServerType.java?p2=accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/ServerType.java&p1=accumulo/trunk/server/src/main/java/org/apache/accumulo/server/mini/ServerType.java&r1=1484903&r2=1484912&rev=1484912&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/mini/ServerType.java (original)
+++ accumulo/trunk/minicluster/src/main/java/org/apache/accumulo/minicluster/ServerType.java Tue May 21 19:26:52 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.accumulo.server.mini;
+package org.apache.accumulo.minicluster;
 
 /**
  * @since 1.6.0

Modified: accumulo/trunk/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterTest.java?rev=1484912&r1=1484904&r2=1484912&view=diff
==============================================================================
--- accumulo/trunk/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterTest.java (original)
+++ accumulo/trunk/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloClusterTest.java Tue May 21 19:26:52 2013
@@ -19,6 +19,7 @@ package org.apache.accumulo.minicluster;
 import java.io.File;
 import java.util.Collections;
 import java.util.Map.Entry;
+import java.util.Set;
 import java.util.UUID;
 
 import org.apache.accumulo.core.client.BatchWriter;
@@ -37,6 +38,7 @@ import org.apache.accumulo.core.iterator
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.ColumnVisibility;
 import org.apache.accumulo.core.security.TablePermission;
+import org.apache.accumulo.core.util.Pair;
 import org.apache.commons.io.FileUtils;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
@@ -47,63 +49,62 @@ import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
 public class MiniAccumuloClusterTest {
-  
+
   public static TemporaryFolder folder = new TemporaryFolder();
-  
+
   private static MiniAccumuloCluster accumulo;
-  
+
   @BeforeClass
   public static void setupMiniCluster() throws Exception {
-    
-    folder.create();
-    
     Logger.getLogger("org.apache.zookeeper").setLevel(Level.ERROR);
-    
-    accumulo = new MiniAccumuloCluster(folder.getRoot(), "superSecret");
-    
+
+    folder.create();
+    MiniAccumuloConfig config = new MiniAccumuloConfig(folder.getRoot(), "superSecret").setJWDPEnabled(true);
+    accumulo = new MiniAccumuloCluster(config);
     accumulo.start();
-    
   }
-  
+
   @Test(timeout = 30000)
   public void test() throws Exception {
-    Connector conn = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector("root", new PasswordToken("superSecret"));
-    
+    Connector conn = new ZooKeeperInstance(accumulo.getConfig().getInstanceName(), accumulo.getConfig().getZooKeepers()).getConnector("root",
+            new PasswordToken("superSecret"));
+
     conn.tableOperations().create("table1");
-    
+
     conn.securityOperations().createLocalUser("user1", new PasswordToken("pass1"));
     conn.securityOperations().changeUserAuthorizations("user1", new Authorizations("A", "B"));
     conn.securityOperations().grantTablePermission("user1", "table1", TablePermission.WRITE);
     conn.securityOperations().grantTablePermission("user1", "table1", TablePermission.READ);
-    
+
     IteratorSetting is = new IteratorSetting(10, SummingCombiner.class);
     SummingCombiner.setEncodingType(is, LongCombiner.Type.STRING);
     SummingCombiner.setColumns(is, Collections.singletonList(new IteratorSetting.Column("META", "COUNT")));
-    
+
     conn.tableOperations().attachIterator("table1", is);
-    
-    Connector uconn = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector("user1", new PasswordToken("pass1"));
-    
+
+    Connector uconn = new ZooKeeperInstance(accumulo.getConfig().getInstanceName(), accumulo.getConfig().getZooKeepers()).getConnector("user1",
+            new PasswordToken("pass1"));
+
     BatchWriter bw = uconn.createBatchWriter("table1", new BatchWriterConfig());
-    
+
     UUID uuid = UUID.randomUUID();
-    
+
     Mutation m = new Mutation(uuid.toString());
     m.put("META", "SIZE", new ColumnVisibility("A|B"), "8");
     m.put("META", "CRC", new ColumnVisibility("A|B"), "456");
     m.put("META", "COUNT", new ColumnVisibility("A|B"), "1");
     m.put("DATA", "IMG", new ColumnVisibility("A&B"), "ABCDEFGH");
-    
+
     bw.addMutation(m);
     bw.flush();
-    
+
     m = new Mutation(uuid.toString());
     m.put("META", "COUNT", new ColumnVisibility("A|B"), "1");
     m.put("META", "CRC", new ColumnVisibility("A|B"), "123");
     bw.addMutation(m);
-    
+
     bw.close();
-    
+
     int count = 0;
     Scanner scanner = uconn.createScanner("table1", new Authorizations("A"));
     for (Entry<Key,Value> entry : scanner) {
@@ -118,9 +119,9 @@ public class MiniAccumuloClusterTest {
       }
       count++;
     }
-    
+
     Assert.assertEquals(3, count);
-    
+
     count = 0;
     scanner = uconn.createScanner("table1", new Authorizations("A", "B"));
     for (Entry<Key,Value> entry : scanner) {
@@ -129,62 +130,72 @@ public class MiniAccumuloClusterTest {
       }
       count++;
     }
-    
+
     Assert.assertEquals(4, count);
-    
+
     conn.tableOperations().delete("table1");
   }
-  
+
   @Test(timeout = 60000)
   public void testPerTableClasspath() throws Exception {
-    
-    Connector conn = new ZooKeeperInstance(accumulo.getInstanceName(), accumulo.getZooKeepers()).getConnector("root", new PasswordToken("superSecret"));
-    
+
+    Connector conn = new ZooKeeperInstance(accumulo.getConfig().getInstanceName(), accumulo.getConfig().getZooKeepers()).getConnector("root",
+            new PasswordToken("superSecret"));
+
     conn.tableOperations().create("table2");
-    
+
     File jarFile = File.createTempFile("iterator", ".jar");
     FileUtils.copyURLToFile(this.getClass().getResource("/FooFilter.jar"), jarFile);
     jarFile.deleteOnExit();
-    
+
     conn.instanceOperations().setProperty(Property.VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() + "cx1", jarFile.toURI().toString());
     conn.tableOperations().setProperty("table2", Property.TABLE_CLASSPATH.getKey(), "cx1");
     conn.tableOperations().attachIterator("table2", new IteratorSetting(100, "foocensor", "org.apache.accumulo.test.FooFilter"));
-    
+
     BatchWriter bw = conn.createBatchWriter("table2", new BatchWriterConfig());
-    
+
     Mutation m1 = new Mutation("foo");
     m1.put("cf1", "cq1", "v2");
     m1.put("cf1", "cq2", "v3");
-    
+
     bw.addMutation(m1);
-    
+
     Mutation m2 = new Mutation("bar");
     m2.put("cf1", "cq1", "v6");
     m2.put("cf1", "cq2", "v7");
-    
+
     bw.addMutation(m2);
-    
+
     bw.close();
-    
+
     Scanner scanner = conn.createScanner("table2", new Authorizations());
-    
+
     int count = 0;
     for (Entry<Key,Value> entry : scanner) {
       Assert.assertFalse(entry.getKey().getRowData().toString().toLowerCase().contains("foo"));
       count++;
     }
-    
+
     Assert.assertEquals(2, count);
-    
+
     conn.instanceOperations().removeProperty(Property.VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() + "cx1");
     conn.tableOperations().delete("table2");
-    
   }
-  
+
+  @Test(timeout = 10000)
+  public void testDebugPorts() {
+
+    Set<Pair<ServerType,Integer>> debugPorts = accumulo.getDebugPorts();
+    Assert.assertEquals(4, debugPorts.size());
+    for (Pair<ServerType,Integer> debugPort : debugPorts) {
+      Assert.assertTrue(debugPort.getSecond() > 0);
+    }
+  }
+
   @AfterClass
   public static void tearDownMiniCluster() throws Exception {
     accumulo.stop();
-    // folder.delete();
+    folder.delete();
   }
-  
+
 }

Copied: accumulo/trunk/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloConfigTest.java (from r1484903, accumulo/trunk/server/src/test/java/org/apache/accumulo/server/mini/MiniAccumuloConfigTest.java)
URL: http://svn.apache.org/viewvc/accumulo/trunk/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloConfigTest.java?p2=accumulo/trunk/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloConfigTest.java&p1=accumulo/trunk/server/src/test/java/org/apache/accumulo/server/mini/MiniAccumuloConfigTest.java&r1=1484903&r2=1484912&rev=1484912&view=diff
==============================================================================
--- accumulo/trunk/server/src/test/java/org/apache/accumulo/server/mini/MiniAccumuloConfigTest.java (original)
+++ accumulo/trunk/minicluster/src/test/java/org/apache/accumulo/minicluster/MiniAccumuloConfigTest.java Tue May 21 19:26:52 2013
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.accumulo.server.mini;
+package org.apache.accumulo.minicluster;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;

Modified: accumulo/trunk/pom.xml
URL: http://svn.apache.org/viewvc/accumulo/trunk/pom.xml?rev=1484912&r1=1484911&r2=1484912&view=diff
==============================================================================
--- accumulo/trunk/pom.xml (original)
+++ accumulo/trunk/pom.xml Tue May 21 19:26:52 2013
@@ -81,6 +81,7 @@
     <module>assemble</module>
     <module>proxy</module>
     <module>test</module>
+    <module>minicluster</module>
   </modules>
   <scm>
     <connection>scm:svn:http://svn.apache.org/repos/asf/accumulo/trunk</connection>
@@ -219,6 +220,11 @@
       </dependency>
       <dependency>
         <groupId>org.apache.accumulo</groupId>
+        <artifactId>accumulo-minicluster</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.accumulo</groupId>
         <artifactId>accumulo-proxy</artifactId>
         <version>${project.version}</version>
       </dependency>

Propchange: accumulo/trunk/pom.xml
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/pom.xml:r1484297-1484330,1484332-1484336,1484340-1484579,1484581-1484904

Modified: accumulo/trunk/proxy/pom.xml
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/pom.xml?rev=1484912&r1=1484911&r2=1484912&view=diff
==============================================================================
--- accumulo/trunk/proxy/pom.xml (original)
+++ accumulo/trunk/proxy/pom.xml Tue May 21 19:26:52 2013
@@ -39,6 +39,10 @@
     </dependency>
     <dependency>
       <groupId>org.apache.accumulo</groupId>
+      <artifactId>accumulo-minicluster</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.accumulo</groupId>
       <artifactId>accumulo-server</artifactId>
     </dependency>
     <dependency>

Modified: accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java?rev=1484912&r1=1484911&r2=1484912&view=diff
==============================================================================
--- accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java (original)
+++ accumulo/trunk/proxy/src/main/java/org/apache/accumulo/proxy/Proxy.java Tue May 21 19:26:52 2013
@@ -24,8 +24,8 @@ import java.lang.reflect.Constructor;
 import java.util.Properties;
 
 import org.apache.accumulo.core.cli.Help;
+import org.apache.accumulo.minicluster.MiniAccumuloCluster;
 import org.apache.accumulo.proxy.thrift.AccumuloProxy;
-import org.apache.accumulo.server.mini.MiniAccumuloCluster;
 import org.apache.log4j.Logger;
 import org.apache.thrift.TProcessor;
 import org.apache.thrift.protocol.TCompactProtocol;

Modified: accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java?rev=1484912&r1=1484911&r2=1484912&view=diff
==============================================================================
--- accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java (original)
+++ accumulo/trunk/proxy/src/test/java/org/apache/accumulo/proxy/SimpleTest.java Tue May 21 19:26:52 2013
@@ -53,6 +53,7 @@ import org.apache.accumulo.core.iterator
 import org.apache.accumulo.core.iterators.user.VersioningIterator;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.examples.simple.constraints.NumericValueConstraint;
+import org.apache.accumulo.minicluster.MiniAccumuloCluster;
 import org.apache.accumulo.proxy.thrift.AccumuloProxy.Client;
 import org.apache.accumulo.proxy.thrift.AccumuloSecurityException;
 import org.apache.accumulo.proxy.thrift.ActiveCompaction;
@@ -81,7 +82,6 @@ import org.apache.accumulo.proxy.thrift.
 import org.apache.accumulo.proxy.thrift.UnknownScanner;
 import org.apache.accumulo.proxy.thrift.UnknownWriter;
 import org.apache.accumulo.proxy.thrift.WriterOptions;
-import org.apache.accumulo.server.mini.MiniAccumuloCluster;
 import org.apache.accumulo.server.util.PortUtils;
 import org.apache.accumulo.test.functional.SlowIterator;
 import org.apache.commons.io.FileUtils;
@@ -622,7 +622,7 @@ public class SimpleTest {
       client.hasNext(scanner);
       fail("exception not thrown");
     } catch (UnknownScanner us) {}
-
+    
     try {
       client.closeScanner(scanner);
       fail("exception not thrown");
@@ -662,7 +662,7 @@ public class SimpleTest {
     
     // this is a oneway call, so it does not throw exceptions
     client.update(writer, mutation("row2", "cf", "cq", "value2"));
-
+    
     try {
       client.flush(writer);
       fail("exception not thrown");

Propchange: accumulo/trunk/server/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.5/server:r1484867-1484904

Modified: accumulo/trunk/server/pom.xml
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/pom.xml?rev=1484912&r1=1484911&r2=1484912&view=diff
==============================================================================
--- accumulo/trunk/server/pom.xml (original)
+++ accumulo/trunk/server/pom.xml Tue May 21 19:26:52 2013
@@ -34,10 +34,6 @@
       <artifactId>gson</artifactId>
     </dependency>
     <dependency>
-      <groupId>com.google.guava</groupId>
-      <artifactId>guava</artifactId>
-    </dependency>
-    <dependency>
       <groupId>jline</groupId>
       <artifactId>jline</artifactId>
     </dependency>

Modified: accumulo/trunk/server/src/test/resources/log4j.properties
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/test/resources/log4j.properties?rev=1484912&r1=1484911&r2=1484912&view=diff
==============================================================================
--- accumulo/trunk/server/src/test/resources/log4j.properties (original)
+++ accumulo/trunk/server/src/test/resources/log4j.properties Tue May 21 19:26:52 2013
@@ -18,5 +18,4 @@ log4j.appender.CA=org.apache.log4j.Conso
 log4j.appender.CA.layout=org.apache.log4j.PatternLayout
 log4j.appender.CA.layout.ConversionPattern=%d{ISO8601} [%-8c{2}] %-5p: %m%n
 
-log4j.logger.org.apache.accumulo.server.util.TabletIterator=ERROR
-log4j.logger.org.apache.accumulo.core.client.impl.ServerClient=ERROR
+log4j.logger.org.apache.accumulo.server.util.TabletIterator=ERROR
\ No newline at end of file

Modified: accumulo/trunk/test/pom.xml
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/pom.xml?rev=1484912&r1=1484911&r2=1484912&view=diff
==============================================================================
--- accumulo/trunk/test/pom.xml (original)
+++ accumulo/trunk/test/pom.xml Tue May 21 19:26:52 2013
@@ -43,6 +43,10 @@
     </dependency>
     <dependency>
       <groupId>org.apache.accumulo</groupId>
+      <artifactId>accumulo-minicluster</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.accumulo</groupId>
       <artifactId>accumulo-server</artifactId>
     </dependency>
     <dependency>

Modified: accumulo/trunk/test/src/test/java/org/apache/accumulo/fate/zookeeper/ZooLockTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/test/java/org/apache/accumulo/fate/zookeeper/ZooLockTest.java?rev=1484912&r1=1484911&r2=1484912&view=diff
==============================================================================
--- accumulo/trunk/test/src/test/java/org/apache/accumulo/fate/zookeeper/ZooLockTest.java (original)
+++ accumulo/trunk/test/src/test/java/org/apache/accumulo/fate/zookeeper/ZooLockTest.java Tue May 21 19:26:52 2013
@@ -22,7 +22,7 @@ import java.util.List;
 
 import org.apache.accumulo.fate.zookeeper.ZooLock.AsyncLockWatcher;
 import org.apache.accumulo.fate.zookeeper.ZooLock.LockLossReason;
-import org.apache.accumulo.server.mini.MiniAccumuloCluster;
+import org.apache.accumulo.minicluster.MiniAccumuloCluster;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.apache.zookeeper.CreateMode;
@@ -38,7 +38,7 @@ import org.junit.rules.TemporaryFolder;
  * 
  */
 public class ZooLockTest {
-
+  
   public static TemporaryFolder folder = new TemporaryFolder();
   
   private static MiniAccumuloCluster accumulo;
@@ -83,7 +83,7 @@ public class ZooLockTest {
       this.notifyAll();
     }
   }
-
+  
   @BeforeClass
   public static void setupMiniCluster() throws Exception {
     
@@ -98,18 +98,17 @@ public class ZooLockTest {
   }
   
   private static int pdCount = 0;
-
+  
   @Test(timeout = 10000)
   public void testDeleteParent() throws Exception {
     accumulo.getConfig().getZooKeepers();
     
     String parent = "/zltest-" + this.hashCode() + "-l" + pdCount++;
-
     
     ZooLock zl = new ZooLock(accumulo.getConfig().getZooKeepers(), 30000, "digest", "secret".getBytes(), parent);
-
+    
     Assert.assertFalse(zl.isLocked());
-
+    
     ZooReaderWriter zk = ZooReaderWriter.getInstance(accumulo.getConfig().getZooKeepers(), 30000, "digest", "secret".getBytes());
     
     // intentionally created parent after lock
@@ -118,13 +117,13 @@ public class ZooLockTest {
     zk.delete(parent, -1);
     
     zk.mkdirs(parent);
-
+    
     TestALW lw = new TestALW();
     
     zl.lockAsync(lw, "test1".getBytes());
     
     lw.waitForChanges(1);
-
+    
     Assert.assertTrue(lw.locked);
     Assert.assertTrue(zl.isLocked());
     Assert.assertNull(lw.exception);
@@ -140,7 +139,7 @@ public class ZooLockTest {
     String parent = "/zltest-" + this.hashCode() + "-l" + pdCount++;
     
     ZooLock zl = new ZooLock(accumulo.getConfig().getZooKeepers(), 30000, "digest", "secret".getBytes(), parent);
-
+    
     Assert.assertFalse(zl.isLocked());
     
     TestALW lw = new TestALW();
@@ -148,13 +147,13 @@ public class ZooLockTest {
     zl.lockAsync(lw, "test1".getBytes());
     
     lw.waitForChanges(1);
-
+    
     Assert.assertFalse(lw.locked);
     Assert.assertFalse(zl.isLocked());
     Assert.assertNotNull(lw.exception);
     Assert.assertNull(lw.reason);
   }
-
+  
   @Test(timeout = 10000)
   public void testDeleteLock() throws Exception {
     accumulo.getConfig().getZooKeepers();
@@ -165,7 +164,7 @@ public class ZooLockTest {
     zk.mkdirs(parent);
     
     ZooLock zl = new ZooLock(accumulo.getConfig().getZooKeepers(), 30000, "digest", "secret".getBytes(), parent);
-
+    
     Assert.assertFalse(zl.isLocked());
     
     TestALW lw = new TestALW();
@@ -173,7 +172,7 @@ public class ZooLockTest {
     zl.lockAsync(lw, "test1".getBytes());
     
     lw.waitForChanges(1);
-
+    
     Assert.assertTrue(lw.locked);
     Assert.assertTrue(zl.isLocked());
     Assert.assertNull(lw.exception);
@@ -182,10 +181,10 @@ public class ZooLockTest {
     zk.delete(zl.getLockPath(), -1);
     
     lw.waitForChanges(2);
-
+    
     Assert.assertEquals(LockLossReason.LOCK_DELETED, lw.reason);
     Assert.assertNull(lw.exception);
-
+    
   }
   
   @Test(timeout = 10000)
@@ -198,7 +197,7 @@ public class ZooLockTest {
     zk.mkdirs(parent);
     
     ZooLock zl = new ZooLock(accumulo.getConfig().getZooKeepers(), 30000, "digest", "secret".getBytes(), parent);
-
+    
     Assert.assertFalse(zl.isLocked());
     
     TestALW lw = new TestALW();
@@ -206,13 +205,12 @@ public class ZooLockTest {
     zl.lockAsync(lw, "test1".getBytes());
     
     lw.waitForChanges(1);
-
+    
     Assert.assertTrue(lw.locked);
     Assert.assertTrue(zl.isLocked());
     Assert.assertNull(lw.exception);
     Assert.assertNull(lw.reason);
     
-    
     ZooLock zl2 = new ZooLock(accumulo.getConfig().getZooKeepers(), 30000, "digest", "secret".getBytes(), parent);
     
     TestALW lw2 = new TestALW();
@@ -227,7 +225,7 @@ public class ZooLockTest {
     TestALW lw3 = new TestALW();
     
     zl3.lockAsync(lw3, "test3".getBytes());
-
+    
     List<String> children = zk.getChildren(parent);
     Collections.sort(children);
     
@@ -254,7 +252,7 @@ public class ZooLockTest {
     Assert.assertNull(lw3.reason);
     
     zl3.unlock();
-
+    
   }
   
   @Test(timeout = 10000)
@@ -280,7 +278,7 @@ public class ZooLockTest {
     zl.lockAsync(lw, "test1".getBytes());
     
     lw.waitForChanges(1);
-
+    
     Assert.assertTrue(lw.locked);
     Assert.assertTrue(zl.isLocked());
     Assert.assertNull(lw.exception);
@@ -290,20 +288,20 @@ public class ZooLockTest {
     zk.setData(zl.getLockPath(), "bar".getBytes(), -1);
     
     zk.delete(zl.getLockPath(), -1);
-
+    
     lw.waitForChanges(2);
-
+    
     Assert.assertEquals(LockLossReason.LOCK_DELETED, lw.reason);
     Assert.assertNull(lw.exception);
-
+    
   }
-
+  
   @Test(timeout = 10000)
   public void testTryLock() throws Exception {
     String parent = "/zltest-" + this.hashCode() + "-l" + pdCount++;
     
     ZooLock zl = new ZooLock(accumulo.getConfig().getZooKeepers(), 1000, "digest", "secret".getBytes(), parent);
-
+    
     ZooKeeper zk = new ZooKeeper(accumulo.getConfig().getZooKeepers(), 1000, null);
     zk.addAuthInfo("digest", "secret".getBytes());
     
@@ -313,7 +311,7 @@ public class ZooLockTest {
     }
     
     zk.create(parent, new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
-
+    
     TestALW lw = new TestALW();
     
     boolean ret = zl.tryLock(lw, "test1".getBytes());
@@ -329,11 +327,11 @@ public class ZooLockTest {
     
     zl.unlock();
   }
-
+  
   @AfterClass
   public static void tearDownMiniCluster() throws Exception {
     accumulo.stop();
     folder.delete();
   }
-
+  
 }

Modified: accumulo/trunk/test/src/test/java/org/apache/accumulo/test/MetaSplitTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/test/java/org/apache/accumulo/test/MetaSplitTest.java?rev=1484912&r1=1484911&r2=1484912&view=diff
==============================================================================
--- accumulo/trunk/test/src/test/java/org/apache/accumulo/test/MetaSplitTest.java (original)
+++ accumulo/trunk/test/src/test/java/org/apache/accumulo/test/MetaSplitTest.java Tue May 21 19:26:52 2013
@@ -27,8 +27,8 @@ import org.apache.accumulo.core.client.I
 import org.apache.accumulo.core.client.ZooKeeperInstance;
 import org.apache.accumulo.core.client.admin.TableOperations;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
-import org.apache.accumulo.server.mini.MiniAccumuloCluster;
-import org.apache.accumulo.server.mini.MiniAccumuloConfig;
+import org.apache.accumulo.minicluster.MiniAccumuloCluster;
+import org.apache.accumulo.minicluster.MiniAccumuloConfig;
 import org.apache.hadoop.io.Text;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -40,7 +40,6 @@ public class MetaSplitTest {
   private static String secret = "superSecret";
   public static TemporaryFolder folder = new TemporaryFolder();
   public static MiniAccumuloCluster cluster;
-
   
   @BeforeClass
   public static void setUpBeforeClass() throws Exception {
@@ -48,7 +47,7 @@ public class MetaSplitTest {
     MiniAccumuloConfig cfg = new MiniAccumuloConfig(folder.newFolder("miniAccumulo"), secret);
     cluster = new MiniAccumuloCluster(cfg);
     cluster.start();
-
+    
   }
   
   @AfterClass
@@ -57,7 +56,7 @@ public class MetaSplitTest {
     folder.delete();
   }
   
-  private void addSplits(TableOperations opts, String ... points) throws Exception {
+  private void addSplits(TableOperations opts, String... points) throws Exception {
     SortedSet<Text> splits = new TreeSet<Text>();
     for (String point : points) {
       splits.add(new Text(point));

Modified: accumulo/trunk/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java?rev=1484912&r1=1484911&r2=1484912&view=diff
==============================================================================
--- accumulo/trunk/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java (original)
+++ accumulo/trunk/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java Tue May 21 19:26:52 2013
@@ -47,8 +47,8 @@ import org.apache.accumulo.core.file.Fil
 import org.apache.accumulo.core.file.FileSKVWriter;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.core.util.shell.Shell;
-import org.apache.accumulo.server.mini.MiniAccumuloCluster;
-import org.apache.accumulo.server.mini.MiniAccumuloConfig;
+import org.apache.accumulo.minicluster.MiniAccumuloCluster;
+import org.apache.accumulo.minicluster.MiniAccumuloConfig;
 import org.apache.accumulo.server.trace.TraceServer;
 import org.apache.commons.io.FileUtils;
 import org.apache.hadoop.conf.Configuration;
@@ -117,7 +117,7 @@ public class ShellServerTest {
   static void assertGoodExit(String s, boolean stringPresent) {
     Shell.log.debug(output.get());
     assertEquals(0, shell.getExitCode());
-
+    
     if (s.length() > 0)
       assertEquals(s + " present in " + output.get() + " was not " + stringPresent, stringPresent, output.get().contains(s));
   }
@@ -147,12 +147,12 @@ public class ShellServerTest {
     exec("quit", true);
     shell.start();
     shell.setExit(false);
-
+    
     // use reflection to call this method so it does not need to be made public
     Method method = cluster.getClass().getDeclaredMethod("exec", Class.class, String[].class);
     method.setAccessible(true);
     traceProcess = (Process) method.invoke(cluster, TraceServer.class, new String[0]);
-
+    
     // give the tracer some time to start
     UtilWaitThread.sleep(1000);
   }
@@ -185,6 +185,7 @@ public class ShellServerTest {
     exec("deletetable -f t", true);
     exec("deletetable -f t2", true);
   }
+  
   private DistCp newDistCp() {
     try {
       @SuppressWarnings("unchecked")
@@ -204,7 +205,7 @@ public class ShellServerTest {
     }
     throw new RuntimeException("Unexpected constructors for DistCp");
   }
-
+  
   @Test(timeout = 30000)
   public void setscaniterDeletescaniter() throws Exception {
     // setscaniter, deletescaniter
@@ -524,18 +525,11 @@ public class ShellServerTest {
     exec("help -np", true, "Help Commands", true);
     shell.getReader().setInput(new ByteArrayInputStream("\n\n".getBytes()));
     exec("?", true, "Help Commands", true);
-    for (String c : (
-        "bye exit quit " +
-            "about help info ? " + 
-            "deleteiter deletescaniter listiter setiter setscaniter " +
-            "grant revoke systempermissions tablepermissions userpermissions " +
-            "execfile history " +
-            "authenticate cls clear notable sleep table user whoami " +
-            "clonetable config createtable deletetable droptable du exporttable importtable offline online renametable tables " +
-            "addsplits compact constraint flush getgropus getsplits merge setgroups " +
-            "addauths createuser deleteuser dropuser getauths passwd setauths users " +
-            "delete deletemany deleterows egrep formatter interpreter grep importdirectory insert maxrow scan"
-        ).split(" ")) {
+    for (String c : ("bye exit quit " + "about help info ? " + "deleteiter deletescaniter listiter setiter setscaniter "
+        + "grant revoke systempermissions tablepermissions userpermissions " + "execfile history " + "authenticate cls clear notable sleep table user whoami "
+        + "clonetable config createtable deletetable droptable du exporttable importtable offline online renametable tables "
+        + "addsplits compact constraint flush getgropus getsplits merge setgroups " + "addauths createuser deleteuser dropuser getauths passwd setauths users "
+        + "delete deletemany deleterows egrep formatter interpreter grep importdirectory insert maxrow scan").split(" ")) {
       exec("help " + c, true);
     }
   }
@@ -693,7 +687,8 @@ public class ShellServerTest {
           ZooKeeperInstance instance = new ZooKeeperInstance(cluster.getConfig().getInstanceName(), cluster.getConfig().getZooKeepers());
           Connector connector = instance.getConnector("root", new PasswordToken(secret));
           Scanner s = connector.createScanner("t", Constants.NO_AUTHS);
-          for (@SuppressWarnings("unused") Entry<Key,Value> kv : s)
+          for (@SuppressWarnings("unused")
+          Entry<Key,Value> kv : s)
             ;
         } catch (Exception ex) {
           throw new RuntimeException(ex);
@@ -736,22 +731,22 @@ public class ShellServerTest {
     exec("insert foo f q v", true);
     
     UtilWaitThread.sleep(100);
-
+    
     exec("scan -np", true, "foo", false);
-
+    
     exec("constraint -a FooConstraint", true);
     
     exec("offline ptc");
     UtilWaitThread.sleep(500);
     exec("online ptc");
-
+    
     exec("table ptc", true);
     exec("insert foo f q v", false);
     exec("insert ok foo q v", true);
     
     exec("deletetable ptc", true);
     exec("config -d " + Property.VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() + "cx1");
-
+    
   }
   
   @Test(timeout = 30000)

Modified: accumulo/trunk/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java?rev=1484912&r1=1484911&r2=1484912&view=diff
==============================================================================
--- accumulo/trunk/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java (original)
+++ accumulo/trunk/test/src/test/java/org/apache/accumulo/test/TableOperationsIT.java Tue May 21 19:26:52 2013
@@ -44,7 +44,7 @@ import org.apache.accumulo.core.data.Mut
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService;
-import org.apache.accumulo.server.mini.MiniAccumuloCluster;
+import org.apache.accumulo.minicluster.MiniAccumuloCluster;
 import org.apache.hadoop.io.Text;
 import org.apache.thrift.TException;
 import org.apache.thrift.transport.TTransportException;

Modified: accumulo/trunk/test/src/test/java/org/apache/accumulo/test/TestAccumuloSplitRecovery.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/test/src/test/java/org/apache/accumulo/test/TestAccumuloSplitRecovery.java?rev=1484912&r1=1484911&r2=1484912&view=diff
==============================================================================
--- accumulo/trunk/test/src/test/java/org/apache/accumulo/test/TestAccumuloSplitRecovery.java (original)
+++ accumulo/trunk/test/src/test/java/org/apache/accumulo/test/TestAccumuloSplitRecovery.java Tue May 21 19:26:52 2013
@@ -35,7 +35,7 @@ import org.apache.accumulo.core.data.Ran
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.util.UtilWaitThread;
-import org.apache.accumulo.server.mini.MiniAccumuloCluster;
+import org.apache.accumulo.minicluster.MiniAccumuloCluster;
 import org.apache.hadoop.io.Text;
 import org.junit.After;
 import org.junit.Before;
@@ -48,7 +48,7 @@ public class TestAccumuloSplitRecovery {
   public static TemporaryFolder folder = new TemporaryFolder();
   private MiniAccumuloCluster accumulo;
   private String secret = "secret";
-
+  
   @Before
   public void setUp() throws Exception {
     folder.create();
@@ -73,8 +73,9 @@ public class TestAccumuloSplitRecovery {
     Scanner scanner = connector.createScanner(Constants.METADATA_TABLE_NAME, Constants.NO_AUTHS);
     scanner.setRange(new Range(new Text(tableId + ";"), new Text(tableId + "<")));
     scanner.fetchColumnFamily(Constants.METADATA_CURRENT_LOCATION_COLUMN_FAMILY);
-    for (@SuppressWarnings("unused") Entry<Key,Value> entry : scanner) {
-        return false;
+    for (@SuppressWarnings("unused")
+    Entry<Key,Value> entry : scanner) {
+      return false;
     }
     return true;
   }
@@ -83,7 +84,7 @@ public class TestAccumuloSplitRecovery {
   public void test() throws Exception {
     
     for (int tn = 0; tn < 2; tn++) {
-    
+      
       ZooKeeperInstance instance = new ZooKeeperInstance(accumulo.getConfig().getInstanceName(), accumulo.getConfig().getZooKeepers());
       Connector connector = instance.getConnector("root", new PasswordToken(secret));
       // create a table and put some data in it
@@ -143,9 +144,9 @@ public class TestAccumuloSplitRecovery {
         i++;
       }
       assertEquals(3, i);
-
+      
       connector.tableOperations().delete(TABLE);
-    
+      
     }
   }
   



Mime
View raw message