accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [3/4] ACCUMULO-1599 Move MiniAccumuloCluster output to target directory
Date Fri, 11 Oct 2013 06:37:08 GMT
http://git-wip-us.apache.org/repos/asf/accumulo/blob/aa711023/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloReloadingVFSClassLoaderTest.java
----------------------------------------------------------------------
diff --git a/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloReloadingVFSClassLoaderTest.java b/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloReloadingVFSClassLoaderTest.java
index 489dbb2..0a48a00 100644
--- a/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloReloadingVFSClassLoaderTest.java
+++ b/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloReloadingVFSClassLoaderTest.java
@@ -33,7 +33,7 @@ import org.junit.rules.TemporaryFolder;
 
 public class AccumuloReloadingVFSClassLoaderTest {
 
-  private TemporaryFolder folder1 = new TemporaryFolder();
+  private TemporaryFolder folder1 = new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
   private FileSystemManager vfs;
 
   @Before
@@ -41,11 +41,11 @@ public class AccumuloReloadingVFSClassLoaderTest {
     Logger.getRootLogger().setLevel(Level.ERROR);
 
     vfs = ContextManagerTest.getVFS();
-    
+
     folder1.create();
     FileUtils.copyURLToFile(this.getClass().getResource("/HelloWorld.jar"), folder1.newFile("HelloWorld.jar"));
   }
-  
+
   FileObject[] createFileSystems(FileObject[] fos) throws FileSystemException {
     FileObject[] rfos = new FileObject[fos.length];
     for (int i = 0; i < fos.length; i++) {
@@ -54,7 +54,7 @@ public class AccumuloReloadingVFSClassLoaderTest {
       else
         rfos[i] = fos[i];
     }
-    
+
     return rfos;
   }
 
@@ -62,34 +62,34 @@ public class AccumuloReloadingVFSClassLoaderTest {
   public void testConstructor() throws Exception {
     FileObject testDir = vfs.resolveFile(folder1.getRoot().toURI().toString());
     FileObject[] dirContents = testDir.getChildren();
-    
+
     AccumuloReloadingVFSClassLoader arvcl = new AccumuloReloadingVFSClassLoader(folder1.getRoot().toURI().toString(), vfs, new ReloadingClassLoader() {
       @Override
       public ClassLoader getClassLoader() {
         return ClassLoader.getSystemClassLoader();
       }
     }, true);
-    
+
     VFSClassLoader cl = (VFSClassLoader) arvcl.getClassLoader();
-    
+
     FileObject[] files = cl.getFileObjects();
     Assert.assertArrayEquals(createFileSystems(dirContents), files);
-    
+
     arvcl.close();
   }
-  
+
   @Test
   public void testReloading() throws Exception {
     FileObject testDir = vfs.resolveFile(folder1.getRoot().toURI().toString());
     FileObject[] dirContents = testDir.getChildren();
-    
+
     AccumuloReloadingVFSClassLoader arvcl = new AccumuloReloadingVFSClassLoader(folder1.getRoot().toURI().toString(), vfs, new ReloadingClassLoader() {
       @Override
       public ClassLoader getClassLoader() {
         return ClassLoader.getSystemClassLoader();
       }
     }, 1000, true);
-    
+
     FileObject[] files = ((VFSClassLoader) arvcl.getClassLoader()).getFileObjects();
     Assert.assertArrayEquals(createFileSystems(dirContents), files);
 
@@ -97,55 +97,54 @@ public class AccumuloReloadingVFSClassLoaderTest {
     Object o1 = clazz1.newInstance();
     Assert.assertEquals("Hello World!", o1.toString());
 
-    //Check that the class is the same before the update
+    // Check that the class is the same before the update
     Class<?> clazz1_5 = arvcl.getClassLoader().loadClass("test.HelloWorld");
     Assert.assertEquals(clazz1, clazz1_5);
-    
+
     new File(folder1.getRoot(), "HelloWorld.jar").delete();
 
     // Update the class
     FileUtils.copyURLToFile(this.getClass().getResource("/HelloWorld.jar"), folder1.newFile("HelloWorld2.jar"));
 
-    //Wait for the monitor to notice
+    // Wait for the monitor to notice
     Thread.sleep(2000);
-    
+
     Class<?> clazz2 = arvcl.getClassLoader().loadClass("test.HelloWorld");
     Object o2 = clazz2.newInstance();
     Assert.assertEquals("Hello World!", o2.toString());
-    
-    //This is false because they are loaded by a different classloader
+
+    // This is false because they are loaded by a different classloader
     Assert.assertFalse(clazz1.equals(clazz2));
     Assert.assertFalse(o1.equals(o2));
-    
+
     arvcl.close();
   }
-  
 
   @Test
   public void testModifiedClass() throws Exception {
 
     FileObject testDir = vfs.resolveFile(folder1.getRoot().toURI().toString());
     FileObject[] dirContents = testDir.getChildren();
-    
+
     AccumuloReloadingVFSClassLoader arvcl = new AccumuloReloadingVFSClassLoader(folder1.getRoot().toURI().toString(), vfs, new ReloadingClassLoader() {
       @Override
       public ClassLoader getClassLoader() {
         return ClassLoader.getSystemClassLoader();
       }
     }, 1000, true);
-    
+
     FileObject[] files = ((VFSClassLoader) arvcl.getClassLoader()).getFileObjects();
     Assert.assertArrayEquals(createFileSystems(dirContents), files);
-    
+
     ClassLoader loader1 = arvcl.getClassLoader();
     Class<?> clazz1 = loader1.loadClass("test.HelloWorld");
     Object o1 = clazz1.newInstance();
     Assert.assertEquals("Hello World!", o1.toString());
-    
+
     // Check that the class is the same before the update
     Class<?> clazz1_5 = arvcl.getClassLoader().loadClass("test.HelloWorld");
     Assert.assertEquals(clazz1, clazz1_5);
-    
+
     // java does aggressive caching of jar files. When using java code to read jar files that are created in the same second, it will only see the first jar
     // file
     Thread.sleep(1000);
@@ -154,19 +153,18 @@ public class AccumuloReloadingVFSClassLoaderTest {
 
     // Update the class
     FileUtils.copyURLToFile(this.getClass().getResource("/HelloWorld2.jar"), folder1.newFile("HelloWorld.jar"));
-    
+
     // Wait for the monitor to notice
     Thread.sleep(2000);
-    
 
     Class<?> clazz2 = arvcl.getClassLoader().loadClass("test.HelloWorld");
     Object o2 = clazz2.newInstance();
     Assert.assertEquals("Hallo Welt", o2.toString());
-    
+
     // This is false because they are loaded by a different classloader
     Assert.assertFalse(clazz1.equals(clazz2));
     Assert.assertFalse(o1.equals(o2));
-    
+
     Class<?> clazz3 = loader1.loadClass("test.HelloWorld");
     Object o3 = clazz3.newInstance();
     Assert.assertEquals("Hello World!", o3.toString());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aa711023/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java
----------------------------------------------------------------------
diff --git a/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java b/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java
index 0d97f5e..e7c369e 100644
--- a/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java
+++ b/start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java
@@ -42,14 +42,14 @@ import org.powermock.reflect.Whitebox;
 @PowerMockIgnore({"org.apache.log4j.*", "org.apache.hadoop.log.metrics", "org.apache.commons.logging.*", "org.xml.*", "javax.xml.*", "org.w3c.dom.*",
     "org.apache.hadoop.*"})
 public class AccumuloVFSClassLoaderTest {
-  
-  private TemporaryFolder folder1 = new TemporaryFolder();
+
+  private TemporaryFolder folder1 = new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
 
   @Before
   public void setup() throws IOException {
     folder1.create();
   }
-  
+
   @After
   public void tearDown() {
     folder1.delete();
@@ -84,19 +84,18 @@ public class AccumuloVFSClassLoaderTest {
     Assert.assertTrue((acl instanceof VFSClassLoader));
     Assert.assertTrue((acl.getParent() instanceof URLClassLoader));
   }
-  
+
   /*
    * Test with default context configured
    */
   @Test
   public void testDefaultContextConfigured() throws Exception {
-    
 
     Whitebox.setInternalState(AccumuloVFSClassLoader.class, "loader", (AccumuloReloadingVFSClassLoader) null);
-    
+
     // Copy jar file to TEST_DIR
     FileUtils.copyURLToFile(this.getClass().getResource("/HelloWorld.jar"), folder1.newFile("HelloWorld.jar"));
-    
+
     File conf = folder1.newFile("accumulo-site.xml");
     FileWriter out = new FileWriter(conf);
     out.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
@@ -126,5 +125,5 @@ public class AccumuloVFSClassLoaderTest {
     Assert.assertEquals("Hello World!", o1.toString());
     Whitebox.setInternalState(AccumuloVFSClassLoader.class, "loader", (AccumuloReloadingVFSClassLoader) null);
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aa711023/start/src/test/java/org/apache/accumulo/start/classloader/vfs/ContextManagerTest.java
----------------------------------------------------------------------
diff --git a/start/src/test/java/org/apache/accumulo/start/classloader/vfs/ContextManagerTest.java b/start/src/test/java/org/apache/accumulo/start/classloader/vfs/ContextManagerTest.java
index d6d761b..6ed7906 100644
--- a/start/src/test/java/org/apache/accumulo/start/classloader/vfs/ContextManagerTest.java
+++ b/start/src/test/java/org/apache/accumulo/start/classloader/vfs/ContextManagerTest.java
@@ -34,13 +34,13 @@ import org.junit.Test;
 import org.junit.rules.TemporaryFolder;
 
 public class ContextManagerTest {
-  
-  private TemporaryFolder folder1 = new TemporaryFolder();
-  private TemporaryFolder folder2 = new TemporaryFolder();
+
+  private TemporaryFolder folder1 = new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
+  private TemporaryFolder folder2 = new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
   private FileSystemManager vfs;
   private URI uri1;
   private URI uri2;
-  
+
   static FileSystemManager getVFS() {
     try {
       return AccumuloVFSClassLoader.generateVfs();
@@ -51,15 +51,15 @@ public class ContextManagerTest {
 
   @Before
   public void setup() throws Exception {
-    
+
     vfs = getVFS();
 
     folder1.create();
     folder2.create();
-    
+
     FileUtils.copyURLToFile(this.getClass().getResource("/HelloWorld.jar"), folder1.newFile("HelloWorld.jar"));
     FileUtils.copyURLToFile(this.getClass().getResource("/HelloWorld.jar"), folder2.newFile("HelloWorld.jar"));
-    
+
     uri1 = new File(folder1.getRoot(), "HelloWorld.jar").toURI();
     uri2 = folder2.getRoot().toURI();
 
@@ -73,13 +73,13 @@ public class ContextManagerTest {
       else
         rfos[i] = fos[i];
     }
-    
+
     return rfos;
   }
 
   @Test
   public void differentContexts() throws Exception {
-    
+
     ContextManager cm = new ContextManager(vfs, new ReloadingClassLoader() {
       @Override
       public ClassLoader getClassLoader() {
@@ -110,7 +110,7 @@ public class ContextManagerTest {
     ClassLoader cl2 = cm.getClassLoader("CX2");
     FileObject[] files2 = ((VFSClassLoader) cl2).getFileObjects();
     Assert.assertArrayEquals(createFileSystems(dirContents2), files2);
-    
+
     Class<?> defaultContextClass = cl1.loadClass("test.HelloWorld");
     Object o1 = defaultContextClass.newInstance();
     Assert.assertEquals("Hello World!", o1.toString());
@@ -118,25 +118,25 @@ public class ContextManagerTest {
     Class<?> myContextClass = cl2.loadClass("test.HelloWorld");
     Object o2 = myContextClass.newInstance();
     Assert.assertEquals("Hello World!", o2.toString());
-    
+
     Assert.assertFalse(defaultContextClass.equals(myContextClass));
 
     cm.removeUnusedContexts(new HashSet<String>());
   }
-  
+
   @Test
   public void testPostDelegation() throws Exception {
     final VFSClassLoader parent = new VFSClassLoader(new FileObject[] {vfs.resolveFile(uri1.toString())}, vfs);
-    
+
     Class<?> pclass = parent.loadClass("test.HelloWorld");
-    
+
     ContextManager cm = new ContextManager(vfs, new ReloadingClassLoader() {
       @Override
       public ClassLoader getClassLoader() {
         return parent;
       }
     });
-    
+
     cm.setContextConfig(new ContextsConfig() {
       @Override
       public ContextConfig getContextConfig(String context) {
@@ -148,7 +148,7 @@ public class ContextManagerTest {
         return null;
       }
     });
-    
+
     Assert.assertTrue(cm.getClassLoader("CX1").loadClass("test.HelloWorld") == pclass);
     Assert.assertFalse(cm.getClassLoader("CX2").loadClass("test.HelloWorld") == pclass);
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aa711023/test/pom.xml
----------------------------------------------------------------------
diff --git a/test/pom.xml b/test/pom.xml
index 8343bb2..e4d32e5 100644
--- a/test/pom.xml
+++ b/test/pom.xml
@@ -199,8 +199,7 @@
                     <argument>${project.build.directory}</argument>
                     <argument>${accumulo-it-mini-classpath}</argument>
                     <!-- InstanceName RootPassword, one pair per MiniAccumuloCluster -->
-                    <argument>testInstance1 rootPassword1</argument>
-                    <argument>testInstance2 rootPassword2</argument>
+                    <argument>testInstance1 testRootPassword1</argument>
                   </arguments>
                 </configuration>
               </execution>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aa711023/test/src/test/java/org/apache/accumulo/fate/zookeeper/ZooLockTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/fate/zookeeper/ZooLockTest.java b/test/src/test/java/org/apache/accumulo/fate/zookeeper/ZooLockTest.java
index fb99f42..31d59e9 100644
--- a/test/src/test/java/org/apache/accumulo/fate/zookeeper/ZooLockTest.java
+++ b/test/src/test/java/org/apache/accumulo/fate/zookeeper/ZooLockTest.java
@@ -16,6 +16,7 @@
  */
 package org.apache.accumulo.fate.zookeeper;
 
+import java.io.File;
 import java.lang.reflect.Field;
 import java.util.Collections;
 import java.util.List;
@@ -38,318 +39,318 @@ import org.junit.rules.TemporaryFolder;
  * 
  */
 public class ZooLockTest {
-  
-  public static TemporaryFolder folder = new TemporaryFolder();
-  
+
+  public static TemporaryFolder folder = new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
+
   private static MiniAccumuloCluster accumulo;
-  
+
   static class TestALW implements AsyncLockWatcher {
-    
+
     LockLossReason reason = null;
     boolean locked = false;
     Exception exception = null;
     int changes = 0;
-    
+
     @Override
     public synchronized void lostLock(LockLossReason reason) {
       this.reason = reason;
       changes++;
       this.notifyAll();
     }
-    
+
     @Override
     public synchronized void acquiredLock() {
       this.locked = true;
       changes++;
       this.notifyAll();
     }
-    
+
     @Override
     public synchronized void failedToAcquireLock(Exception e) {
       this.exception = e;
       changes++;
       this.notifyAll();
     }
-    
+
     public synchronized void waitForChanges(int numExpected) throws InterruptedException {
       while (changes < numExpected) {
         this.wait();
       }
     }
-    
+
     @Override
     public synchronized void unableToMonitorLockNode(Throwable e) {
       changes++;
       this.notifyAll();
     }
   }
-  
+
   @BeforeClass
   public static void setupMiniCluster() throws Exception {
-    
+
     folder.create();
-    
+
     Logger.getLogger("org.apache.zookeeper").setLevel(Level.ERROR);
-    
+
     accumulo = new MiniAccumuloCluster(folder.getRoot(), "superSecret");
-    
+
     accumulo.start();
-    
+
   }
-  
+
   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
     zk.mkdirs(parent);
-    
+
     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);
     Assert.assertNull(lw.reason);
-    
+
     zl.unlock();
   }
-  
+
   @Test(timeout = 10000)
   public void testNoParent() 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());
-    
+
     TestALW lw = new TestALW();
-    
+
     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();
-    
+
     String parent = "/zltest-" + this.hashCode() + "-l" + pdCount++;
-    
+
     ZooReaderWriter zk = ZooReaderWriter.getInstance(accumulo.getConfig().getZooKeepers(), 30000, "digest", "secret".getBytes());
     zk.mkdirs(parent);
-    
+
     ZooLock zl = new ZooLock(accumulo.getConfig().getZooKeepers(), 30000, "digest", "secret".getBytes(), parent);
-    
+
     Assert.assertFalse(zl.isLocked());
-    
+
     TestALW lw = new TestALW();
-    
+
     zl.lockAsync(lw, "test1".getBytes());
-    
+
     lw.waitForChanges(1);
-    
+
     Assert.assertTrue(lw.locked);
     Assert.assertTrue(zl.isLocked());
     Assert.assertNull(lw.exception);
     Assert.assertNull(lw.reason);
-    
+
     zk.delete(zl.getLockPath(), -1);
-    
+
     lw.waitForChanges(2);
-    
+
     Assert.assertEquals(LockLossReason.LOCK_DELETED, lw.reason);
     Assert.assertNull(lw.exception);
-    
+
   }
-  
+
   @Test(timeout = 10000)
   public void testDeleteWaiting() throws Exception {
     accumulo.getConfig().getZooKeepers();
-    
+
     String parent = "/zltest-" + this.hashCode() + "-l" + pdCount++;
-    
+
     ZooReaderWriter zk = ZooReaderWriter.getInstance(accumulo.getConfig().getZooKeepers(), 30000, "digest", "secret".getBytes());
     zk.mkdirs(parent);
-    
+
     ZooLock zl = new ZooLock(accumulo.getConfig().getZooKeepers(), 30000, "digest", "secret".getBytes(), parent);
-    
+
     Assert.assertFalse(zl.isLocked());
-    
+
     TestALW lw = new TestALW();
-    
+
     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();
-    
+
     zl2.lockAsync(lw2, "test2".getBytes());
-    
+
     Assert.assertFalse(lw2.locked);
     Assert.assertFalse(zl2.isLocked());
-    
+
     ZooLock zl3 = new ZooLock(accumulo.getConfig().getZooKeepers(), 30000, "digest", "secret".getBytes(), parent);
-    
+
     TestALW lw3 = new TestALW();
-    
+
     zl3.lockAsync(lw3, "test3".getBytes());
-    
+
     List<String> children = zk.getChildren(parent);
     Collections.sort(children);
-    
+
     zk.delete(parent + "/" + children.get(1), -1);
-    
+
     lw2.waitForChanges(1);
-    
+
     Assert.assertFalse(lw2.locked);
     Assert.assertNotNull(lw2.exception);
     Assert.assertNull(lw2.reason);
-    
+
     zk.delete(parent + "/" + children.get(0), -1);
-    
+
     lw.waitForChanges(2);
-    
+
     Assert.assertEquals(LockLossReason.LOCK_DELETED, lw.reason);
     Assert.assertNull(lw.exception);
-    
+
     lw3.waitForChanges(1);
-    
+
     Assert.assertTrue(lw3.locked);
     Assert.assertTrue(zl3.isLocked());
     Assert.assertNull(lw3.exception);
     Assert.assertNull(lw3.reason);
-    
+
     zl3.unlock();
-    
+
   }
-  
+
   @Test(timeout = 10000)
   public void testUnexpectedEvent() throws Exception {
     accumulo.getConfig().getZooKeepers();
-    
+
     String parent = "/zltest-" + this.hashCode() + "-l" + pdCount++;
-    
+
     ZooKeeper zk = new ZooKeeper(accumulo.getConfig().getZooKeepers(), 30000, null);
     zk.addAuthInfo("digest", "secret".getBytes());
-    
+
     zk.create(parent, new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
-    
+
     ZooLock zl = new ZooLock(accumulo.getConfig().getZooKeepers(), 30000, "digest", "secret".getBytes(), parent);
-    
+
     Assert.assertFalse(zl.isLocked());
-    
+
     // would not expect data to be set on this node, but it should not cause problems.....
     zk.setData(parent, "foo".getBytes(), -1);
-    
+
     TestALW lw = new TestALW();
-    
+
     zl.lockAsync(lw, "test1".getBytes());
-    
+
     lw.waitForChanges(1);
-    
+
     Assert.assertTrue(lw.locked);
     Assert.assertTrue(zl.isLocked());
     Assert.assertNull(lw.exception);
     Assert.assertNull(lw.reason);
-    
+
     // would not expect data to be set on this node either
     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());
-    
+
     for (int i = 0; i < 10; i++) {
       zk.create(parent, new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
       zk.delete(parent, -1);
     }
-    
+
     zk.create(parent, new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
-    
+
     TestALW lw = new TestALW();
-    
+
     boolean ret = zl.tryLock(lw, "test1".getBytes());
-    
+
     Assert.assertTrue(ret);
-    
+
     // make sure still watching parent even though a lot of events occurred for the parent
     synchronized (zl) {
       Field field = zl.getClass().getDeclaredField("watchingParent");
       field.setAccessible(true);
       Assert.assertTrue((Boolean) field.get(zl));
     }
-    
+
     zl.unlock();
   }
-  
+
   @Test(timeout = 10000)
   public void testChangeData() throws Exception {
     String parent = "/zltest-" + this.hashCode() + "-l" + pdCount++;
     ZooKeeper zk = new ZooKeeper(accumulo.getZooKeepers(), 1000, null);
     zk.addAuthInfo("digest", "secret".getBytes());
     zk.create(parent, new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
-    
+
     ZooLock zl = new ZooLock(accumulo.getZooKeepers(), 1000, "digest", "secret".getBytes(), parent);
-    
+
     TestALW lw = new TestALW();
-    
+
     zl.lockAsync(lw, "test1".getBytes());
     Assert.assertEquals("test1", new String(zk.getData(zl.getLockPath(), null, null)));
-    
+
     zl.replaceLockData("test2".getBytes());
     Assert.assertEquals("test2", new String(zk.getData(zl.getLockPath(), null, null)));
   }
-  
+
   @AfterClass
   public static void tearDownMiniCluster() throws Exception {
     accumulo.stop();
     folder.delete();
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aa711023/test/src/test/java/org/apache/accumulo/test/AuditMessageTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/AuditMessageTest.java b/test/src/test/java/org/apache/accumulo/test/AuditMessageTest.java
index f4b601f..b9e72dc 100644
--- a/test/src/test/java/org/apache/accumulo/test/AuditMessageTest.java
+++ b/test/src/test/java/org/apache/accumulo/test/AuditMessageTest.java
@@ -65,7 +65,7 @@ import org.junit.rules.TemporaryFolder;
  * so we have to find the logs and grep the bits we need out.
  */
 public class AuditMessageTest {
-  
+
   private static MiniAccumuloCluster accumulo;
   private static File logDir;
   private static List<MiniAccumuloCluster.LogWriter> logWriters;
@@ -76,13 +76,13 @@ public class AuditMessageTest {
   private static final String NEW_TEST_TABLE_NAME = "oranges";
   private static final String THIRD_TEST_TABLE_NAME = "pears";
   private static final Authorizations auths = new Authorizations("private", "public");
-  private static TemporaryFolder folder = new TemporaryFolder();
-  
+  private static TemporaryFolder folder = new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
+
   // Must be static to survive Junit re-initialising the class every time.
   private static String lastAuditTimestamp;
   private Connector auditConnector;
   private Connector conn;
-  
+
   private static ArrayList<String> findAuditMessage(ArrayList<String> input, String pattern) {
     ArrayList<String> result = new ArrayList<String>();
     for (String s : input) {
@@ -91,18 +91,18 @@ public class AuditMessageTest {
     }
     return result;
   }
-  
+
   @BeforeClass
   public static void setupMiniCluster() throws Exception {
     folder.create();
     Logger.getLogger("org.apache.zookeeper").setLevel(Level.ERROR);
-    
+
     accumulo = new MiniAccumuloCluster(folder.getRoot(), "superSecret");
     accumulo.start();
     logDir = accumulo.getConfig().getLogDir();
     logWriters = accumulo.getLogWriters();
   }
-  
+
   /**
    * Returns a List of Audit messages that have been grep'd out of the MiniAccumuloCluster output.
    * 
@@ -111,14 +111,14 @@ public class AuditMessageTest {
    * @return A List of the Audit messages, sorted (so in chronological order).
    */
   private ArrayList<String> getAuditMessages(String stepName) throws IOException {
-    
+
     for (MiniAccumuloCluster.LogWriter lw : logWriters) {
       lw.flush();
     }
-    
+
     // Grab the audit messages
     System.out.println("Start of captured audit messages for step " + stepName);
-    
+
     ArrayList<String> result = new ArrayList<String>();
     for (File file : logDir.listFiles()) {
       // We want to grab the files called .out
@@ -139,17 +139,17 @@ public class AuditMessageTest {
       }
     }
     Collections.sort(result);
-    
+
     for (String s : result) {
       System.out.println(s);
     }
     System.out.println("End of captured audit messages for step " + stepName);
     if (result.size() > 0)
       lastAuditTimestamp = (result.get(result.size() - 1)).substring(0, 23);
-    
+
     return result;
   }
-  
+
   private void grantEverySystemPriv(Connector conn, String user) throws AccumuloSecurityException, AccumuloException {
     SystemPermission[] arrayOfP = new SystemPermission[] {SystemPermission.SYSTEM, SystemPermission.ALTER_TABLE, SystemPermission.ALTER_USER,
         SystemPermission.CREATE_TABLE, SystemPermission.CREATE_USER, SystemPermission.DROP_TABLE, SystemPermission.DROP_USER};
@@ -157,15 +157,15 @@ public class AuditMessageTest {
       conn.securityOperations().grantSystemPermission(user, p);
     }
   }
-  
+
   @Before
   public void setup() throws AccumuloException, AccumuloSecurityException, TableNotFoundException, IOException {
     conn = accumulo.getConnector("root", "superSecret");
-    
+
     // I don't want to recreate the instance for every test since it will take ages.
     // If we run every test as non-root users, I can drop these users every test which should effectively
     // reset the environment.
-    
+
     if (conn.securityOperations().listLocalUsers().contains(AUDIT_USER_1))
       conn.securityOperations().dropLocalUser(AUDIT_USER_1);
     if (conn.securityOperations().listLocalUsers().contains(AUDIT_USER_2))
@@ -176,21 +176,21 @@ public class AuditMessageTest {
       conn.tableOperations().delete(NEW_TEST_TABLE_NAME);
     if (conn.tableOperations().exists(OLD_TEST_TABLE_NAME))
       conn.tableOperations().delete(OLD_TEST_TABLE_NAME);
-    
+
     // This will set the lastAuditTimestamp for the first test
     getAuditMessages("setup");
-    
+
   }
-  
+
   @Test(timeout = 60 * 1000)
   @SuppressWarnings("unchecked")
   public void testTableOperationsAudits() throws AccumuloException, AccumuloSecurityException, TableExistsException, TableNotFoundException, IOException,
       InterruptedException {
-    
+
     conn.securityOperations().createLocalUser(AUDIT_USER_1, new PasswordToken(PASSWORD));
     conn.securityOperations().grantSystemPermission(AUDIT_USER_1, SystemPermission.SYSTEM);
     conn.securityOperations().grantSystemPermission(AUDIT_USER_1, SystemPermission.CREATE_TABLE);
-    
+
     // Connect as Audit User and do a bunch of stuff.
     // Testing activity begins here
     auditConnector = accumulo.getConnector(AUDIT_USER_1, PASSWORD);
@@ -201,31 +201,31 @@ public class AuditMessageTest {
     auditConnector.tableOperations().offline(NEW_TEST_TABLE_NAME);
     auditConnector.tableOperations().delete(NEW_TEST_TABLE_NAME);
     // Testing activity ends here
-    
+
     ArrayList<String> auditMessages = getAuditMessages("testTableOperationsAudits");
-    
+
     assertEquals(1, findAuditMessage(auditMessages, "action: createTable; targetTable: " + OLD_TEST_TABLE_NAME).size());
     assertEquals(1, findAuditMessage(auditMessages, "action: renameTable; targetTable: " + OLD_TEST_TABLE_NAME).size());
     assertEquals(1, findAuditMessage(auditMessages, "action: cloneTable; targetTable: " + NEW_TEST_TABLE_NAME).size());
     assertEquals(1, findAuditMessage(auditMessages, "action: deleteTable; targetTable: " + OLD_TEST_TABLE_NAME).size());
     assertEquals(1, findAuditMessage(auditMessages, "action: offlineTable; targetTable: " + NEW_TEST_TABLE_NAME).size());
     assertEquals(1, findAuditMessage(auditMessages, "action: deleteTable; targetTable: " + NEW_TEST_TABLE_NAME).size());
-    
+
   }
-  
+
   @Test(timeout = 60 * 1000)
   public void testUserOperationsAudits() throws AccumuloSecurityException, AccumuloException, TableExistsException, InterruptedException, IOException {
-    
+
     conn.securityOperations().createLocalUser(AUDIT_USER_1, new PasswordToken(PASSWORD));
     conn.securityOperations().grantSystemPermission(AUDIT_USER_1, SystemPermission.SYSTEM);
     conn.securityOperations().grantSystemPermission(AUDIT_USER_1, SystemPermission.CREATE_USER);
     grantEverySystemPriv(conn, AUDIT_USER_1);
-    
+
     // Connect as Audit User and do a bunch of stuff.
     // Start testing activities here
     auditConnector = accumulo.getConnector(AUDIT_USER_1, PASSWORD);
     auditConnector.securityOperations().createLocalUser(AUDIT_USER_2, new PasswordToken(PASSWORD));
-    
+
     // It seems only root can grant stuff.
     conn.securityOperations().grantSystemPermission(AUDIT_USER_2, SystemPermission.ALTER_TABLE);
     conn.securityOperations().revokeSystemPermission(AUDIT_USER_2, SystemPermission.ALTER_TABLE);
@@ -236,9 +236,9 @@ public class AuditMessageTest {
     auditConnector.securityOperations().changeUserAuthorizations(AUDIT_USER_2, auths);
     auditConnector.securityOperations().dropLocalUser(AUDIT_USER_2);
     // Stop testing activities here
-    
+
     ArrayList<String> auditMessages = getAuditMessages("testUserOperationsAudits");
-    
+
     assertEquals(1, findAuditMessage(auditMessages, "action: createUser; targetUser: " + AUDIT_USER_2).size());
     assertEquals(
         1,
@@ -261,21 +261,21 @@ public class AuditMessageTest {
         .size());
     assertEquals(1, findAuditMessage(auditMessages, "action: dropUser; targetUser: " + AUDIT_USER_2).size());
   }
-  
+
   @Test(timeout = 60 * 1000)
   public void testImportExportOperationsAudits() throws AccumuloSecurityException, AccumuloException, TableExistsException, TableNotFoundException,
       IOException, InterruptedException {
-    
+
     conn.securityOperations().createLocalUser(AUDIT_USER_1, new PasswordToken(PASSWORD));
     conn.securityOperations().grantSystemPermission(AUDIT_USER_1, SystemPermission.SYSTEM);
     conn.securityOperations().changeUserAuthorizations(AUDIT_USER_1, auths);
     grantEverySystemPriv(conn, AUDIT_USER_1);
-    
+
     // Connect as Audit User and do a bunch of stuff.
     // Start testing activities here
     auditConnector = accumulo.getConnector(AUDIT_USER_1, PASSWORD);
     auditConnector.tableOperations().create(OLD_TEST_TABLE_NAME);
-    
+
     // Insert some play data
     BatchWriter bw = auditConnector.createBatchWriter(OLD_TEST_TABLE_NAME, new BatchWriterConfig());
     Mutation m = new Mutation("myRow");
@@ -283,18 +283,18 @@ public class AuditMessageTest {
     m.put("cf1", "cq2", "v3");
     bw.addMutation(m);
     bw.close();
-    
+
     // Prepare to export the table
     File exportDir = new File(accumulo.getConfig().getDir().toString() + "/export");
-    
+
     auditConnector.tableOperations().offline(OLD_TEST_TABLE_NAME);
     auditConnector.tableOperations().exportTable(OLD_TEST_TABLE_NAME, exportDir.toString());
-    
+
     // We've exported the table metadata to the MiniAccumuloCluster root dir. Grab the .rf file path to re-import it
     File distCpTxt = new File(exportDir.toString() + "/distcp.txt");
     File importFile = null;
     LineIterator it = FileUtils.lineIterator(distCpTxt, Constants.UTF8.name());
-    
+
     // Just grab the first rf file, it will do for now.
     String filePrefix = "file:";
     try {
@@ -309,18 +309,18 @@ public class AuditMessageTest {
     }
     FileUtils.copyFileToDirectory(importFile, exportDir);
     auditConnector.tableOperations().importTable(NEW_TEST_TABLE_NAME, exportDir.toString());
-    
+
     // Now do a Directory (bulk) import of the same data.
     auditConnector.tableOperations().create(THIRD_TEST_TABLE_NAME);
     File failDir = new File(exportDir + "/tmp");
     failDir.mkdirs();
     auditConnector.tableOperations().importDirectory(THIRD_TEST_TABLE_NAME, exportDir.toString(), failDir.toString(), false);
     auditConnector.tableOperations().online(OLD_TEST_TABLE_NAME);
-    
+
     // Stop testing activities here
-    
+
     ArrayList<String> auditMessages = getAuditMessages("testImportExportOperationsAudits");
-    
+
     assertEquals(1, findAuditMessage(auditMessages, String.format(AuditedSecurityOperation.CAN_CREATE_TABLE_AUDIT_TEMPLATE, OLD_TEST_TABLE_NAME)).size());
     assertEquals(1,
         findAuditMessage(auditMessages, String.format(AuditedSecurityOperation.CAN_ONLINE_OFFLINE_TABLE_AUDIT_TEMPLATE, "offlineTable", OLD_TEST_TABLE_NAME))
@@ -339,23 +339,23 @@ public class AuditMessageTest {
     assertEquals(1,
         findAuditMessage(auditMessages, String.format(AuditedSecurityOperation.CAN_ONLINE_OFFLINE_TABLE_AUDIT_TEMPLATE, "onlineTable", OLD_TEST_TABLE_NAME))
             .size());
-    
+
   }
-  
+
   @Test(timeout = 60 * 1000)
   public void testDataOperationsAudits() throws AccumuloSecurityException, AccumuloException, TableExistsException, TableNotFoundException, IOException,
       InterruptedException {
-    
+
     conn.securityOperations().createLocalUser(AUDIT_USER_1, new PasswordToken(PASSWORD));
     conn.securityOperations().grantSystemPermission(AUDIT_USER_1, SystemPermission.SYSTEM);
     conn.securityOperations().changeUserAuthorizations(AUDIT_USER_1, auths);
     grantEverySystemPriv(conn, AUDIT_USER_1);
-    
+
     // Connect as Audit User and do a bunch of stuff.
     // Start testing activities here
     auditConnector = accumulo.getConnector(AUDIT_USER_1, PASSWORD);
     auditConnector.tableOperations().create(OLD_TEST_TABLE_NAME);
-    
+
     // Insert some play data
     BatchWriter bw = auditConnector.createBatchWriter(OLD_TEST_TABLE_NAME, new BatchWriterConfig());
     Mutation m = new Mutation("myRow");
@@ -363,7 +363,7 @@ public class AuditMessageTest {
     m.put("cf1", "cq2", "v3");
     bw.addMutation(m);
     bw.close();
-    
+
     // Start testing activities here
     // A regular scan
     Scanner scanner = auditConnector.createScanner(OLD_TEST_TABLE_NAME, auths);
@@ -371,43 +371,43 @@ public class AuditMessageTest {
       System.out.println("Scanner row: " + entry.getKey() + " " + entry.getValue());
     }
     scanner.close();
-    
+
     // A batch scan
     BatchScanner bs = auditConnector.createBatchScanner(OLD_TEST_TABLE_NAME, auths, 1);
     bs.fetchColumn(new Text("cf1"), new Text("cq1"));
     bs.setRanges(Arrays.asList(new Range("myRow", "myRow~")));
-    
+
     for (Map.Entry<Key,Value> entry : bs) {
       System.out.println("BatchScanner row: " + entry.getKey() + " " + entry.getValue());
     }
     bs.close();
-    
+
     // Delete some data.
     auditConnector.tableOperations().deleteRows(OLD_TEST_TABLE_NAME, new Text("myRow"), new Text("myRow~"));
-    
+
     // End of testing activities
-    
+
     ArrayList<String> auditMessages = getAuditMessages("testDataOperationsAudits");
     assertTrue(1 <= findAuditMessage(auditMessages, "action: scan; targetTable: " + OLD_TEST_TABLE_NAME).size());
     assertTrue(1 <= findAuditMessage(auditMessages, "action: scan; targetTable: " + OLD_TEST_TABLE_NAME).size());
     assertEquals(1,
         findAuditMessage(auditMessages, String.format(AuditedSecurityOperation.CAN_DELETE_RANGE_AUDIT_TEMPLATE, OLD_TEST_TABLE_NAME, "myRow", "myRow~")).size());
-    
+
   }
-  
+
   @Test(timeout = 60 * 1000)
   public void testDeniedAudits() throws AccumuloSecurityException, AccumuloException, TableExistsException, TableNotFoundException, IOException,
       InterruptedException {
-    
+
     // Create our user with no privs
     conn.securityOperations().createLocalUser(AUDIT_USER_1, new PasswordToken(PASSWORD));
     conn.tableOperations().create(OLD_TEST_TABLE_NAME);
     auditConnector = accumulo.getConnector(AUDIT_USER_1, PASSWORD);
-    
+
     // Start testing activities
     // We should get denied or / failed audit messages here.
     // We don't want the thrown exceptions to stop our tests, and we are not testing that the Exceptions are thrown.
-    
+
     try {
       auditConnector.tableOperations().create(NEW_TEST_TABLE_NAME);
     } catch (AccumuloSecurityException ex) {}
@@ -431,10 +431,10 @@ public class AuditMessageTest {
     try {
       auditConnector.tableOperations().deleteRows(OLD_TEST_TABLE_NAME, new Text("myRow"), new Text("myRow~"));
     } catch (AccumuloSecurityException ex) {}
-    
+
     // ... that will do for now.
     // End of testing activities
-    
+
     ArrayList<String> auditMessages = getAuditMessages("testDeniedAudits");
     assertEquals(1,
         findAuditMessage(auditMessages, "operation: denied;.*" + String.format(AuditedSecurityOperation.CAN_CREATE_TABLE_AUDIT_TEMPLATE, NEW_TEST_TABLE_NAME))
@@ -461,11 +461,11 @@ public class AuditMessageTest {
         findAuditMessage(auditMessages,
             "operation: denied;.*" + String.format(AuditedSecurityOperation.CAN_DELETE_RANGE_AUDIT_TEMPLATE, OLD_TEST_TABLE_NAME, "myRow", "myRow~")).size());
   }
-  
+
   @Test(timeout = 60 * 1000)
   public void testFailedAudits() throws AccumuloSecurityException, AccumuloException, TableExistsException, TableNotFoundException, IOException,
       InterruptedException {
-    
+
     // Start testing activities
     // Test that we get a few "failed" audit messages come through when we tell it to do dumb stuff
     // We don't want the thrown exceptions to stop our tests, and we are not testing that the Exceptions are thrown.
@@ -481,20 +481,20 @@ public class AuditMessageTest {
     ArrayList<String> auditMessages = getAuditMessages("testFailedAudits");
     // ... that will do for now.
     // End of testing activities
-    
+
     assertEquals(1, findAuditMessage(auditMessages, String.format(AuditedSecurityOperation.DROP_USER_AUDIT_TEMPLATE, AUDIT_USER_2)).size());
     assertEquals(
         1,
         findAuditMessage(auditMessages,
             String.format(AuditedSecurityOperation.REVOKE_SYSTEM_PERMISSION_AUDIT_TEMPLATE, SystemPermission.ALTER_TABLE, AUDIT_USER_2)).size());
     assertEquals(1, findAuditMessage(auditMessages, String.format(AuditedSecurityOperation.CREATE_USER_AUDIT_TEMPLATE, "root", "")).size());
-    
+
   }
-  
+
   @AfterClass
   public static void tearDownMiniCluster() throws Exception {
     accumulo.stop();
-    
+
     // Comment this out to have a look at the logs, they will be in /tmp/junit*
     folder.delete();
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aa711023/test/src/test/java/org/apache/accumulo/test/BatchWriterIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/BatchWriterIT.java b/test/src/test/java/org/apache/accumulo/test/BatchWriterIT.java
index a126a9d..e467f36 100644
--- a/test/src/test/java/org/apache/accumulo/test/BatchWriterIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/BatchWriterIT.java
@@ -21,15 +21,15 @@ import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
-import org.apache.accumulo.test.functional.ConfigurableMacIT;
+import org.apache.accumulo.test.functional.SimpleMacIT;
 import org.junit.Test;
 
-public class BatchWriterIT extends ConfigurableMacIT {
-  
-  @Test(timeout=30*1000)
+public class BatchWriterIT extends SimpleMacIT {
+
+  @Test(timeout = 30 * 1000)
   public void test() throws Exception {
     // call the batchwriter with buffer of size zero
-    String table = makeTableName();
+    String table = getTableNames(1)[0];
     Connector c = getConnector();
     c.tableOperations().create(table);
     BatchWriterConfig config = new BatchWriterConfig();
@@ -41,4 +41,4 @@ public class BatchWriterIT extends ConfigurableMacIT {
     writer.close();
   }
 
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aa711023/test/src/test/java/org/apache/accumulo/test/ConditionalWriterTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/ConditionalWriterTest.java b/test/src/test/java/org/apache/accumulo/test/ConditionalWriterTest.java
index 70f115b..39e0481 100644
--- a/test/src/test/java/org/apache/accumulo/test/ConditionalWriterTest.java
+++ b/test/src/test/java/org/apache/accumulo/test/ConditionalWriterTest.java
@@ -17,6 +17,7 @@
 
 package org.apache.accumulo.test;
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -84,11 +85,11 @@ import org.junit.rules.TemporaryFolder;
  * 
  */
 public class ConditionalWriterTest {
-  
+
   private static String secret = "superSecret";
-  public static TemporaryFolder folder = new TemporaryFolder();
+  public static TemporaryFolder folder = new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
   public static MiniAccumuloCluster cluster;
-  
+
   @BeforeClass
   public static void setUpBeforeClass() throws Exception {
     folder.create();
@@ -96,17 +97,17 @@ public class ConditionalWriterTest {
     cluster = new MiniAccumuloCluster(cfg);
     cluster.start();
   }
-  
+
   @Test
   public void testBasic() throws Exception {
-    
+
     ZooKeeperInstance zki = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
     Connector conn = zki.getConnector("root", new PasswordToken(secret));
-    
+
     conn.tableOperations().create("foo");
-    
+
     ConditionalWriter cw = conn.createConditionalWriter("foo", new ConditionalWriterConfig());
-    
+
     // mutation conditional on column tx:seq not exiting
     ConditionalMutation cm0 = new ConditionalMutation("99006", new Condition("tx", "seq"));
     cm0.put("name", "last", "doe");
@@ -114,92 +115,92 @@ public class ConditionalWriterTest {
     cm0.put("tx", "seq", "1");
     Assert.assertEquals(Status.ACCEPTED, cw.write(cm0).getStatus());
     Assert.assertEquals(Status.REJECTED, cw.write(cm0).getStatus());
-    
+
     // mutation conditional on column tx:seq being 1
     ConditionalMutation cm1 = new ConditionalMutation("99006", new Condition("tx", "seq").setValue("1"));
     cm1.put("name", "last", "Doe");
     cm1.put("tx", "seq", "2");
     Assert.assertEquals(Status.ACCEPTED, cw.write(cm1).getStatus());
-    
+
     // test condition where value differs
     ConditionalMutation cm2 = new ConditionalMutation("99006", new Condition("tx", "seq").setValue("1"));
     cm2.put("name", "last", "DOE");
     cm2.put("tx", "seq", "2");
     Assert.assertEquals(Status.REJECTED, cw.write(cm2).getStatus());
-    
+
     // test condition where column does not exists
     ConditionalMutation cm3 = new ConditionalMutation("99006", new Condition("txtypo", "seq").setValue("1"));
     cm3.put("name", "last", "deo");
     cm3.put("tx", "seq", "2");
     Assert.assertEquals(Status.REJECTED, cw.write(cm3).getStatus());
-    
+
     // test two conditions, where one should fail
     ConditionalMutation cm4 = new ConditionalMutation("99006", new Condition("tx", "seq").setValue("2"), new Condition("name", "last").setValue("doe"));
     cm4.put("name", "last", "deo");
     cm4.put("tx", "seq", "3");
     Assert.assertEquals(Status.REJECTED, cw.write(cm4).getStatus());
-    
+
     // test two conditions, where one should fail
     ConditionalMutation cm5 = new ConditionalMutation("99006", new Condition("tx", "seq").setValue("1"), new Condition("name", "last").setValue("Doe"));
     cm5.put("name", "last", "deo");
     cm5.put("tx", "seq", "3");
     Assert.assertEquals(Status.REJECTED, cw.write(cm5).getStatus());
-    
+
     // ensure rejected mutations did not write
     Scanner scanner = conn.createScanner("foo", Authorizations.EMPTY);
     scanner.fetchColumn(new Text("name"), new Text("last"));
     scanner.setRange(new Range("99006"));
     Assert.assertEquals("Doe", scanner.iterator().next().getValue().toString());
-    
+
     // test w/ two conditions that are met
     ConditionalMutation cm6 = new ConditionalMutation("99006", new Condition("tx", "seq").setValue("2"), new Condition("name", "last").setValue("Doe"));
     cm6.put("name", "last", "DOE");
     cm6.put("tx", "seq", "3");
     Assert.assertEquals(Status.ACCEPTED, cw.write(cm6).getStatus());
-    
+
     Assert.assertEquals("DOE", scanner.iterator().next().getValue().toString());
-    
+
     // test a conditional mutation that deletes
     ConditionalMutation cm7 = new ConditionalMutation("99006", new Condition("tx", "seq").setValue("3"));
     cm7.putDelete("name", "last");
     cm7.putDelete("name", "first");
     cm7.putDelete("tx", "seq");
     Assert.assertEquals(Status.ACCEPTED, cw.write(cm7).getStatus());
-    
+
     Assert.assertFalse(scanner.iterator().hasNext());
-    
+
     // add the row back
     Assert.assertEquals(Status.ACCEPTED, cw.write(cm0).getStatus());
     Assert.assertEquals(Status.REJECTED, cw.write(cm0).getStatus());
-    
+
     Assert.assertEquals("doe", scanner.iterator().next().getValue().toString());
     zki.close();
   }
-  
+
   @Test
   public void testFields() throws Exception {
     String table = "foo2";
-    
+
     ZooKeeperInstance zki = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
     Connector conn = zki.getConnector("root", new PasswordToken(secret));
-    
+
     conn.tableOperations().create(table);
-    
+
     Authorizations auths = new Authorizations("A", "B");
-    
+
     conn.securityOperations().changeUserAuthorizations("root", auths);
-    
+
     ConditionalWriter cw = conn.createConditionalWriter(table, new ConditionalWriterConfig().setAuthorizations(auths));
-    
+
     ColumnVisibility cva = new ColumnVisibility("A");
     ColumnVisibility cvb = new ColumnVisibility("B");
-    
+
     ConditionalMutation cm0 = new ConditionalMutation("99006", new Condition("tx", "seq").setVisibility(cva));
     cm0.put("name", "last", cva, "doe");
     cm0.put("name", "first", cva, "john");
     cm0.put("tx", "seq", cva, "1");
     Assert.assertEquals(Status.ACCEPTED, cw.write(cm0).getStatus());
-    
+
     Scanner scanner = conn.createScanner(table, auths);
     scanner.setRange(new Range("99006"));
     // TODO verify all columns
@@ -207,325 +208,325 @@ public class ConditionalWriterTest {
     Entry<Key,Value> entry = scanner.iterator().next();
     Assert.assertEquals("1", entry.getValue().toString());
     long ts = entry.getKey().getTimestamp();
-    
+
     // test wrong colf
     ConditionalMutation cm1 = new ConditionalMutation("99006", new Condition("txA", "seq").setVisibility(cva).setValue("1"));
     cm1.put("name", "last", cva, "Doe");
     cm1.put("name", "first", cva, "John");
     cm1.put("tx", "seq", cva, "2");
     Assert.assertEquals(Status.REJECTED, cw.write(cm1).getStatus());
-    
+
     // test wrong colq
     ConditionalMutation cm2 = new ConditionalMutation("99006", new Condition("tx", "seqA").setVisibility(cva).setValue("1"));
     cm2.put("name", "last", cva, "Doe");
     cm2.put("name", "first", cva, "John");
     cm2.put("tx", "seq", cva, "2");
     Assert.assertEquals(Status.REJECTED, cw.write(cm2).getStatus());
-    
+
     // test wrong colv
     ConditionalMutation cm3 = new ConditionalMutation("99006", new Condition("tx", "seq").setVisibility(cvb).setValue("1"));
     cm3.put("name", "last", cva, "Doe");
     cm3.put("name", "first", cva, "John");
     cm3.put("tx", "seq", cva, "2");
     Assert.assertEquals(Status.REJECTED, cw.write(cm3).getStatus());
-    
+
     // test wrong timestamp
     ConditionalMutation cm4 = new ConditionalMutation("99006", new Condition("tx", "seq").setVisibility(cva).setTimestamp(ts + 1).setValue("1"));
     cm4.put("name", "last", cva, "Doe");
     cm4.put("name", "first", cva, "John");
     cm4.put("tx", "seq", cva, "2");
     Assert.assertEquals(Status.REJECTED, cw.write(cm4).getStatus());
-    
+
     // test wrong timestamp
     ConditionalMutation cm5 = new ConditionalMutation("99006", new Condition("tx", "seq").setVisibility(cva).setTimestamp(ts - 1).setValue("1"));
     cm5.put("name", "last", cva, "Doe");
     cm5.put("name", "first", cva, "John");
     cm5.put("tx", "seq", cva, "2");
     Assert.assertEquals(Status.REJECTED, cw.write(cm5).getStatus());
-    
+
     // ensure no updates were made
     entry = scanner.iterator().next();
     Assert.assertEquals("1", entry.getValue().toString());
-    
+
     // set all columns correctly
     ConditionalMutation cm6 = new ConditionalMutation("99006", new Condition("tx", "seq").setVisibility(cva).setTimestamp(ts).setValue("1"));
     cm6.put("name", "last", cva, "Doe");
     cm6.put("name", "first", cva, "John");
     cm6.put("tx", "seq", cva, "2");
     Assert.assertEquals(Status.ACCEPTED, cw.write(cm6).getStatus());
-    
+
     entry = scanner.iterator().next();
     Assert.assertEquals("2", entry.getValue().toString());
-    
+
     // TODO test each field w/ absence
     zki.close();
-   
+
   }
-  
+
   @Test
   public void testBadColVis() throws Exception {
     // test when a user sets a col vis in a condition that can never be seen
     String table = "foo3";
-    
+
     ZooKeeperInstance zki = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
     Connector conn = zki.getConnector("root", new PasswordToken(secret));
-    
+
     conn.tableOperations().create(table);
-    
+
     Authorizations auths = new Authorizations("A", "B");
-    
+
     conn.securityOperations().changeUserAuthorizations("root", auths);
-    
+
     Authorizations filteredAuths = new Authorizations("A");
-    
+
     ConditionalWriter cw = conn.createConditionalWriter(table, new ConditionalWriterConfig().setAuthorizations(filteredAuths));
-    
+
     ColumnVisibility cva = new ColumnVisibility("A");
     ColumnVisibility cvb = new ColumnVisibility("B");
     ColumnVisibility cvc = new ColumnVisibility("C");
-    
+
     // User has authorization, but didn't include it in the writer
     ConditionalMutation cm0 = new ConditionalMutation("99006", new Condition("tx", "seq").setVisibility(cvb));
     cm0.put("name", "last", cva, "doe");
     cm0.put("name", "first", cva, "john");
     cm0.put("tx", "seq", cva, "1");
     Assert.assertEquals(Status.INVISIBLE_VISIBILITY, cw.write(cm0).getStatus());
-    
+
     ConditionalMutation cm1 = new ConditionalMutation("99006", new Condition("tx", "seq").setVisibility(cvb).setValue("1"));
     cm1.put("name", "last", cva, "doe");
     cm1.put("name", "first", cva, "john");
     cm1.put("tx", "seq", cva, "1");
     Assert.assertEquals(Status.INVISIBLE_VISIBILITY, cw.write(cm1).getStatus());
-    
+
     // User does not have the authorization
     ConditionalMutation cm2 = new ConditionalMutation("99006", new Condition("tx", "seq").setVisibility(cvc));
     cm2.put("name", "last", cva, "doe");
     cm2.put("name", "first", cva, "john");
     cm2.put("tx", "seq", cva, "1");
     Assert.assertEquals(Status.INVISIBLE_VISIBILITY, cw.write(cm2).getStatus());
-    
+
     ConditionalMutation cm3 = new ConditionalMutation("99006", new Condition("tx", "seq").setVisibility(cvc).setValue("1"));
     cm3.put("name", "last", cva, "doe");
     cm3.put("name", "first", cva, "john");
     cm3.put("tx", "seq", cva, "1");
     Assert.assertEquals(Status.INVISIBLE_VISIBILITY, cw.write(cm3).getStatus());
-    
+
     // if any visibility is bad, good visibilities don't override
     ConditionalMutation cm4 = new ConditionalMutation("99006", new Condition("tx", "seq").setVisibility(cvb), new Condition("tx", "seq").setVisibility(cva));
-    
+
     cm4.put("name", "last", cva, "doe");
     cm4.put("name", "first", cva, "john");
     cm4.put("tx", "seq", cva, "1");
     Assert.assertEquals(Status.INVISIBLE_VISIBILITY, cw.write(cm4).getStatus());
-    
+
     ConditionalMutation cm5 = new ConditionalMutation("99006", new Condition("tx", "seq").setVisibility(cvb).setValue("1"), new Condition("tx", "seq")
         .setVisibility(cva).setValue("1"));
     cm5.put("name", "last", cva, "doe");
     cm5.put("name", "first", cva, "john");
     cm5.put("tx", "seq", cva, "1");
     Assert.assertEquals(Status.INVISIBLE_VISIBILITY, cw.write(cm5).getStatus());
-    
+
     ConditionalMutation cm6 = new ConditionalMutation("99006", new Condition("tx", "seq").setVisibility(cvb).setValue("1"),
         new Condition("tx", "seq").setVisibility(cva));
     cm6.put("name", "last", cva, "doe");
     cm6.put("name", "first", cva, "john");
     cm6.put("tx", "seq", cva, "1");
     Assert.assertEquals(Status.INVISIBLE_VISIBILITY, cw.write(cm6).getStatus());
-    
+
     ConditionalMutation cm7 = new ConditionalMutation("99006", new Condition("tx", "seq").setVisibility(cvb), new Condition("tx", "seq").setVisibility(cva)
         .setValue("1"));
     cm7.put("name", "last", cva, "doe");
     cm7.put("name", "first", cva, "john");
     cm7.put("tx", "seq", cva, "1");
     Assert.assertEquals(Status.INVISIBLE_VISIBILITY, cw.write(cm7).getStatus());
-    
+
     cw.close();
-    
+
     // test passing auths that exceed users configured auths
-    
+
     Authorizations exceedingAuths = new Authorizations("A", "B", "D");
     ConditionalWriter cw2 = conn.createConditionalWriter(table, new ConditionalWriterConfig().setAuthorizations(exceedingAuths));
-    
+
     ConditionalMutation cm8 = new ConditionalMutation("99006", new Condition("tx", "seq").setVisibility(cvb), new Condition("tx", "seq").setVisibility(cva)
         .setValue("1"));
     cm8.put("name", "last", cva, "doe");
     cm8.put("name", "first", cva, "john");
     cm8.put("tx", "seq", cva, "1");
-    
+
     try {
       cw2.write(cm8).getStatus();
       Assert.fail();
     } catch (AccumuloSecurityException ase) {}
-    
+
     cw2.close();
-    
+
     zki.close();
   }
-  
+
   @Test
   public void testConstraints() throws Exception {
     // ensure constraint violations are properly reported
     String table = "foo5";
-    
+
     ZooKeeperInstance zki = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
     Connector conn = zki.getConnector("root", new PasswordToken(secret));
-    
+
     conn.tableOperations().create(table);
     conn.tableOperations().addConstraint(table, AlphaNumKeyConstraint.class.getName());
     conn.tableOperations().clone(table, table + "_clone", true, new HashMap<String,String>(), new HashSet<String>());
-    
+
     Scanner scanner = conn.createScanner(table + "_clone", new Authorizations());
-    
+
     ConditionalWriter cw = conn.createConditionalWriter(table + "_clone", new ConditionalWriterConfig());
-    
+
     ConditionalMutation cm0 = new ConditionalMutation("99006+", new Condition("tx", "seq"));
     cm0.put("tx", "seq", "1");
-    
+
     Assert.assertEquals(Status.VIOLATED, cw.write(cm0).getStatus());
     Assert.assertFalse(scanner.iterator().hasNext());
-    
+
     ConditionalMutation cm1 = new ConditionalMutation("99006", new Condition("tx", "seq"));
     cm1.put("tx", "seq", "1");
-    
+
     Assert.assertEquals(Status.ACCEPTED, cw.write(cm1).getStatus());
     Assert.assertTrue(scanner.iterator().hasNext());
-    
+
     cw.close();
     zki.close();
-   
+
   }
-  
+
   @Test
   public void testIterators() throws Exception {
     String table = "foo4";
-    
+
     ZooKeeperInstance zki = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
     Connector conn = zki.getConnector("root", new PasswordToken(secret));
-    
+
     conn.tableOperations().create(table, false);
-    
+
     BatchWriter bw = conn.createBatchWriter(table, new BatchWriterConfig());
-    
+
     Mutation m = new Mutation("ACCUMULO-1000");
     m.put("count", "comments", "1");
     bw.addMutation(m);
     bw.addMutation(m);
     bw.addMutation(m);
-    
+
     m = new Mutation("ACCUMULO-1001");
     m.put("count2", "comments", "1");
     bw.addMutation(m);
     bw.addMutation(m);
-    
+
     m = new Mutation("ACCUMULO-1002");
     m.put("count2", "comments", "1");
     bw.addMutation(m);
     bw.addMutation(m);
-    
+
     bw.close();
-    
+
     IteratorSetting iterConfig = new IteratorSetting(10, SummingCombiner.class);
     SummingCombiner.setEncodingType(iterConfig, Type.STRING);
     SummingCombiner.setColumns(iterConfig, Collections.singletonList(new IteratorSetting.Column("count")));
-    
+
     IteratorSetting iterConfig2 = new IteratorSetting(10, SummingCombiner.class);
     SummingCombiner.setEncodingType(iterConfig2, Type.STRING);
     SummingCombiner.setColumns(iterConfig2, Collections.singletonList(new IteratorSetting.Column("count2", "comments")));
-    
+
     IteratorSetting iterConfig3 = new IteratorSetting(5, VersioningIterator.class);
     VersioningIterator.setMaxVersions(iterConfig3, 1);
-    
+
     Scanner scanner = conn.createScanner(table, new Authorizations());
     scanner.addScanIterator(iterConfig);
     scanner.setRange(new Range("ACCUMULO-1000"));
     scanner.fetchColumn(new Text("count"), new Text("comments"));
-    
+
     Assert.assertEquals("3", scanner.iterator().next().getValue().toString());
-    
+
     ConditionalWriter cw = conn.createConditionalWriter(table, new ConditionalWriterConfig());
-    
+
     ConditionalMutation cm0 = new ConditionalMutation("ACCUMULO-1000", new Condition("count", "comments").setValue("3"));
     cm0.put("count", "comments", "1");
     Assert.assertEquals(Status.REJECTED, cw.write(cm0).getStatus());
     Assert.assertEquals("3", scanner.iterator().next().getValue().toString());
-    
+
     ConditionalMutation cm1 = new ConditionalMutation("ACCUMULO-1000", new Condition("count", "comments").setIterators(iterConfig).setValue("3"));
     cm1.put("count", "comments", "1");
     Assert.assertEquals(Status.ACCEPTED, cw.write(cm1).getStatus());
     Assert.assertEquals("4", scanner.iterator().next().getValue().toString());
-    
+
     ConditionalMutation cm2 = new ConditionalMutation("ACCUMULO-1000", new Condition("count", "comments").setValue("4"));
     cm2.put("count", "comments", "1");
     Assert.assertEquals(Status.REJECTED, cw.write(cm1).getStatus());
     Assert.assertEquals("4", scanner.iterator().next().getValue().toString());
-    
+
     // run test with multiple iterators passed in same batch and condition with two iterators
-    
+
     ConditionalMutation cm3 = new ConditionalMutation("ACCUMULO-1000", new Condition("count", "comments").setIterators(iterConfig).setValue("4"));
     cm3.put("count", "comments", "1");
-    
+
     ConditionalMutation cm4 = new ConditionalMutation("ACCUMULO-1001", new Condition("count2", "comments").setIterators(iterConfig2).setValue("2"));
     cm4.put("count2", "comments", "1");
-    
+
     ConditionalMutation cm5 = new ConditionalMutation("ACCUMULO-1002", new Condition("count2", "comments").setIterators(iterConfig2, iterConfig3).setValue("2"));
     cm5.put("count2", "comments", "1");
-    
+
     Iterator<Result> results = cw.write(Arrays.asList(cm3, cm4, cm5).iterator());
     Map<String,Status> actual = new HashMap<String,Status>();
-    
+
     while (results.hasNext()) {
       Result result = results.next();
       String k = new String(result.getMutation().getRow());
       Assert.assertFalse(actual.containsKey(k));
       actual.put(k, result.getStatus());
     }
-    
+
     Map<String,Status> expected = new HashMap<String,Status>();
     expected.put("ACCUMULO-1000", Status.ACCEPTED);
     expected.put("ACCUMULO-1001", Status.ACCEPTED);
     expected.put("ACCUMULO-1002", Status.REJECTED);
-    
+
     Assert.assertEquals(expected, actual);
-    
+
     // TODO test w/ table that has iterators configured
-    
+
     cw.close();
     zki.close();
   }
-  
+
   @Test
   public void testBatch() throws Exception {
     String table = "foo6";
-    
+
     ZooKeeperInstance zki = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
     Connector conn = zki.getConnector("root", new PasswordToken(secret));
-    
+
     conn.tableOperations().create(table);
-    
+
     conn.securityOperations().changeUserAuthorizations("root", new Authorizations("A", "B"));
-    
+
     ColumnVisibility cvab = new ColumnVisibility("A|B");
-    
+
     ArrayList<ConditionalMutation> mutations = new ArrayList<ConditionalMutation>();
-    
+
     ConditionalMutation cm0 = new ConditionalMutation("99006", new Condition("tx", "seq").setVisibility(cvab));
     cm0.put("name", "last", cvab, "doe");
     cm0.put("name", "first", cvab, "john");
     cm0.put("tx", "seq", cvab, "1");
     mutations.add(cm0);
-    
+
     ConditionalMutation cm1 = new ConditionalMutation("59056", new Condition("tx", "seq").setVisibility(cvab));
     cm1.put("name", "last", cvab, "doe");
     cm1.put("name", "first", cvab, "jane");
     cm1.put("tx", "seq", cvab, "1");
     mutations.add(cm1);
-    
+
     ConditionalMutation cm2 = new ConditionalMutation("19059", new Condition("tx", "seq").setVisibility(cvab));
     cm2.put("name", "last", cvab, "doe");
     cm2.put("name", "first", cvab, "jack");
     cm2.put("tx", "seq", cvab, "1");
     mutations.add(cm2);
-    
+
     ConditionalWriter cw = conn.createConditionalWriter(table, new ConditionalWriterConfig().setAuthorizations(new Authorizations("A")));
     Iterator<Result> results = cw.write(mutations.iterator());
     int count = 0;
@@ -534,39 +535,39 @@ public class ConditionalWriterTest {
       Assert.assertEquals(Status.ACCEPTED, result.getStatus());
       count++;
     }
-    
+
     Assert.assertEquals(3, count);
-    
+
     Scanner scanner = conn.createScanner(table, new Authorizations("A"));
     scanner.fetchColumn(new Text("tx"), new Text("seq"));
-    
+
     for (String row : new String[] {"99006", "59056", "19059"}) {
       scanner.setRange(new Range(row));
       Assert.assertEquals("1", scanner.iterator().next().getValue().toString());
     }
-    
+
     TreeSet<Text> splits = new TreeSet<Text>();
     splits.add(new Text("7"));
     splits.add(new Text("3"));
     conn.tableOperations().addSplits(table, splits);
-    
+
     mutations.clear();
-    
+
     ConditionalMutation cm3 = new ConditionalMutation("99006", new Condition("tx", "seq").setVisibility(cvab).setValue("1"));
     cm3.put("name", "last", cvab, "Doe");
     cm3.put("tx", "seq", cvab, "2");
     mutations.add(cm3);
-    
+
     ConditionalMutation cm4 = new ConditionalMutation("59056", new Condition("tx", "seq").setVisibility(cvab));
     cm4.put("name", "last", cvab, "Doe");
     cm4.put("tx", "seq", cvab, "1");
     mutations.add(cm4);
-    
+
     ConditionalMutation cm5 = new ConditionalMutation("19059", new Condition("tx", "seq").setVisibility(cvab).setValue("2"));
     cm5.put("name", "last", cvab, "Doe");
     cm5.put("tx", "seq", cvab, "3");
     mutations.add(cm5);
-    
+
     results = cw.write(mutations.iterator());
     int accepted = 0;
     int rejected = 0;
@@ -580,119 +581,119 @@ public class ConditionalWriterTest {
         rejected++;
       }
     }
-    
+
     Assert.assertEquals(1, accepted);
     Assert.assertEquals(2, rejected);
-    
+
     for (String row : new String[] {"59056", "19059"}) {
       scanner.setRange(new Range(row));
       Assert.assertEquals("1", scanner.iterator().next().getValue().toString());
     }
-    
+
     scanner.setRange(new Range("99006"));
     Assert.assertEquals("2", scanner.iterator().next().getValue().toString());
-    
+
     scanner.clearColumns();
     scanner.fetchColumn(new Text("name"), new Text("last"));
     Assert.assertEquals("Doe", scanner.iterator().next().getValue().toString());
-    
+
     cw.close();
     zki.close();
   }
-  
+
   @Test
   public void testBigBatch() throws Exception {
-    
+
     String table = "foo100";
-    
+
     ZooKeeperInstance zki = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
     Connector conn = zki.getConnector("root", new PasswordToken(secret));
-    
+
     conn.tableOperations().create(table);
     conn.tableOperations().addSplits(table, nss("2", "4", "6"));
-    
+
     UtilWaitThread.sleep(2000);
-    
+
     int num = 100;
-    
+
     ArrayList<byte[]> rows = new ArrayList<byte[]>(num);
     ArrayList<ConditionalMutation> cml = new ArrayList<ConditionalMutation>(num);
-    
+
     Random r = new Random();
     byte[] e = new byte[0];
-    
+
     for (int i = 0; i < num; i++) {
       rows.add(FastFormat.toZeroPaddedString(Math.abs(r.nextLong()), 16, 16, e));
     }
-    
+
     for (int i = 0; i < num; i++) {
       ConditionalMutation cm = new ConditionalMutation(rows.get(i), new Condition("meta", "seq"));
-      
+
       cm.put("meta", "seq", "1");
       cm.put("meta", "tx", UUID.randomUUID().toString());
-      
+
       cml.add(cm);
     }
-    
+
     ConditionalWriter cw = conn.createConditionalWriter(table, new ConditionalWriterConfig());
-    
+
     Iterator<Result> results = cw.write(cml.iterator());
-    
+
     int count = 0;
-    
+
     // TODO check got each row back
     while (results.hasNext()) {
       Result result = results.next();
       Assert.assertEquals(Status.ACCEPTED, result.getStatus());
       count++;
     }
-    
+
     Assert.assertEquals(num, count);
-    
+
     ArrayList<ConditionalMutation> cml2 = new ArrayList<ConditionalMutation>(num);
-    
+
     for (int i = 0; i < num; i++) {
       ConditionalMutation cm = new ConditionalMutation(rows.get(i), new Condition("meta", "seq").setValue("1"));
-      
+
       cm.put("meta", "seq", "2");
       cm.put("meta", "tx", UUID.randomUUID().toString());
-      
+
       cml2.add(cm);
     }
-    
+
     count = 0;
-    
+
     results = cw.write(cml2.iterator());
-    
+
     while (results.hasNext()) {
       Result result = results.next();
       Assert.assertEquals(Status.ACCEPTED, result.getStatus());
       count++;
     }
-    
+
     Assert.assertEquals(num, count);
-    
+
     cw.close();
     zki.close();
   }
-  
+
   @Test
   public void testBatchErrors() throws Exception {
-    
+
     String table = "foo7";
-    
+
     ZooKeeperInstance zki = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
     Connector conn = zki.getConnector("root", new PasswordToken(secret));
-    
+
     conn.tableOperations().create(table);
     conn.tableOperations().addConstraint(table, AlphaNumKeyConstraint.class.getName());
     conn.tableOperations().clone(table, table + "_clone", true, new HashMap<String,String>(), new HashSet<String>());
-    
+
     conn.securityOperations().changeUserAuthorizations("root", new Authorizations("A", "B"));
-    
+
     ColumnVisibility cvaob = new ColumnVisibility("A|B");
     ColumnVisibility cvaab = new ColumnVisibility("A&B");
-    
+
     switch ((new Random()).nextInt(3)) {
       case 1:
         conn.tableOperations().addSplits(table, nss("6"));
@@ -701,33 +702,33 @@ public class ConditionalWriterTest {
         conn.tableOperations().addSplits(table, nss("2", "95"));
         break;
     }
-    
+
     ArrayList<ConditionalMutation> mutations = new ArrayList<ConditionalMutation>();
-    
+
     ConditionalMutation cm0 = new ConditionalMutation("99006", new Condition("tx", "seq").setVisibility(cvaob));
     cm0.put("name+", "last", cvaob, "doe");
     cm0.put("name", "first", cvaob, "john");
     cm0.put("tx", "seq", cvaob, "1");
     mutations.add(cm0);
-    
+
     ConditionalMutation cm1 = new ConditionalMutation("59056", new Condition("tx", "seq").setVisibility(cvaab));
     cm1.put("name", "last", cvaab, "doe");
     cm1.put("name", "first", cvaab, "jane");
     cm1.put("tx", "seq", cvaab, "1");
     mutations.add(cm1);
-    
+
     ConditionalMutation cm2 = new ConditionalMutation("19059", new Condition("tx", "seq").setVisibility(cvaob));
     cm2.put("name", "last", cvaob, "doe");
     cm2.put("name", "first", cvaob, "jack");
     cm2.put("tx", "seq", cvaob, "1");
     mutations.add(cm2);
-    
+
     ConditionalMutation cm3 = new ConditionalMutation("90909", new Condition("tx", "seq").setVisibility(cvaob).setValue("1"));
     cm3.put("name", "last", cvaob, "doe");
     cm3.put("name", "first", cvaob, "john");
     cm3.put("tx", "seq", cvaob, "2");
     mutations.add(cm3);
-    
+
     ConditionalWriter cw = conn.createConditionalWriter(table, new ConditionalWriterConfig().setAuthorizations(new Authorizations("A")));
     Iterator<Result> results = cw.write(mutations.iterator());
     HashSet<String> rows = new HashSet<String>();
@@ -745,57 +746,57 @@ public class ConditionalWriterTest {
       }
       rows.add(row);
     }
-    
+
     Assert.assertEquals(4, rows.size());
-    
+
     Scanner scanner = conn.createScanner(table, new Authorizations("A"));
     scanner.fetchColumn(new Text("tx"), new Text("seq"));
-    
+
     Iterator<Entry<Key,Value>> iter = scanner.iterator();
     Assert.assertEquals("1", iter.next().getValue().toString());
     Assert.assertFalse(iter.hasNext());
-    
+
     cw.close();
     zki.close();
   }
-  
+
   @Test
   public void testSameRow() throws Exception {
     // test multiple mutations for same row in same batch
-    
+
     String table = "foo8";
-    
+
     ZooKeeperInstance zki = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
     Connector conn = zki.getConnector("root", new PasswordToken(secret));
-    
+
     conn.tableOperations().create(table);
-    
+
     ConditionalWriter cw = conn.createConditionalWriter(table, new ConditionalWriterConfig());
-    
+
     ConditionalMutation cm1 = new ConditionalMutation("r1", new Condition("tx", "seq"));
     cm1.put("tx", "seq", "1");
     cm1.put("data", "x", "a");
-    
+
     Assert.assertEquals(Status.ACCEPTED, cw.write(cm1).getStatus());
-    
+
     ConditionalMutation cm2 = new ConditionalMutation("r1", new Condition("tx", "seq").setValue("1"));
     cm2.put("tx", "seq", "2");
     cm2.put("data", "x", "b");
-    
+
     ConditionalMutation cm3 = new ConditionalMutation("r1", new Condition("tx", "seq").setValue("1"));
     cm3.put("tx", "seq", "2");
     cm3.put("data", "x", "c");
-    
+
     ConditionalMutation cm4 = new ConditionalMutation("r1", new Condition("tx", "seq").setValue("1"));
     cm4.put("tx", "seq", "2");
     cm4.put("data", "x", "d");
-    
+
     Iterator<Result> results = cw.write(Arrays.asList(cm2, cm3, cm4).iterator());
-    
+
     int accepted = 0;
     int rejected = 0;
     int total = 0;
-    
+
     while (results.hasNext()) {
       Status status = results.next().getStatus();
       if (status == Status.ACCEPTED)
@@ -804,32 +805,32 @@ public class ConditionalWriterTest {
         rejected++;
       total++;
     }
-    
+
     Assert.assertEquals(1, accepted);
     Assert.assertEquals(2, rejected);
     Assert.assertEquals(3, total);
-    
+
     cw.close();
     zki.close();
   }
-  
+
   private static class Stats {
-    
+
     ByteSequence row = null;
     int seq;
     long sum;
     int data[] = new int[10];
-    
+
     public Stats(Iterator<Entry<Key,Value>> iterator) {
       while (iterator.hasNext()) {
         Entry<Key,Value> entry = iterator.next();
-        
+
         if (row == null)
           row = entry.getKey().getRowData();
-        
+
         String cf = entry.getKey().getColumnFamilyData().toString();
         String cq = entry.getKey().getColumnQualifierData().toString();
-        
+
         if (cf.equals("data")) {
           data[Integer.parseInt(cq)] = Integer.parseInt(entry.getValue().toString());
         } else if (cf.equals("meta")) {
@@ -840,16 +841,16 @@ public class ConditionalWriterTest {
           }
         }
       }
-      
+
       long sum2 = 0;
-      
+
       for (int datum : data) {
         sum2 += datum;
       }
-      
+
       Assert.assertEquals(sum2, sum);
     }
-    
+
     public Stats(ByteSequence row) {
       this.row = row;
       for (int i = 0; i < data.length; i++) {
@@ -858,43 +859,43 @@ public class ConditionalWriterTest {
       this.seq = -1;
       this.sum = 0;
     }
-    
+
     void set(int index, int value) {
       sum -= data[index];
       sum += value;
       data[index] = value;
     }
-    
+
     ConditionalMutation toMutation() {
       Condition cond = new Condition("meta", "seq");
       if (seq >= 0)
         cond.setValue(seq + "");
-      
+
       ConditionalMutation cm = new ConditionalMutation(row, cond);
-      
+
       cm.put("meta", "seq", (seq + 1) + "");
       cm.put("meta", "sum", (sum) + "");
-      
+
       for (int i = 0; i < data.length; i++) {
         cm.put("data", i + "", data[i] + "");
       }
-      
+
       return cm;
     }
-    
+
     @Override
     public String toString() {
       return row + " " + seq + " " + sum;
     }
   }
-  
+
   private static class MutatorTask implements Runnable {
     String table;
     ArrayList<ByteSequence> rows;
     ConditionalWriter cw;
     Connector conn;
     AtomicBoolean failed;
-    
+
     public MutatorTask(String table, Connector conn, ArrayList<ByteSequence> rows, ConditionalWriter cw, AtomicBoolean failed) {
       this.table = table;
       this.rows = rows;
@@ -902,64 +903,64 @@ public class ConditionalWriterTest {
       this.cw = cw;
       this.failed = failed;
     }
-    
+
     @Override
     public void run() {
       try {
         Random rand = new Random();
-        
+
         Scanner scanner = new IsolatedScanner(conn.createScanner(table, Authorizations.EMPTY));
-        
+
         for (int i = 0; i < 20; i++) {
           int numRows = rand.nextInt(10) + 1;
-          
+
           ArrayList<ByteSequence> changes = new ArrayList<ByteSequence>(numRows);
           ArrayList<ConditionalMutation> mutations = new ArrayList<ConditionalMutation>();
-          
+
           for (int j = 0; j < numRows; j++)
             changes.add(rows.get(rand.nextInt(rows.size())));
-          
+
           for (ByteSequence row : changes) {
             scanner.setRange(new Range(row.toString()));
             Stats stats = new Stats(scanner.iterator());
             stats.set(rand.nextInt(10), Math.abs(rand.nextInt()));
             mutations.add(stats.toMutation());
           }
-          
+
           ArrayList<ByteSequence> changed = new ArrayList<ByteSequence>(numRows);
           Iterator<Result> results = cw.write(mutations.iterator());
           while (results.hasNext()) {
             Result result = results.next();
             changed.add(new ArrayByteSequence(result.getMutation().getRow()));
           }
-          
+
           Collections.sort(changes);
           Collections.sort(changed);
-          
+
           Assert.assertEquals(changes, changed);
-          
+
         }
-        
+
       } catch (Exception e) {
         e.printStackTrace();
         failed.set(true);
       }
     }
   }
-  
+
   @Test
   public void testThreads() throws Exception {
     // test multiple threads using a single conditional writer
-    
+
     String table = "foo9";
-    
+
     ZooKeeperInstance zki = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
     Connector conn = zki.getConnector("root", new PasswordToken(secret));
-    
+
     conn.tableOperations().create(table);
-    
+
     Random rand = new Random();
-    
+
     switch (rand.nextInt(3)) {
       case 1:
         conn.tableOperations().addSplits(table, nss("4"));
@@ -968,20 +969,20 @@ public class ConditionalWriterTest {
         conn.tableOperations().addSplits(table, nss("3", "5"));
         break;
     }
-    
+
     ConditionalWriter cw = conn.createConditionalWriter(table, new ConditionalWriterConfig());
-    
+
     ArrayList<ByteSequence> rows = new ArrayList<ByteSequence>();
-    
+
     for (int i = 0; i < 1000; i++) {
       rows.add(new ArrayByteSequence(FastFormat.toZeroPaddedString(Math.abs(rand.nextLong()), 16, 16, new byte[0])));
     }
-    
+
     ArrayList<ConditionalMutation> mutations = new ArrayList<ConditionalMutation>();
-    
+
     for (ByteSequence row : rows)
       mutations.add(new Stats(row).toMutation());
-    
+
     ArrayList<ByteSequence> rows2 = new ArrayList<ByteSequence>();
     Iterator<Result> results = cw.write(mutations.iterator());
     while (results.hasNext()) {
@@ -989,126 +990,126 @@ public class ConditionalWriterTest {
       Assert.assertEquals(Status.ACCEPTED, result.getStatus());
       rows2.add(new ArrayByteSequence(result.getMutation().getRow()));
     }
-    
+
     Collections.sort(rows);
     Collections.sort(rows2);
-    
+
     Assert.assertEquals(rows, rows2);
-    
+
     AtomicBoolean failed = new AtomicBoolean(false);
-    
+
     ExecutorService tp = Executors.newFixedThreadPool(5);
     for (int i = 0; i < 5; i++) {
       tp.submit(new MutatorTask(table, conn, rows, cw, failed));
     }
-    
+
     tp.shutdown();
-    
+
     while (!tp.isTerminated()) {
       tp.awaitTermination(1, TimeUnit.MINUTES);
     }
-    
+
     Assert.assertFalse(failed.get());
-    
+
     Scanner scanner = conn.createScanner(table, Authorizations.EMPTY);
-    
+
     RowIterator rowIter = new RowIterator(scanner);
-    
+
     while (rowIter.hasNext()) {
       Iterator<Entry<Key,Value>> row = rowIter.next();
       new Stats(row);
     }
     zki.close();
   }
-  
+
   private SortedSet<Text> nss(String... splits) {
     TreeSet<Text> ret = new TreeSet<Text>();
     for (String split : splits)
       ret.add(new Text(split));
-    
+
     return ret;
   }
-  
+
   @Test
   public void testSecurity() throws Exception {
     // test against table user does not have read and/or write permissions for
-    
+
     ZooKeeperInstance zki = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
     Connector conn = zki.getConnector("root", new PasswordToken(secret));
-    
+
     conn.securityOperations().createLocalUser("user1", new PasswordToken("u1p"));
-    
+
     conn.tableOperations().create("sect1");
     conn.tableOperations().create("sect2");
     conn.tableOperations().create("sect3");
-    
+
     conn.securityOperations().grantTablePermission("user1", "sect1", TablePermission.READ);
     conn.securityOperations().grantTablePermission("user1", "sect2", TablePermission.WRITE);
     conn.securityOperations().grantTablePermission("user1", "sect3", TablePermission.READ);
     conn.securityOperations().grantTablePermission("user1", "sect3", TablePermission.WRITE);
-    
+
     Connector conn2 = zki.getConnector("user1", new PasswordToken("u1p"));
-    
+
     ConditionalMutation cm1 = new ConditionalMutation("r1", new Condition("tx", "seq"));
     cm1.put("tx", "seq", "1");
     cm1.put("data", "x", "a");
-    
+
     ConditionalWriter cw1 = conn2.createConditionalWriter("sect1", new ConditionalWriterConfig());
     ConditionalWriter cw2 = conn2.createConditionalWriter("sect2", new ConditionalWriterConfig());
     ConditionalWriter cw3 = conn2.createConditionalWriter("sect3", new ConditionalWriterConfig());
-    
+
     Assert.assertEquals(Status.ACCEPTED, cw3.write(cm1).getStatus());
-    
+
     try {
       cw1.write(cm1).getStatus();
       Assert.assertFalse(true);
     } catch (AccumuloSecurityException ase) {
-      
+
     }
-    
+
     try {
       cw2.write(cm1).getStatus();
       Assert.assertFalse(true);
     } catch (AccumuloSecurityException ase) {
-      
+
     }
     zki.close();
-   
+
   }
-  
+
   @Test
   public void testTimeout() throws Exception {
     ZooKeeperInstance zki = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
     Connector conn = zki.getConnector("root", new PasswordToken(secret));
-    
+
     String table = "fooT";
-    
+
     conn.tableOperations().create(table);
-    
+
     ConditionalWriter cw = conn.createConditionalWriter(table, new ConditionalWriterConfig().setTimeout(1, TimeUnit.SECONDS));
-    
+
     ConditionalMutation cm1 = new ConditionalMutation("r1", new Condition("tx", "seq"));
     cm1.put("tx", "seq", "1");
     cm1.put("data", "x", "a");
-    
+
     Assert.assertEquals(cw.write(cm1).getStatus(), Status.ACCEPTED);
-    
+
     IteratorSetting is = new IteratorSetting(5, SlowIterator.class);
     SlowIterator.setSeekSleepTime(is, 1500);
-    
+
     ConditionalMutation cm2 = new ConditionalMutation("r1", new Condition("tx", "seq").setValue("1").setIterators(is));
     cm2.put("tx", "seq", "2");
     cm2.put("data", "x", "b");
-    
+
     Assert.assertEquals(cw.write(cm2).getStatus(), Status.UNKNOWN);
-    
+
     Scanner scanner = conn.createScanner(table, Authorizations.EMPTY);
-    
+
     for (Entry<Key,Value> entry : scanner) {
       String cf = entry.getKey().getColumnFamilyData().toString();
       String cq = entry.getKey().getColumnQualifierData().toString();
       String val = entry.getValue().toString();
-      
+
       if (cf.equals("tx") && cq.equals("seq"))
         Assert.assertEquals("1", val);
       else if (cf.equals("data") && cq.equals("x"))
@@ -1116,42 +1117,42 @@ public class ConditionalWriterTest {
       else
         Assert.fail();
     }
-    
+
     ConditionalMutation cm3 = new ConditionalMutation("r1", new Condition("tx", "seq").setValue("1"));
     cm3.put("tx", "seq", "2");
     cm3.put("data", "x", "b");
-    
+
     Assert.assertEquals(cw.write(cm3).getStatus(), Status.ACCEPTED);
-    
+
     cw.close();
     zki.close();
 
   }
-  
+
   @Test
   public void testDeleteTable() throws Exception {
     String table = "foo12";
-    
+
     ZooKeeperInstance zki = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
     Connector conn = zki.getConnector("root", new PasswordToken(secret));
-    
+
     try {
       conn.createConditionalWriter(table, new ConditionalWriterConfig());
       Assert.assertFalse(true);
     } catch (TableNotFoundException e) {}
-    
+
     conn.tableOperations().create(table);
-    
+
     ConditionalWriter cw = conn.createConditionalWriter(table, new ConditionalWriterConfig());
-    
+
     conn.tableOperations().delete(table);
-    
+
     ConditionalMutation cm1 = new ConditionalMutation("r1", new Condition("tx", "seq"));
     cm1.put("tx", "seq", "1");
     cm1.put("data", "x", "a");
-    
+
     Result result = cw.write(cm1);
-    
+
     try {
       result.getStatus();
       Assert.assertFalse(true);
@@ -1161,73 +1162,73 @@ public class ConditionalWriterTest {
     zki.close();
 
   }
-  
+
   @Test
   public void testOffline() throws Exception {
     String table = "foo11";
-    
+
     ZooKeeperInstance zki = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
     Connector conn = zki.getConnector("root", new PasswordToken(secret));
-    
+
     conn.tableOperations().create(table);
-    
+
     ConditionalWriter cw = conn.createConditionalWriter(table, new ConditionalWriterConfig());
-    
+
     conn.tableOperations().offline(table, true);
-    
+
     ConditionalMutation cm1 = new ConditionalMutation("r1", new Condition("tx", "seq"));
     cm1.put("tx", "seq", "1");
     cm1.put("data", "x", "a");
-    
+
     Result result = cw.write(cm1);
-    
+
     try {
       result.getStatus();
       Assert.assertFalse(true);
     } catch (AccumuloException ae) {
       Assert.assertEquals(TableOfflineException.class, ae.getCause().getClass());
     }
-    
+
     cw.close();
-    
+
     try {
       conn.createConditionalWriter(table, new ConditionalWriterConfig());
       Assert.assertFalse(true);
     } catch (TableOfflineException e) {}
     zki.close();
   }
-  
+
   @Test
   public void testError() throws Exception {
     String table = "foo10";
-    
+
     ZooKeeperInstance zki = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
     Connector conn = zki.getConnector("root", new PasswordToken(secret));
-    
+
     conn.tableOperations().create(table);
-    
+
     ConditionalWriter cw = conn.createConditionalWriter(table, new ConditionalWriterConfig());
-    
+
     IteratorSetting iterSetting = new IteratorSetting(5, BadIterator.class);
-    
+
     ConditionalMutation cm1 = new ConditionalMutation("r1", new Condition("tx", "seq").setIterators(iterSetting));
     cm1.put("tx", "seq", "1");
     cm1.put("data", "x", "a");
-    
+
     Result result = cw.write(cm1);
-    
+
     try {
       result.getStatus();
       Assert.assertFalse(true);
     } catch (AccumuloException ae) {
-      
+
     }
-    
+
     cw.close();
     zki.close();
 
   }
-  
+
   @AfterClass
   public static void tearDownAfterClass() throws Exception {
     cluster.stop();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/aa711023/test/src/test/java/org/apache/accumulo/test/DumpConfigIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/DumpConfigIT.java b/test/src/test/java/org/apache/accumulo/test/DumpConfigIT.java
index fe0a7ed..c653751 100644
--- a/test/src/test/java/org/apache/accumulo/test/DumpConfigIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/DumpConfigIT.java
@@ -16,37 +16,45 @@
  */
 package org.apache.accumulo.test;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
 
 import java.io.File;
 import java.io.FileInputStream;
 import java.util.Collections;
 
 import org.apache.accumulo.core.conf.Property;
+import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.minicluster.MiniAccumuloConfig;
 import org.apache.accumulo.server.util.Admin;
 import org.apache.accumulo.test.functional.ConfigurableMacIT;
 import org.apache.accumulo.test.functional.FunctionalTestUtils;
+import org.junit.Rule;
 import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
 
 public class DumpConfigIT extends ConfigurableMacIT {
 
+  @Rule
+  public TemporaryFolder folder = new TemporaryFolder(new File(System.getProperty("user.dir") + "/target"));
+
   @Override
   public void configure(MiniAccumuloConfig cfg) {
     cfg.setSiteConfig(Collections.singletonMap(Property.TABLE_FILE_BLOCK_SIZE.getKey(), "1234567"));
   }
-  
-  @Test(timeout=2 * 60 * 1000)
+
+  @Test(timeout = 2 * 60 * 1000)
   public void test() throws Exception {
-    File siteFile = new File("target/accumulo-site.xml.bak");
-    siteFile.delete();
-    assertEquals(0, exec(Admin.class, new String[]{"dumpConfig", "-a", "-d", "target"}).waitFor());
-    assertTrue(siteFile.exists());
-    String site = FunctionalTestUtils.readAll(new FileInputStream("target/accumulo-site.xml.bak"));
+    File siteFileBackup = new File(folder.getRoot(), "accumulo-site.xml.bak");
+    assertFalse(siteFileBackup.exists());
+    assertEquals(0, exec(Admin.class, new String[] {"dumpConfig", "-a", "-d", folder.getRoot().getPath()}).waitFor());
+    assertTrue(siteFileBackup.exists());
+    String site = FunctionalTestUtils.readAll(new FileInputStream(siteFileBackup));
     assertTrue(site.contains(Property.TABLE_FILE_BLOCK_SIZE.getKey()));
     assertTrue(site.contains("1234567"));
-    String meta = FunctionalTestUtils.readAll(new FileInputStream("target/!METADATA.cfg"));
+    String meta = FunctionalTestUtils.readAll(new FileInputStream(new File(folder.getRoot(), MetadataTable.NAME + ".cfg")));
     assertTrue(meta.contains(Property.TABLE_FILE_REPLICATION.getKey()));
   }
-  
+
 }


Mime
View raw message