accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [05/66] [abbrv] accumulo git commit: ACCUMULO-3451 Format master branch (1.7.0-SNAPSHOT)
Date Fri, 09 Jan 2015 02:44:09 GMT
http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StartAll.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StartAll.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StartAll.java
index d164695..8504fd1 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StartAll.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StartAll.java
@@ -33,7 +33,7 @@ import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
 public class StartAll extends Test {
-  
+
   @Override
   public void visit(State state, Environment env, Properties props) throws Exception {
     log.info("Starting all servers");
@@ -52,5 +52,5 @@ public class StartAll extends Test {
       }
     }
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StopTabletServer.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StopTabletServer.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StopTabletServer.java
index c16160e..995a72e 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StopTabletServer.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StopTabletServer.java
@@ -38,7 +38,7 @@ import org.apache.zookeeper.KeeperException;
 import org.apache.zookeeper.data.Stat;
 
 public class StopTabletServer extends Test {
-  
+
   Set<TServerInstance> getTServers(Instance instance) throws KeeperException, InterruptedException {
     Set<TServerInstance> result = new HashSet<TServerInstance>();
     ZooReader rdr = new ZooReader(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut());
@@ -60,12 +60,12 @@ public class StopTabletServer extends Test {
     }
     return result;
   }
-  
+
   @Override
   public void visit(State state, Environment env, Properties props) throws Exception {
-    
+
     Instance instance = env.getInstance();
-    
+
     List<TServerInstance> currentServers = new ArrayList<TServerInstance>(getTServers(instance));
     Collections.shuffle(currentServers);
     Runtime runtime = Runtime.getRuntime();
@@ -80,5 +80,5 @@ public class StopTabletServer extends Test {
         throw new RuntimeException("Failed to stop " + victim);
     }
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Compact.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Compact.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Compact.java
index df9803f..1b0e03b 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Compact.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Compact.java
@@ -26,7 +26,7 @@ import org.apache.accumulo.test.randomwalk.Test;
 import org.apache.hadoop.io.Text;
 
 /**
- * 
+ *
  */
 public class Compact extends Test {
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Flush.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Flush.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Flush.java
index 37c8c91..cb5c5f1 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Flush.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Flush.java
@@ -26,7 +26,7 @@ import org.apache.accumulo.test.randomwalk.Test;
 import org.apache.hadoop.io.Text;
 
 /**
- * 
+ *
  */
 public class Flush extends Test {
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Init.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Init.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Init.java
index fe47813..ebe12ef 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Init.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Init.java
@@ -32,7 +32,7 @@ import org.apache.accumulo.test.randomwalk.Test;
 import org.apache.hadoop.io.Text;
 
 /**
- * 
+ *
  */
 public class Init extends Test {
 
@@ -68,21 +68,21 @@ public class Init extends Test {
 
         if (j % 1000 == 0 && j > 0) {
           Status status = cw.write(m).getStatus();
-          
-          while(status == Status.UNKNOWN)
+
+          while (status == Status.UNKNOWN)
             status = cw.write(m).getStatus();
-          
+
           if (status == Status.ACCEPTED)
             acceptedCount++;
           m = new ConditionalMutation(Utils.getBank(i));
         }
 
       }
-      if (m.getConditions().size() > 0){
+      if (m.getConditions().size() > 0) {
         Status status = cw.write(m).getStatus();
-        while(status == Status.UNKNOWN)
+        while (status == Status.UNKNOWN)
           status = cw.write(m).getStatus();
-        
+
         if (status == Status.ACCEPTED)
           acceptedCount++;
       }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Merge.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Merge.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Merge.java
index a6318d5..2124518 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Merge.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Merge.java
@@ -26,7 +26,7 @@ import org.apache.accumulo.test.randomwalk.Test;
 import org.apache.hadoop.io.Text;
 
 /**
- * 
+ *
  */
 public class Merge extends Test {
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Setup.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Setup.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Setup.java
index 90c2978..c22d5b8 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Setup.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Setup.java
@@ -33,7 +33,7 @@ public class Setup extends Test {
   public void visit(State state, Environment env, Properties props) throws Exception {
     Random rand = new Random();
     state.set("rand", rand);
-    
+
     int numBanks = Integer.parseInt(props.getProperty("numBanks", "1000"));
     log.debug("numBanks = " + numBanks);
     state.set("numBanks", numBanks);
@@ -53,9 +53,7 @@ public class Setup extends Test {
       log.debug("set " + Property.TABLE_BLOCKCACHE_ENABLED.getKey() + " " + blockCache);
     } catch (TableExistsException tee) {}
 
-
-    ConditionalWriter cw = env.getConnector()
-        .createConditionalWriter(tableName, new ConditionalWriterConfig().setMaxWriteThreads(1));
+    ConditionalWriter cw = env.getConnector().createConditionalWriter(tableName, new ConditionalWriterConfig().setMaxWriteThreads(1));
     state.set("cw", cw);
 
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Split.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Split.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Split.java
index c6665b9..a1ca830 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Split.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Split.java
@@ -28,7 +28,7 @@ import org.apache.accumulo.test.randomwalk.Test;
 import org.apache.hadoop.io.Text;
 
 /**
- * 
+ *
  */
 public class Split extends Test {
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/TearDown.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/TearDown.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/TearDown.java
index 3f326c0..0c59eae 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/TearDown.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/TearDown.java
@@ -24,7 +24,7 @@ import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
 /**
- * 
+ *
  */
 public class TearDown extends Test {
   @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Transfer.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Transfer.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Transfer.java
index f9bfaaa..ec4edaf 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Transfer.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Transfer.java
@@ -38,7 +38,7 @@ import org.apache.commons.math.distribution.ZipfDistributionImpl;
 import org.apache.hadoop.io.Text;
 
 /**
- * 
+ *
  */
 public class Transfer extends Test {
 
@@ -108,7 +108,6 @@ public class Transfer extends Test {
         throw new Exception("Unexpected column qual: " + cq);
     }
 
-
     int amt = rand.nextInt(50);
 
     log.debug("transfer req " + bank + " " + amt + " " + acct1 + " " + a1 + " " + acct2 + " " + a2);
@@ -123,14 +122,13 @@ public class Transfer extends Test {
 
       ConditionalWriter cw = (ConditionalWriter) state.get("cw");
       Status status = cw.write(cm).getStatus();
-      while(status == Status.UNKNOWN){
-        log.debug("retrying transfer "+status);
+      while (status == Status.UNKNOWN) {
+        log.debug("retrying transfer " + status);
         status = cw.write(cm).getStatus();
       }
       log.debug("transfer result " + bank + " " + status + " " + a1 + " " + a2);
     }
 
-
   }
 
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Utils.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Utils.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Utils.java
index 043ea71..1c83686 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Utils.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Utils.java
@@ -16,9 +16,8 @@
  */
 package org.apache.accumulo.test.randomwalk.conditional;
 
-
 /**
- * 
+ *
  */
 public class Utils {
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Verify.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Verify.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Verify.java
index 8acc3ed..2690ffc 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Verify.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/conditional/Verify.java
@@ -34,7 +34,7 @@ import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
 /**
- * 
+ *
  */
 public class Verify extends Test {
 
@@ -80,7 +80,6 @@ public class Verify extends Test {
       throw new Exception("Sum is off " + sum);
     }
 
-
     log.debug("Verified " + row + " count = " + count + " sum = " + sum + " min = " + min + " max = " + max);
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/image/Commit.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/image/Commit.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/image/Commit.java
index 26b69cd..4468591 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/image/Commit.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/image/Commit.java
@@ -23,13 +23,13 @@ import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
 public class Commit extends Test {
-  
+
   @Override
   public void visit(State state, Environment env, Properties props) throws Exception {
     env.getMultiTableBatchWriter().flush();
-    
+
     log.debug("Committed " + state.getLong("numWrites") + " writes.  Total writes: " + state.getLong("totalWrites"));
     state.set("numWrites", Long.valueOf(0));
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/image/ImageFixture.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/image/ImageFixture.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/image/ImageFixture.java
index bcf7cad..3bcc41c 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/image/ImageFixture.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/image/ImageFixture.java
@@ -31,36 +31,36 @@ import org.apache.accumulo.core.client.MultiTableBatchWriter;
 import org.apache.accumulo.core.client.MutationsRejectedException;
 import org.apache.accumulo.core.client.TableExistsException;
 import org.apache.accumulo.core.client.impl.Tables;
-import org.apache.accumulo.test.randomwalk.Fixture;
 import org.apache.accumulo.test.randomwalk.Environment;
+import org.apache.accumulo.test.randomwalk.Fixture;
 import org.apache.accumulo.test.randomwalk.State;
 import org.apache.hadoop.io.Text;
 
 public class ImageFixture extends Fixture {
-  
+
   String imageTableName;
   String indexTableName;
-  
+
   @Override
   public void setUp(State state, Environment env) throws Exception {
-    
+
     Connector conn = env.getConnector();
     Instance instance = env.getInstance();
-    
+
     SortedSet<Text> splits = new TreeSet<Text>();
     for (int i = 1; i < 256; i++) {
       splits.add(new Text(String.format("%04x", i << 8)));
     }
-    
+
     String hostname = InetAddress.getLocalHost().getHostName().replaceAll("[-.]", "_");
     String pid = env.getPid();
-    
+
     imageTableName = String.format("img_%s_%s_%d", hostname, pid, System.currentTimeMillis());
     state.set("imageTableName", imageTableName);
-    
+
     indexTableName = String.format("img_ndx_%s_%s_%d", hostname, pid, System.currentTimeMillis());
     state.set("indexTableName", indexTableName);
-    
+
     try {
       conn.tableOperations().create(imageTableName);
       conn.tableOperations().addSplits(imageTableName, splits);
@@ -69,7 +69,7 @@ public class ImageFixture extends Fixture {
       log.error("Table " + imageTableName + " already exists.");
       throw e;
     }
-    
+
     try {
       conn.tableOperations().create(indexTableName);
       log.debug("Created table " + indexTableName + " (id:" + Tables.getNameToIdMap(instance).get(indexTableName) + ")");
@@ -77,35 +77,35 @@ public class ImageFixture extends Fixture {
       log.error("Table " + imageTableName + " already exists.");
       throw e;
     }
-    
+
     Random rand = new Random();
     if (rand.nextInt(10) < 5) {
       // setup locality groups
       Map<String,Set<Text>> groups = getLocalityGroups();
-      
+
       conn.tableOperations().setLocalityGroups(imageTableName, groups);
       log.debug("Configured locality groups for " + imageTableName + " groups = " + groups);
     }
-    
+
     state.set("numWrites", Long.valueOf(0));
     state.set("totalWrites", Long.valueOf(0));
     state.set("verified", Integer.valueOf(0));
     state.set("lastIndexRow", new Text(""));
   }
-  
+
   static Map<String,Set<Text>> getLocalityGroups() {
     Map<String,Set<Text>> groups = new HashMap<String,Set<Text>>();
-    
+
     HashSet<Text> lg1 = new HashSet<Text>();
     lg1.add(Write.CONTENT_COLUMN_FAMILY);
     groups.put("lg1", lg1);
-    
+
     HashSet<Text> lg2 = new HashSet<Text>();
     lg2.add(Write.META_COLUMN_FAMILY);
     groups.put("lg2", lg2);
     return groups;
   }
-  
+
   @Override
   public void tearDown(State state, Environment env) throws Exception {
     // We have resources we need to clean up
@@ -116,19 +116,19 @@ public class ImageFixture extends Fixture {
       } catch (MutationsRejectedException e) {
         log.error("Ignoring mutations that weren't flushed", e);
       }
-      
+
       // Reset the MTBW on the state to null
       env.resetMultiTableBatchWriter();
     }
-    
+
     // Now we can safely delete the tables
     log.debug("Dropping tables: " + imageTableName + " " + indexTableName);
-    
+
     Connector conn = env.getConnector();
-    
+
     conn.tableOperations().delete(imageTableName);
     conn.tableOperations().delete(indexTableName);
-    
+
     log.debug("Final total of writes: " + state.getLong("totalWrites"));
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/image/ScanMeta.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/image/ScanMeta.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/image/ScanMeta.java
index 8a2ca3d..4b801c2 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/image/ScanMeta.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/image/ScanMeta.java
@@ -16,13 +16,13 @@
  */
 package org.apache.accumulo.test.randomwalk.image;
 
+import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
-import java.util.Random;
 import java.util.Map.Entry;
-import java.util.ArrayList;
 import java.util.Properties;
+import java.util.Random;
 import java.util.UUID;
 
 import org.apache.accumulo.core.client.BatchScanner;
@@ -38,74 +38,74 @@ import org.apache.accumulo.test.randomwalk.Test;
 import org.apache.hadoop.io.Text;
 
 public class ScanMeta extends Test {
-  
+
   @Override
   public void visit(State state, Environment env, Properties props) throws Exception {
-    
+
     // scan just the metadata of the images table to find N hashes... use the batch scanner to lookup those N hashes in the index table
     // this scan will test locality groups....
-    
+
     String indexTableName = state.getString("indexTableName");
     String imageTableName = state.getString("imageTableName");
-    
+
     String uuid = UUID.randomUUID().toString();
-    
+
     Connector conn = env.getConnector();
-    
+
     Scanner imageScanner = conn.createScanner(imageTableName, new Authorizations());
-    
+
     imageScanner.setRange(new Range(new Text(uuid), null));
     imageScanner.fetchColumn(Write.META_COLUMN_FAMILY, Write.SHA1_COLUMN_QUALIFIER);
-    
+
     int minScan = Integer.parseInt(props.getProperty("minScan"));
     int maxScan = Integer.parseInt(props.getProperty("maxScan"));
-    
+
     Random rand = new Random();
     int numToScan = rand.nextInt(maxScan - minScan) + minScan;
-    
+
     Map<Text,Text> hashes = new HashMap<Text,Text>();
-    
+
     Iterator<Entry<Key,Value>> iter = imageScanner.iterator();
-    
+
     while (iter.hasNext() && numToScan > 0) {
-      
+
       Entry<Key,Value> entry = iter.next();
-      
+
       hashes.put(new Text(entry.getValue().get()), entry.getKey().getRow());
-      
+
       numToScan--;
     }
-    
+
     log.debug("Found " + hashes.size() + " hashes starting at " + uuid);
 
     if (hashes.isEmpty()) {
       return;
     }
-    
+
     // use batch scanner to verify all of these exist in index
     BatchScanner indexScanner = conn.createBatchScanner(indexTableName, Authorizations.EMPTY, 3);
     ArrayList<Range> ranges = new ArrayList<Range>();
     for (Text row : hashes.keySet()) {
       ranges.add(new Range(row));
     }
-    
+
     indexScanner.setRanges(ranges);
-    
+
     Map<Text,Text> hashes2 = new HashMap<Text,Text>();
-    
+
     for (Entry<Key,Value> entry : indexScanner)
       hashes2.put(entry.getKey().getRow(), new Text(entry.getValue().get()));
-    
+
     log.debug("Looked up " + ranges.size() + " ranges, found " + hashes2.size());
-    
+
     if (!hashes.equals(hashes2)) {
       log.error("uuids from doc table : " + hashes.values());
       log.error("uuids from index     : " + hashes2.values());
       throw new Exception("Mismatch between document table and index " + indexTableName + " " + imageTableName);
     }
-    
+
     indexScanner.close();
-    
+
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/image/TableOp.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/image/TableOp.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/image/TableOp.java
index bf3ff17..b62ec34 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/image/TableOp.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/image/TableOp.java
@@ -30,10 +30,10 @@ import org.apache.accumulo.test.randomwalk.Test;
 import org.apache.hadoop.io.Text;
 
 public class TableOp extends Test {
-  
+
   @Override
   public void visit(State state, Environment env, Properties props) throws Exception {
-    
+
     // choose a table
     Random rand = new Random();
     String tableName;
@@ -42,7 +42,7 @@ public class TableOp extends Test {
     } else {
       tableName = state.getString("indexTableName");
     }
-    
+
     // check if chosen table exists
     Connector conn = env.getConnector();
     TableOperations tableOps = conn.tableOperations();
@@ -50,7 +50,7 @@ public class TableOp extends Test {
       log.error("Table " + tableName + " does not exist!");
       return;
     }
-    
+
     // choose a random action
     int num = rand.nextInt(10);
     if (num > 6) {
@@ -63,10 +63,10 @@ public class TableOp extends Test {
       log.debug("Clearing locator cache for " + tableName);
       tableOps.clearLocatorCache(tableName);
     }
-    
+
     if (rand.nextInt(10) < 3) {
       Map<String,Set<Text>> groups = tableOps.getLocalityGroups(state.getString("imageTableName"));
-      
+
       if (groups.size() == 0) {
         log.debug("Adding locality groups to " + state.getString("imageTableName"));
         groups = ImageFixture.getLocalityGroups();
@@ -74,7 +74,7 @@ public class TableOp extends Test {
         log.debug("Removing locality groups from " + state.getString("imageTableName"));
         groups = new HashMap<String,Set<Text>>();
       }
-      
+
       tableOps.setLocalityGroups(state.getString("imageTableName"), groups);
     }
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/image/Verify.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/image/Verify.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/image/Verify.java
index 6ca524a..cfac23f 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/image/Verify.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/image/Verify.java
@@ -37,91 +37,91 @@ import org.apache.accumulo.test.randomwalk.Test;
 import org.apache.hadoop.io.Text;
 
 public class Verify extends Test {
-  
+
   String indexTableName;
   String imageTableName;
-  
+
   @Override
   public void visit(State state, Environment env, Properties props) throws Exception {
-    
+
     Random rand = new Random();
-    
+
     int maxVerify = Integer.parseInt(props.getProperty("maxVerify"));
     int numVerifications = rand.nextInt(maxVerify - 1) + 1;
-    
+
     indexTableName = state.getString("indexTableName");
     imageTableName = state.getString("imageTableName");
-    
+
     Connector conn = env.getConnector();
-    
+
     Scanner indexScanner = conn.createScanner(indexTableName, new Authorizations());
     Scanner imageScanner = conn.createScanner(imageTableName, new Authorizations());
-    
+
     String uuid = UUID.randomUUID().toString();
-    
+
     MessageDigest alg = MessageDigest.getInstance("SHA-1");
     alg.update(uuid.getBytes(UTF_8));
-    
+
     indexScanner.setRange(new Range(new Text(alg.digest()), null));
     indexScanner.setBatchSize(numVerifications);
-    
+
     Text curRow = null;
     int count = 0;
     for (Entry<Key,Value> entry : indexScanner) {
-      
+
       curRow = entry.getKey().getRow();
       String rowToVerify = entry.getValue().toString();
-      
+
       verifyRow(imageScanner, rowToVerify);
-      
+
       count++;
       if (count == numVerifications) {
         break;
       }
     }
-    
+
     if (count != numVerifications && curRow != null) {
       Text lastRow = (Text) state.get("lastIndexRow");
       if (lastRow.compareTo(curRow) != 0) {
         log.error("Verified only " + count + " of " + numVerifications + " - curRow " + curRow + " lastKey " + lastRow);
       }
     }
-    
+
     int verified = ((Integer) state.get("verified")).intValue() + numVerifications;
     log.debug("Verified " + numVerifications + " - Total " + verified);
     state.set("verified", Integer.valueOf(verified));
   }
-  
+
   public void verifyRow(Scanner scanner, String row) throws Exception {
-    
+
     scanner.setRange(new Range(new Text(row)));
     scanner.clearColumns();
     scanner.fetchColumnFamily(Write.CONTENT_COLUMN_FAMILY);
     scanner.fetchColumn(Write.META_COLUMN_FAMILY, Write.SHA1_COLUMN_QUALIFIER);
-    
+
     Iterator<Entry<Key,Value>> scanIter = scanner.iterator();
-    
+
     if (scanIter.hasNext() == false) {
       log.error("Found row(" + row + ") in " + indexTableName + " but not " + imageTableName);
       return;
     }
-    
+
     // get image
     Entry<Key,Value> entry = scanIter.next();
     byte[] imageBytes = entry.getValue().get();
-    
+
     MessageDigest alg = MessageDigest.getInstance("SHA-1");
     alg.update(imageBytes);
     byte[] localHash = alg.digest();
-    
+
     // get stored hash
     entry = scanIter.next();
     byte[] storedHash = entry.getValue().get();
-    
+
     if (localHash.length != storedHash.length) {
       throw new Exception("Hash lens do not match for " + row);
     }
-    
+
     for (int i = 0; i < localHash.length; i++) {
       if (localHash[i] != storedHash[i]) {
         throw new Exception("Hashes do not match for " + row);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/image/Write.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/image/Write.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/image/Write.java
index d239495..fc5d73e 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/image/Write.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/image/Write.java
@@ -33,62 +33,62 @@ import org.apache.accumulo.test.randomwalk.Test;
 import org.apache.hadoop.io.Text;
 
 public class Write extends Test {
-  
+
   static final Text UUID_COLUMN_QUALIFIER = new Text("uuid");
   static final Text COUNT_COLUMN_QUALIFIER = new Text("count");
   static final Text SHA1_COLUMN_QUALIFIER = new Text("sha1");
   static final Text IMAGE_COLUMN_QUALIFIER = new Text("image");
   static final Text META_COLUMN_FAMILY = new Text("meta");
   static final Text CONTENT_COLUMN_FAMILY = new Text("content");
-  
+
   @Override
   public void visit(State state, Environment env, Properties props) throws Exception {
-    
+
     MultiTableBatchWriter mtbw = env.getMultiTableBatchWriter();
-    
+
     BatchWriter imagesBW = mtbw.getBatchWriter(state.getString("imageTableName"));
     BatchWriter indexBW = mtbw.getBatchWriter(state.getString("indexTableName"));
-    
+
     String uuid = UUID.randomUUID().toString();
     Mutation m = new Mutation(new Text(uuid));
-    
+
     // create a fake image between 4KB and 1MB
     int maxSize = Integer.parseInt(props.getProperty("maxSize"));
     int minSize = Integer.parseInt(props.getProperty("minSize"));
-    
+
     Random rand = new Random();
     int numBytes = rand.nextInt(maxSize - minSize) + minSize;
     byte[] imageBytes = new byte[numBytes];
     rand.nextBytes(imageBytes);
     m.put(CONTENT_COLUMN_FAMILY, IMAGE_COLUMN_QUALIFIER, new Value(imageBytes));
-    
+
     // store size
     m.put(META_COLUMN_FAMILY, new Text("size"), new Value(String.format("%d", numBytes).getBytes(UTF_8)));
-    
+
     // store hash
     MessageDigest alg = MessageDigest.getInstance("SHA-1");
     alg.update(imageBytes);
     byte[] hash = alg.digest();
     m.put(META_COLUMN_FAMILY, SHA1_COLUMN_QUALIFIER, new Value(hash));
-    
+
     // update write counts
     state.set("numWrites", state.getLong("numWrites") + 1);
     Long totalWrites = state.getLong("totalWrites") + 1;
     state.set("totalWrites", totalWrites);
-    
+
     // set count
     m.put(META_COLUMN_FAMILY, COUNT_COLUMN_QUALIFIER, new Value(String.format("%d", totalWrites).getBytes(UTF_8)));
-    
+
     // add mutation
     imagesBW.addMutation(m);
-    
+
     // now add mutation to index
     Text row = new Text(hash);
     m = new Mutation(row);
     m.put(META_COLUMN_FAMILY, UUID_COLUMN_QUALIFIER, new Value(uuid.getBytes(UTF_8)));
-    
+
     indexBW.addMutation(m);
-    
+
     Text lastRow = (Text) state.get("lastIndexRow");
     if (lastRow.compareTo(row) < 0) {
       state.set("lastIndexRow", new Text(row));

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/Commit.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/Commit.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/Commit.java
index 106de52..a81e396 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/Commit.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/Commit.java
@@ -23,18 +23,18 @@ import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
 public class Commit extends Test {
-  
+
   @Override
   public void visit(State state, Environment env, Properties props) throws Exception {
     env.getMultiTableBatchWriter().flush();
-    
+
     Long numWrites = state.getLong("numWrites");
     Long totalWrites = state.getLong("totalWrites") + numWrites;
-    
+
     log.debug("Committed " + numWrites + " writes.  Total writes: " + totalWrites);
-    
+
     state.set("totalWrites", totalWrites);
     state.set("numWrites", Long.valueOf(0));
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/CopyTool.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/CopyTool.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/CopyTool.java
index d92dea2..d39f8df 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/CopyTool.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/CopyTool.java
@@ -35,7 +35,7 @@ import org.apache.log4j.Logger;
 
 public class CopyTool extends Configured implements Tool {
   protected final Logger log = Logger.getLogger(this.getClass());
-  
+
   public static class SeqMapClass extends Mapper<Key,Value,Text,Mutation> {
     @Override
     public void map(Key key, Value val, Context output) throws IOException, InterruptedException {
@@ -44,18 +44,18 @@ public class CopyTool extends Configured implements Tool {
       output.write(null, m);
     }
   }
-  
+
   @Override
   public int run(String[] args) throws Exception {
     @SuppressWarnings("deprecation")
     Job job = new Job(getConf(), this.getClass().getSimpleName());
     job.setJarByClass(this.getClass());
-    
+
     if (job.getJar() == null) {
       log.error("M/R requires a jar file!  Run mvn package.");
       return 1;
     }
-    
+
     ClientConfiguration clientConf = new ClientConfiguration().withInstance(args[3]).withZkHosts(args[4]);
 
     job.setInputFormatClass(AccumuloInputFormat.class);
@@ -63,19 +63,19 @@ public class CopyTool extends Configured implements Tool {
     AccumuloInputFormat.setInputTableName(job, args[2]);
     AccumuloInputFormat.setScanAuthorizations(job, Authorizations.EMPTY);
     AccumuloInputFormat.setZooKeeperInstance(job, clientConf);
-    
+
     job.setMapperClass(SeqMapClass.class);
     job.setMapOutputKeyClass(Text.class);
     job.setMapOutputValueClass(Mutation.class);
-    
+
     job.setNumReduceTasks(0);
-    
+
     job.setOutputFormatClass(AccumuloOutputFormat.class);
     AccumuloOutputFormat.setConnectorInfo(job, args[0], new PasswordToken(args[1]));
     AccumuloOutputFormat.setCreateTables(job, true);
     AccumuloOutputFormat.setDefaultTableName(job, args[5]);
     AccumuloOutputFormat.setZooKeeperInstance(job, clientConf);
-    
+
     job.waitForCompletion(true);
     return job.isSuccessful() ? 0 : 1;
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/DropTable.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/DropTable.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/DropTable.java
index 9a670dc..2bbd873 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/DropTable.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/DropTable.java
@@ -26,21 +26,21 @@ import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
 public class DropTable extends Test {
-  
+
   @Override
   public void visit(State state, Environment env, Properties props) throws Exception {
-    
+
     @SuppressWarnings("unchecked")
     ArrayList<String> tables = (ArrayList<String>) state.get("tableList");
-    
+
     // don't drop a table if we only have one table or less
     if (tables.size() <= 1) {
       return;
     }
-    
+
     Random rand = new Random();
     String tableName = tables.remove(rand.nextInt(tables.size()));
-    
+
     try {
       env.getConnector().tableOperations().delete(tableName);
       log.debug("Dropped " + tableName);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/MultiTableFixture.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/MultiTableFixture.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/MultiTableFixture.java
index 536de08..4d46295 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/MultiTableFixture.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/MultiTableFixture.java
@@ -23,24 +23,24 @@ import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.MultiTableBatchWriter;
 import org.apache.accumulo.core.client.MutationsRejectedException;
 import org.apache.accumulo.core.client.TableNotFoundException;
-import org.apache.accumulo.test.randomwalk.Fixture;
 import org.apache.accumulo.test.randomwalk.Environment;
+import org.apache.accumulo.test.randomwalk.Fixture;
 import org.apache.accumulo.test.randomwalk.State;
 
 public class MultiTableFixture extends Fixture {
-  
+
   @Override
   public void setUp(State state, Environment env) throws Exception {
-    
+
     String hostname = InetAddress.getLocalHost().getHostName().replaceAll("[-.]", "_");
-    
+
     state.set("tableNamePrefix", String.format("multi_%s_%s_%d", hostname, env.getPid(), System.currentTimeMillis()));
     state.set("nextId", Integer.valueOf(0));
     state.set("numWrites", Long.valueOf(0));
     state.set("totalWrites", Long.valueOf(0));
     state.set("tableList", new ArrayList<String>());
   }
-  
+
   @Override
   public void tearDown(State state, Environment env) throws Exception {
     // We have resources we need to clean up
@@ -51,16 +51,16 @@ public class MultiTableFixture extends Fixture {
       } catch (MutationsRejectedException e) {
         log.error("Ignoring mutations that weren't flushed", e);
       }
-      
+
       // Reset the MTBW on the state to null
       env.resetMultiTableBatchWriter();
     }
-    
+
     Connector conn = env.getConnector();
-    
+
     @SuppressWarnings("unchecked")
     ArrayList<String> tables = (ArrayList<String>) state.get("tableList");
-    
+
     for (String tableName : tables) {
       try {
         conn.tableOperations().delete(tableName);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/OfflineTable.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/OfflineTable.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/OfflineTable.java
index bc54ada..90c555b 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/OfflineTable.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/OfflineTable.java
@@ -25,20 +25,20 @@ import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
 public class OfflineTable extends Test {
-  
+
   @Override
   public void visit(State state, Environment env, Properties props) throws Exception {
-    
+
     @SuppressWarnings("unchecked")
     ArrayList<String> tables = (ArrayList<String>) state.get("tableList");
-    
+
     if (tables.size() <= 0) {
       return;
     }
-    
+
     Random rand = new Random();
     String tableName = tables.get(rand.nextInt(tables.size()));
-    
+
     env.getConnector().tableOperations().offline(tableName, rand.nextBoolean());
     log.debug("Table " + tableName + " offline ");
     env.getConnector().tableOperations().online(tableName, rand.nextBoolean());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/Write.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/Write.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/Write.java
index c3c91c0..494b794 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/Write.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/multitable/Write.java
@@ -35,10 +35,10 @@ import org.apache.accumulo.test.randomwalk.Test;
 import org.apache.hadoop.io.Text;
 
 public class Write extends Test {
-  
+
   @Override
   public void visit(State state, Environment env, Properties props) throws Exception {
-    
+
     @SuppressWarnings("unchecked")
     ArrayList<String> tables = (ArrayList<String>) state.get("tableList");
 
@@ -46,10 +46,10 @@ public class Write extends Test {
       log.debug("No tables to ingest into");
       return;
     }
-    
+
     Random rand = new Random();
     String tableName = tables.get(rand.nextInt(tables.size()));
-    
+
     BatchWriter bw = null;
     try {
       bw = env.getMultiTableBatchWriter().getBatchWriter(tableName);
@@ -60,30 +60,30 @@ public class Write extends Test {
       log.error("Table " + tableName + " not found!");
       return;
     }
-    
+
     Text meta = new Text("meta");
     String uuid = UUID.randomUUID().toString();
-    
+
     Mutation m = new Mutation(new Text(uuid));
-    
+
     // create a fake payload between 4KB and 16KB
     int numBytes = rand.nextInt(12000) + 4000;
     byte[] payloadBytes = new byte[numBytes];
     rand.nextBytes(payloadBytes);
     m.put(meta, new Text("payload"), new Value(payloadBytes));
-    
+
     // store size
     m.put(meta, new Text("size"), new Value(String.format("%d", numBytes).getBytes(UTF_8)));
-    
+
     // store hash
     MessageDigest alg = MessageDigest.getInstance("SHA-1");
     alg.update(payloadBytes);
     m.put(meta, new Text("sha1"), new Value(alg.digest()));
-    
+
     // add mutation
     bw.addMutation(m);
-    
+
     state.set("numWrites", state.getLong("numWrites") + 1);
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterSystemPerm.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterSystemPerm.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterSystemPerm.java
index 663f2c2..ba4d2e9 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterSystemPerm.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterSystemPerm.java
@@ -28,17 +28,17 @@ import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
 public class AlterSystemPerm extends Test {
-  
+
   @Override
   public void visit(State state, Environment env, Properties props) throws Exception {
     Connector conn = env.getConnector();
-    WalkingSecurity ws = new WalkingSecurity(state,env);
-    
+    WalkingSecurity ws = new WalkingSecurity(state, env);
+
     String action = props.getProperty("task", "toggle");
     String perm = props.getProperty("perm", "random");
-    
-    String targetUser = WalkingSecurity.get(state,env).getSysUserName();
-    
+
+    String targetUser = WalkingSecurity.get(state, env).getSysUserName();
+
     SystemPermission sysPerm;
     if (perm.equals("random")) {
       Random r = new Random();
@@ -46,9 +46,9 @@ public class AlterSystemPerm extends Test {
       sysPerm = SystemPermission.values()[i];
     } else
       sysPerm = SystemPermission.valueOf(perm);
-    
+
     boolean hasPerm = ws.hasSystemPermission(targetUser, sysPerm);
-    
+
     // toggle
     if (!"take".equals(action) && !"give".equals(action)) {
       if (hasPerm != conn.securityOperations().hasSystemPermission(targetUser, sysPerm))
@@ -58,7 +58,7 @@ public class AlterSystemPerm extends Test {
       else
         action = "give";
     }
-    
+
     if ("take".equals(action)) {
       try {
         conn.securityOperations().revokeSystemPermission(targetUser, sysPerm);
@@ -96,5 +96,5 @@ public class AlterSystemPerm extends Test {
       ws.grantSystemPermission(targetUser, sysPerm);
     }
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTable.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTable.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTable.java
index 4f9a8b9..70c98e4 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTable.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTable.java
@@ -30,22 +30,22 @@ import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
 public class AlterTable extends Test {
-  
+
   @Override
   public void visit(State state, Environment env, Properties props) throws Exception {
-    Connector conn = env.getInstance().getConnector(WalkingSecurity.get(state,env).getSysUserName(), WalkingSecurity.get(state,env).getSysToken());
-    
-    String tableName = WalkingSecurity.get(state,env).getTableName();
-    String namespaceName = WalkingSecurity.get(state,env).getNamespaceName();
-    
-    boolean exists = WalkingSecurity.get(state,env).getTableExists();
-    boolean hasPermission = WalkingSecurity.get(state,env).canAlterTable(WalkingSecurity.get(state,env).getSysCredentials(), tableName, namespaceName);
+    Connector conn = env.getInstance().getConnector(WalkingSecurity.get(state, env).getSysUserName(), WalkingSecurity.get(state, env).getSysToken());
+
+    String tableName = WalkingSecurity.get(state, env).getTableName();
+    String namespaceName = WalkingSecurity.get(state, env).getNamespaceName();
+
+    boolean exists = WalkingSecurity.get(state, env).getTableExists();
+    boolean hasPermission = WalkingSecurity.get(state, env).canAlterTable(WalkingSecurity.get(state, env).getSysCredentials(), tableName, namespaceName);
     String newTableName = String.format("security_%s_%s_%d", InetAddress.getLocalHost().getHostName().replaceAll("[-.]", "_"), env.getPid(),
         System.currentTimeMillis());
-    
+
     renameTable(conn, state, env, tableName, newTableName, hasPermission, exists);
   }
-  
+
   public static void renameTable(Connector conn, State state, Environment env, String oldName, String newName, boolean hasPermission, boolean tableExists)
       throws AccumuloSecurityException, AccumuloException, TableExistsException {
     try {
@@ -57,7 +57,7 @@ public class AlterTable extends Test {
         else
           return;
       } else if (ae.getSecurityErrorCode().equals(SecurityErrorCode.BAD_CREDENTIALS)) {
-        if (WalkingSecurity.get(state,env).userPassTransient(conn.whoami()))
+        if (WalkingSecurity.get(state, env).userPassTransient(conn.whoami()))
           return;
       }
       throw new AccumuloException("Got unexpected ae error code", ae);
@@ -67,7 +67,7 @@ public class AlterTable extends Test {
       else
         return;
     }
-    WalkingSecurity.get(state,env).setTableName(newName);
+    WalkingSecurity.get(state, env).setTableName(newName);
     if (!hasPermission)
       throw new AccumuloException("Didn't get Security Exception when we should have");
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTablePerm.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTablePerm.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTablePerm.java
index 42ac364..8befe8a 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTablePerm.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/AlterTablePerm.java
@@ -30,28 +30,28 @@ import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
 public class AlterTablePerm extends Test {
-  
+
   @Override
   public void visit(State state, Environment env, Properties props) throws Exception {
     alter(state, env, props);
   }
-  
+
   public static void alter(State state, Environment env, Properties props) throws Exception {
     String action = props.getProperty("task", "toggle");
     String perm = props.getProperty("perm", "random");
     String sourceUserProp = props.getProperty("source", "system");
     String targetUser = props.getProperty("target", "table");
-    boolean tabExists = WalkingSecurity.get(state,env).getTableExists();
-    
+    boolean tabExists = WalkingSecurity.get(state, env).getTableExists();
+
     String target;
     if ("table".equals(targetUser))
-      target = WalkingSecurity.get(state,env).getTabUserName();
+      target = WalkingSecurity.get(state, env).getTabUserName();
     else
-      target = WalkingSecurity.get(state,env).getSysUserName();
-    
-    boolean exists = WalkingSecurity.get(state,env).userExists(target);
-    boolean tableExists = WalkingSecurity.get(state,env).getTableExists();
-    
+      target = WalkingSecurity.get(state, env).getSysUserName();
+
+    boolean exists = WalkingSecurity.get(state, env).userExists(target);
+    boolean tableExists = WalkingSecurity.get(state, env).getTableExists();
+
     TablePermission tabPerm;
     if (perm.equals("random")) {
       Random r = new Random();
@@ -59,26 +59,26 @@ public class AlterTablePerm extends Test {
       tabPerm = TablePermission.values()[i];
     } else
       tabPerm = TablePermission.valueOf(perm);
-    String tableName = WalkingSecurity.get(state,env).getTableName();
-    boolean hasPerm = WalkingSecurity.get(state,env).hasTablePermission(target, tableName, tabPerm);
+    String tableName = WalkingSecurity.get(state, env).getTableName();
+    boolean hasPerm = WalkingSecurity.get(state, env).hasTablePermission(target, tableName, tabPerm);
     boolean canGive;
     String sourceUser;
     AuthenticationToken sourceToken;
     if ("system".equals(sourceUserProp)) {
-      sourceUser = WalkingSecurity.get(state,env).getSysUserName();
-      sourceToken = WalkingSecurity.get(state,env).getSysToken();
+      sourceUser = WalkingSecurity.get(state, env).getSysUserName();
+      sourceToken = WalkingSecurity.get(state, env).getSysToken();
     } else if ("table".equals(sourceUserProp)) {
-      sourceUser = WalkingSecurity.get(state,env).getTabUserName();
-      sourceToken = WalkingSecurity.get(state,env).getTabToken();
+      sourceUser = WalkingSecurity.get(state, env).getTabUserName();
+      sourceToken = WalkingSecurity.get(state, env).getTabToken();
     } else {
       sourceUser = env.getUserName();
       sourceToken = env.getToken();
     }
     Connector conn = env.getInstance().getConnector(sourceUser, sourceToken);
-    
-    canGive = WalkingSecurity.get(state,env).canGrantTable(new Credentials(sourceUser, sourceToken).toThrift(env.getInstance()), target,
-        WalkingSecurity.get(state,env).getTableName(), WalkingSecurity.get(state,env).getNamespaceName());
-    
+
+    canGive = WalkingSecurity.get(state, env).canGrantTable(new Credentials(sourceUser, sourceToken).toThrift(env.getInstance()), target,
+        WalkingSecurity.get(state, env).getTableName(), WalkingSecurity.get(state, env).getNamespaceName());
+
     // toggle
     if (!"take".equals(action) && !"give".equals(action)) {
       try {
@@ -86,7 +86,7 @@ public class AlterTablePerm extends Test {
         if (hasPerm != (res = env.getConnector().securityOperations().hasTablePermission(target, tableName, tabPerm)))
           throw new AccumuloException("Test framework and accumulo are out of sync for user " + conn.whoami() + " for perm " + tabPerm.name()
               + " with local vs. accumulo being " + hasPerm + " " + res);
-        
+
         if (hasPerm)
           action = "take";
         else
@@ -108,8 +108,8 @@ public class AlterTablePerm extends Test {
         }
       }
     }
-    
-    boolean trans = WalkingSecurity.get(state,env).userPassTransient(conn.whoami());
+
+    boolean trans = WalkingSecurity.get(state, env).userPassTransient(conn.whoami());
     if ("take".equals(action)) {
       try {
         conn.securityOperations().revokeTablePermission(target, tableName, tabPerm);
@@ -137,7 +137,7 @@ public class AlterTablePerm extends Test {
             throw new AccumuloException("Got unexpected exception", ae);
         }
       }
-      WalkingSecurity.get(state,env).revokeTablePermission(target, tableName, tabPerm);
+      WalkingSecurity.get(state, env).revokeTablePermission(target, tableName, tabPerm);
     } else if ("give".equals(action)) {
       try {
         conn.securityOperations().grantTablePermission(target, tableName, tabPerm);
@@ -165,16 +165,16 @@ public class AlterTablePerm extends Test {
             throw new AccumuloException("Got unexpected exception", ae);
         }
       }
-      WalkingSecurity.get(state,env).grantTablePermission(target, tableName, tabPerm);
+      WalkingSecurity.get(state, env).grantTablePermission(target, tableName, tabPerm);
     }
-    
+
     if (!exists)
       throw new AccumuloException("User shouldn't have existed, but apparantly does");
     if (!tableExists)
       throw new AccumuloException("Table shouldn't have existed, but apparantly does");
     if (!canGive)
       throw new AccumuloException(conn.whoami() + " shouldn't have been able to grant privilege");
-    
+
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/security/Authenticate.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/Authenticate.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/Authenticate.java
index 1b4b15c..bceeaeb 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/Authenticate.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/Authenticate.java
@@ -30,36 +30,36 @@ import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
 public class Authenticate extends Test {
-  
+
   @Override
   public void visit(State state, Environment env, Properties props) throws Exception {
-    authenticate(WalkingSecurity.get(state,env).getSysUserName(), WalkingSecurity.get(state,env).getSysToken(), state, env, props);
+    authenticate(WalkingSecurity.get(state, env).getSysUserName(), WalkingSecurity.get(state, env).getSysToken(), state, env, props);
   }
-  
+
   public static void authenticate(String principal, AuthenticationToken token, State state, Environment env, Properties props) throws Exception {
     String targetProp = props.getProperty("target");
     boolean success = Boolean.parseBoolean(props.getProperty("valid"));
-    
+
     Connector conn = env.getInstance().getConnector(principal, token);
-    
+
     String target;
-    
+
     if (targetProp.equals("table")) {
-      target = WalkingSecurity.get(state,env).getTabUserName();
+      target = WalkingSecurity.get(state, env).getTabUserName();
     } else {
-      target = WalkingSecurity.get(state,env).getSysUserName();
+      target = WalkingSecurity.get(state, env).getSysUserName();
     }
-    boolean exists = WalkingSecurity.get(state,env).userExists(target);
+    boolean exists = WalkingSecurity.get(state, env).userExists(target);
     // Copy so if failed it doesn't mess with the password stored in state
-    byte[] password = Arrays.copyOf(WalkingSecurity.get(state,env).getUserPassword(target), WalkingSecurity.get(state,env).getUserPassword(target).length);
-    boolean hasPermission = WalkingSecurity.get(state,env).canAskAboutUser(new Credentials(principal, token).toThrift(env.getInstance()), target);
-    
+    byte[] password = Arrays.copyOf(WalkingSecurity.get(state, env).getUserPassword(target), WalkingSecurity.get(state, env).getUserPassword(target).length);
+    boolean hasPermission = WalkingSecurity.get(state, env).canAskAboutUser(new Credentials(principal, token).toThrift(env.getInstance()), target);
+
     if (!success)
       for (int i = 0; i < password.length; i++)
         password[i]++;
-    
+
     boolean result;
-    
+
     try {
       result = conn.securityOperations().authenticateUser(target, new PasswordToken(password));
     } catch (AccumuloSecurityException ae) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/security/ChangePass.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/ChangePass.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/ChangePass.java
index 724ec98..28414c2 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/ChangePass.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/ChangePass.java
@@ -30,40 +30,40 @@ import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
 public class ChangePass extends Test {
-  
+
   @Override
   public void visit(State state, Environment env, Properties props) throws Exception {
     String target = props.getProperty("target");
     String source = props.getProperty("source");
-    
+
     String principal;
     AuthenticationToken token;
     if (source.equals("system")) {
-      principal = WalkingSecurity.get(state,env).getSysUserName();
-      token = WalkingSecurity.get(state,env).getSysToken();
+      principal = WalkingSecurity.get(state, env).getSysUserName();
+      token = WalkingSecurity.get(state, env).getSysToken();
     } else {
-      principal = WalkingSecurity.get(state,env).getTabUserName();
-      token = WalkingSecurity.get(state,env).getTabToken();
+      principal = WalkingSecurity.get(state, env).getTabUserName();
+      token = WalkingSecurity.get(state, env).getTabToken();
     }
     Connector conn = env.getInstance().getConnector(principal, token);
-    
+
     boolean hasPerm;
     boolean targetExists;
     if (target.equals("table")) {
-      target = WalkingSecurity.get(state,env).getTabUserName();
+      target = WalkingSecurity.get(state, env).getTabUserName();
     } else
-      target = WalkingSecurity.get(state,env).getSysUserName();
-    
-    targetExists = WalkingSecurity.get(state,env).userExists(target);
-    
-    hasPerm = WalkingSecurity.get(state,env).canChangePassword(new Credentials(principal, token).toThrift(env.getInstance()), target);
-    
+      target = WalkingSecurity.get(state, env).getSysUserName();
+
+    targetExists = WalkingSecurity.get(state, env).userExists(target);
+
+    hasPerm = WalkingSecurity.get(state, env).canChangePassword(new Credentials(principal, token).toThrift(env.getInstance()), target);
+
     Random r = new Random();
-    
+
     byte[] newPassw = new byte[r.nextInt(50) + 1];
     for (int i = 0; i < newPassw.length; i++)
       newPassw[i] = (byte) ((r.nextInt(26) + 65) & 0xFF);
-    
+
     PasswordToken newPass = new PasswordToken(newPassw);
     try {
       conn.securityOperations().changeLocalUserPassword(target, newPass);
@@ -78,14 +78,14 @@ public class ChangePass extends Test {
             throw new AccumuloException("User " + target + " doesn't exist and they SHOULD.", ae);
           return;
         case BAD_CREDENTIALS:
-          if (!WalkingSecurity.get(state,env).userPassTransient(conn.whoami()))
+          if (!WalkingSecurity.get(state, env).userPassTransient(conn.whoami()))
             throw new AccumuloException("Bad credentials for user " + conn.whoami());
           return;
         default:
           throw new AccumuloException("Got unexpected exception", ae);
       }
     }
-    WalkingSecurity.get(state,env).changePassword(target, newPass);
+    WalkingSecurity.get(state, env).changePassword(target, newPass);
     // Waiting 1 second for password to propogate through Zk
     Thread.sleep(1000);
     if (!hasPerm)

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/security/CreateTable.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/CreateTable.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/CreateTable.java
index 0866923..fb4f309 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/CreateTable.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/CreateTable.java
@@ -29,16 +29,16 @@ import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
 public class CreateTable extends Test {
-  
+
   @Override
   public void visit(State state, Environment env, Properties props) throws Exception {
-    Connector conn = env.getInstance().getConnector(WalkingSecurity.get(state,env).getSysUserName(), WalkingSecurity.get(state,env).getSysToken());
-    
-    String tableName = WalkingSecurity.get(state,env).getTableName();
-    
-    boolean exists = WalkingSecurity.get(state,env).getTableExists();
-    boolean hasPermission = WalkingSecurity.get(state,env).canCreateTable(WalkingSecurity.get(state,env).getSysCredentials(), null, null);
-    
+    Connector conn = env.getInstance().getConnector(WalkingSecurity.get(state, env).getSysUserName(), WalkingSecurity.get(state, env).getSysToken());
+
+    String tableName = WalkingSecurity.get(state, env).getTableName();
+
+    boolean exists = WalkingSecurity.get(state, env).getTableExists();
+    boolean hasPermission = WalkingSecurity.get(state, env).canCreateTable(WalkingSecurity.get(state, env).getSysCredentials(), null, null);
+
     try {
       conn.tableOperations().create(tableName);
     } catch (AccumuloSecurityException ae) {
@@ -50,7 +50,7 @@ public class CreateTable extends Test {
         {
           try {
             env.getConnector().tableOperations().create(tableName);
-            WalkingSecurity.get(state,env).initTable(tableName);
+            WalkingSecurity.get(state, env).initTable(tableName);
           } catch (TableExistsException tee) {
             if (exists)
               return;
@@ -67,9 +67,9 @@ public class CreateTable extends Test {
       else
         return;
     }
-    WalkingSecurity.get(state,env).initTable(tableName);
+    WalkingSecurity.get(state, env).initTable(tableName);
     for (TablePermission tp : TablePermission.values())
-      WalkingSecurity.get(state,env).grantTablePermission(conn.whoami(), tableName, tp);
+      WalkingSecurity.get(state, env).grantTablePermission(conn.whoami(), tableName, tp);
     if (!hasPermission)
       throw new AccumuloException("Didn't get Security Exception when we should have");
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/security/CreateUser.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/CreateUser.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/CreateUser.java
index 336b4e4..eb07c43 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/CreateUser.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/CreateUser.java
@@ -27,15 +27,15 @@ import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
 public class CreateUser extends Test {
-  
+
   @Override
   public void visit(State state, Environment env, Properties props) throws Exception {
-    Connector conn = env.getInstance().getConnector(WalkingSecurity.get(state,env).getSysUserName(), WalkingSecurity.get(state,env).getSysToken());
-    
-    String tableUserName = WalkingSecurity.get(state,env).getTabUserName();
-    
-    boolean exists = WalkingSecurity.get(state,env).userExists(tableUserName);
-    boolean hasPermission = WalkingSecurity.get(state,env).canCreateUser(WalkingSecurity.get(state,env).getSysCredentials(), tableUserName);
+    Connector conn = env.getInstance().getConnector(WalkingSecurity.get(state, env).getSysUserName(), WalkingSecurity.get(state, env).getSysToken());
+
+    String tableUserName = WalkingSecurity.get(state, env).getTabUserName();
+
+    boolean exists = WalkingSecurity.get(state, env).userExists(tableUserName);
+    boolean hasPermission = WalkingSecurity.get(state, env).canCreateUser(WalkingSecurity.get(state, env).getSysCredentials(), tableUserName);
     PasswordToken tabUserPass = new PasswordToken("Super Sekret Table User Password");
     try {
       conn.securityOperations().createLocalUser(tableUserName, tabUserPass);
@@ -49,7 +49,7 @@ public class CreateUser extends Test {
           {
             if (!exists) {
               env.getConnector().securityOperations().createLocalUser(tableUserName, tabUserPass);
-              WalkingSecurity.get(state,env).createUser(tableUserName, tabUserPass);
+              WalkingSecurity.get(state, env).createUser(tableUserName, tabUserPass);
               Thread.sleep(1000);
             }
             return;
@@ -63,7 +63,7 @@ public class CreateUser extends Test {
           throw new AccumuloException("Got unexpected exception", ae);
       }
     }
-    WalkingSecurity.get(state,env).createUser(tableUserName, tabUserPass);
+    WalkingSecurity.get(state, env).createUser(tableUserName, tabUserPass);
     Thread.sleep(1000);
     if (!hasPermission)
       throw new AccumuloException("Didn't get Security Exception when we should have");

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/security/DropTable.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/DropTable.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/DropTable.java
index 06aa037..a0bff7a 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/DropTable.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/DropTable.java
@@ -31,31 +31,32 @@ import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
 public class DropTable extends Test {
-  
+
   @Override
   public void visit(State state, Environment env, Properties props) throws Exception {
     dropTable(state, env, props);
   }
-  
+
   public static void dropTable(State state, Environment env, Properties props) throws Exception {
     String sourceUser = props.getProperty("source", "system");
     String principal;
     AuthenticationToken token;
     if (sourceUser.equals("table")) {
-      principal = WalkingSecurity.get(state,env).getTabUserName();
-      token = WalkingSecurity.get(state,env).getTabToken();
+      principal = WalkingSecurity.get(state, env).getTabUserName();
+      token = WalkingSecurity.get(state, env).getTabToken();
     } else {
-      principal = WalkingSecurity.get(state,env).getSysUserName();
-      token = WalkingSecurity.get(state,env).getSysToken();
+      principal = WalkingSecurity.get(state, env).getSysUserName();
+      token = WalkingSecurity.get(state, env).getSysToken();
     }
     Connector conn = env.getInstance().getConnector(principal, token);
-    
-    String tableName = WalkingSecurity.get(state,env).getTableName();
-    String namespaceName = WalkingSecurity.get(state,env).getNamespaceName();
-    
-    boolean exists = WalkingSecurity.get(state,env).getTableExists();
-    boolean hasPermission = WalkingSecurity.get(state,env).canDeleteTable(new Credentials(principal, token).toThrift(env.getInstance()), tableName, namespaceName);
-    
+
+    String tableName = WalkingSecurity.get(state, env).getTableName();
+    String namespaceName = WalkingSecurity.get(state, env).getNamespaceName();
+
+    boolean exists = WalkingSecurity.get(state, env).getTableExists();
+    boolean hasPermission = WalkingSecurity.get(state, env).canDeleteTable(new Credentials(principal, token).toThrift(env.getInstance()), tableName,
+        namespaceName);
+
     try {
       conn.tableOperations().delete(tableName);
     } catch (AccumuloSecurityException ae) {
@@ -65,11 +66,11 @@ public class DropTable extends Test {
         else {
           // Drop anyway for sake of state
           env.getConnector().tableOperations().delete(tableName);
-          WalkingSecurity.get(state,env).cleanTablePermissions(tableName);
+          WalkingSecurity.get(state, env).cleanTablePermissions(tableName);
           return;
         }
       } else if (ae.getSecurityErrorCode().equals(SecurityErrorCode.BAD_CREDENTIALS)) {
-        if (WalkingSecurity.get(state,env).userPassTransient(conn.whoami()))
+        if (WalkingSecurity.get(state, env).userPassTransient(conn.whoami()))
           return;
       }
       throw new AccumuloException("Got unexpected ae error code", ae);
@@ -79,7 +80,7 @@ public class DropTable extends Test {
       else
         return;
     }
-    WalkingSecurity.get(state,env).cleanTablePermissions(tableName);
+    WalkingSecurity.get(state, env).cleanTablePermissions(tableName);
     if (!hasPermission)
       throw new AccumuloException("Didn't get Security Exception when we should have");
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/security/DropUser.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/DropUser.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/DropUser.java
index 40bde3b..e0ca60f 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/DropUser.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/DropUser.java
@@ -26,16 +26,16 @@ import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
 public class DropUser extends Test {
-  
+
   @Override
   public void visit(State state, Environment env, Properties props) throws Exception {
-    Connector conn = env.getInstance().getConnector(WalkingSecurity.get(state,env).getSysUserName(), WalkingSecurity.get(state,env).getSysToken());
-    
-    String tableUserName = WalkingSecurity.get(state,env).getTabUserName();
-    
-    boolean exists = WalkingSecurity.get(state,env).userExists(tableUserName);
-    boolean hasPermission = WalkingSecurity.get(state,env).canDropUser(WalkingSecurity.get(state,env).getSysCredentials(), tableUserName);
-    
+    Connector conn = env.getInstance().getConnector(WalkingSecurity.get(state, env).getSysUserName(), WalkingSecurity.get(state, env).getSysToken());
+
+    String tableUserName = WalkingSecurity.get(state, env).getTabUserName();
+
+    boolean exists = WalkingSecurity.get(state, env).userExists(tableUserName);
+    boolean hasPermission = WalkingSecurity.get(state, env).canDropUser(WalkingSecurity.get(state, env).getSysCredentials(), tableUserName);
+
     try {
       conn.securityOperations().dropLocalUser(tableUserName);
     } catch (AccumuloSecurityException ae) {
@@ -46,11 +46,11 @@ public class DropUser extends Test {
           else {
             if (exists) {
               env.getConnector().securityOperations().dropLocalUser(tableUserName);
-              WalkingSecurity.get(state,env).dropUser(tableUserName);
+              WalkingSecurity.get(state, env).dropUser(tableUserName);
             }
             return;
           }
-          
+
         case USER_DOESNT_EXIST:
           if (exists)
             throw new AccumuloException("Got user DNE exception when user should exists.", ae);
@@ -60,7 +60,7 @@ public class DropUser extends Test {
           throw new AccumuloException("Got unexpected exception", ae);
       }
     }
-    WalkingSecurity.get(state,env).dropUser(tableUserName);
+    WalkingSecurity.get(state, env).dropUser(tableUserName);
     Thread.sleep(1000);
     if (!hasPermission)
       throw new AccumuloException("Didn't get Security Exception when we should have");

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityFixture.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityFixture.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityFixture.java
index 9ce5bfb..915eca0 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityFixture.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityFixture.java
@@ -24,24 +24,24 @@ import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.SystemPermission;
 import org.apache.accumulo.core.security.TablePermission;
-import org.apache.accumulo.test.randomwalk.Fixture;
 import org.apache.accumulo.test.randomwalk.Environment;
+import org.apache.accumulo.test.randomwalk.Fixture;
 import org.apache.accumulo.test.randomwalk.State;
 
 public class SecurityFixture extends Fixture {
-  
+
   @Override
   public void setUp(State state, Environment env) throws Exception {
     String secTableName, systemUserName, tableUserName, secNamespaceName;
     Connector conn = env.getConnector();
-    
+
     String hostname = InetAddress.getLocalHost().getHostName().replaceAll("[-.]", "_");
-    
+
     systemUserName = String.format("system_%s", hostname);
     tableUserName = String.format("table_%s", hostname);
     secTableName = String.format("security_%s", hostname);
     secNamespaceName = String.format("securityNs_%s", hostname);
-    
+
     if (conn.tableOperations().exists(secTableName))
       conn.tableOperations().delete(secTableName);
     Set<String> users = conn.securityOperations().listLocalUsers();
@@ -49,63 +49,63 @@ public class SecurityFixture extends Fixture {
       conn.securityOperations().dropLocalUser(tableUserName);
     if (users.contains(systemUserName))
       conn.securityOperations().dropLocalUser(systemUserName);
-    
+
     PasswordToken sysUserPass = new PasswordToken("sysUser");
     conn.securityOperations().createLocalUser(systemUserName, sysUserPass);
-    
-    WalkingSecurity.get(state,env).setTableName(secTableName);
-    WalkingSecurity.get(state,env).setNamespaceName(secNamespaceName);
+
+    WalkingSecurity.get(state, env).setTableName(secTableName);
+    WalkingSecurity.get(state, env).setNamespaceName(secNamespaceName);
     state.set("rootUserPass", env.getToken());
-    
-    WalkingSecurity.get(state,env).setSysUserName(systemUserName);
-    WalkingSecurity.get(state,env).createUser(systemUserName, sysUserPass);
-    
-    WalkingSecurity.get(state,env).changePassword(tableUserName, new PasswordToken(new byte[0]));
-    
-    WalkingSecurity.get(state,env).setTabUserName(tableUserName);
-    
+
+    WalkingSecurity.get(state, env).setSysUserName(systemUserName);
+    WalkingSecurity.get(state, env).createUser(systemUserName, sysUserPass);
+
+    WalkingSecurity.get(state, env).changePassword(tableUserName, new PasswordToken(new byte[0]));
+
+    WalkingSecurity.get(state, env).setTabUserName(tableUserName);
+
     for (TablePermission tp : TablePermission.values()) {
-      WalkingSecurity.get(state,env).revokeTablePermission(systemUserName, secTableName, tp);
-      WalkingSecurity.get(state,env).revokeTablePermission(tableUserName, secTableName, tp);
+      WalkingSecurity.get(state, env).revokeTablePermission(systemUserName, secTableName, tp);
+      WalkingSecurity.get(state, env).revokeTablePermission(tableUserName, secTableName, tp);
     }
     for (SystemPermission sp : SystemPermission.values()) {
-      WalkingSecurity.get(state,env).revokeSystemPermission(systemUserName, sp);
-      WalkingSecurity.get(state,env).revokeSystemPermission(tableUserName, sp);
+      WalkingSecurity.get(state, env).revokeSystemPermission(systemUserName, sp);
+      WalkingSecurity.get(state, env).revokeSystemPermission(tableUserName, sp);
     }
-    WalkingSecurity.get(state,env).changeAuthorizations(tableUserName, new Authorizations());
+    WalkingSecurity.get(state, env).changeAuthorizations(tableUserName, new Authorizations());
   }
-  
+
   @Override
   public void tearDown(State state, Environment env) throws Exception {
     log.debug("One last validate");
     Validate.validate(state, env, log);
     Connector conn = env.getConnector();
-    
-    if (WalkingSecurity.get(state,env).getTableExists()) {
-      String secTableName = WalkingSecurity.get(state,env).getTableName();
+
+    if (WalkingSecurity.get(state, env).getTableExists()) {
+      String secTableName = WalkingSecurity.get(state, env).getTableName();
       log.debug("Dropping tables: " + secTableName);
-      
+
       conn.tableOperations().delete(secTableName);
     }
-    
-    if (WalkingSecurity.get(state,env).getNamespaceExists()) {
-      String secNamespaceName = WalkingSecurity.get(state,env).getNamespaceName();
+
+    if (WalkingSecurity.get(state, env).getNamespaceExists()) {
+      String secNamespaceName = WalkingSecurity.get(state, env).getNamespaceName();
       log.debug("Dropping namespace: " + secNamespaceName);
-      
+
       conn.namespaceOperations().delete(secNamespaceName);
     }
-    
-    if (WalkingSecurity.get(state,env).userExists(WalkingSecurity.get(state,env).getTabUserName())) {
-      String tableUserName = WalkingSecurity.get(state,env).getTabUserName();
+
+    if (WalkingSecurity.get(state, env).userExists(WalkingSecurity.get(state, env).getTabUserName())) {
+      String tableUserName = WalkingSecurity.get(state, env).getTabUserName();
       log.debug("Dropping user: " + tableUserName);
-      
+
       conn.securityOperations().dropLocalUser(tableUserName);
     }
-    String systemUserName = WalkingSecurity.get(state,env).getSysUserName();
+    String systemUserName = WalkingSecurity.get(state, env).getSysUserName();
     log.debug("Dropping user: " + systemUserName);
     conn.securityOperations().dropLocalUser(systemUserName);
     WalkingSecurity.clearInstance();
-    
+
     // Allow user drops to propagate, in case a new security test starts
     Thread.sleep(2000);
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityHelper.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityHelper.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityHelper.java
index ba1893f..f106dd5 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityHelper.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SecurityHelper.java
@@ -32,150 +32,150 @@ import org.apache.log4j.Logger;
 
 public class SecurityHelper {
   private static final Logger log = Logger.getLogger(SecurityHelper.class);
-  
+
   private static final String tableName = "secTableName";
   private static final String masterName = "sysUserName";
   private static final String tUserName = "tabUserName";
-  
+
   private static final String masterPass = "sysUserPass";
   private static final String tUserPass = "tabUserPass";
-  
+
   private static final String tUserExists = "tabUserExists";
   private static final String tableExists = "secTableExists";
-  
+
   private static final String masterConn = "sysUserConn";
-  
+
   private static final String authsMap = "authorizationsCountMap";
   private static final String lastKey = "lastMutationKey";
   private static final String filesystem = "securityFileSystem";
-  
+
   public static String getTableName(State state) {
     return state.getString(tableName);
   }
-  
+
   public static void setTableName(State state, String tName) {
     state.set(tableName, tName);
   }
-  
+
   public static String getSysUserName(State state) {
     return state.getString(masterName);
   }
-  
+
   public static void setSysUserName(State state, String sysUserName) {
     state.set(masterName, sysUserName);
   }
-  
+
   public static String getTabUserName(State state) {
     return state.getString(tUserName);
   }
-  
+
   public static void setTabUserName(State state, String tabUserName) {
     state.set(tUserName, tabUserName);
   }
-  
+
   public static byte[] getSysUserPass(State state) {
     return (byte[]) state.get(masterPass);
   }
-  
+
   public static void setSysUserPass(State state, byte[] sysUserPass) {
     log.debug("Setting system user pass to " + new String(sysUserPass, UTF_8));
     state.set(masterPass, sysUserPass);
     state.set(masterPass + "time", System.currentTimeMillis());
-    
+
   }
-  
+
   public static boolean sysUserPassTransient(State state) {
     return System.currentTimeMillis() - state.getLong(masterPass + "time") < 1000;
   }
-  
+
   public static byte[] getTabUserPass(State state) {
     return (byte[]) state.get(tUserPass);
   }
-  
+
   public static void setTabUserPass(State state, byte[] tabUserPass) {
     log.debug("Setting table user pass to " + new String(tabUserPass, UTF_8));
     state.set(tUserPass, tabUserPass);
     state.set(tUserPass + "time", System.currentTimeMillis());
   }
-  
+
   public static boolean tabUserPassTransient(State state) {
     return System.currentTimeMillis() - state.getLong(tUserPass + "time") < 1000;
   }
-  
+
   public static boolean getTabUserExists(State state) {
     return Boolean.parseBoolean(state.getString(tUserExists));
   }
-  
+
   public static void setTabUserExists(State state, boolean exists) {
     state.set(tUserExists, Boolean.toString(exists));
   }
-  
+
   public static boolean getTableExists(State state) {
     return Boolean.parseBoolean(state.getString(tableExists));
   }
-  
+
   public static void setTableExists(State state, boolean exists) {
     state.set(tableExists, Boolean.toString(exists));
   }
-  
+
   public static Connector getSystemConnector(State state) {
     return (Connector) state.get(masterConn);
   }
-  
+
   public static void setSystemConnector(State state, Connector conn) {
     state.set(masterConn, conn);
   }
-  
+
   public static boolean getTabPerm(State state, String userName, TablePermission tp) {
     return Boolean.parseBoolean(state.getString("Tab" + userName + tp.name()));
   }
-  
+
   public static void setTabPerm(State state, String userName, TablePermission tp, boolean value) {
     log.debug((value ? "Gave" : "Took") + " the table permission " + tp.name() + (value ? " to" : " from") + " user " + userName);
     state.set("Tab" + userName + tp.name(), Boolean.toString(value));
     if (tp.equals(TablePermission.READ) || tp.equals(TablePermission.WRITE))
       state.set("Tab" + userName + tp.name() + "time", System.currentTimeMillis());
-    
+
   }
-  
+
   public static boolean getSysPerm(State state, String userName, SystemPermission tp) {
     return Boolean.parseBoolean(state.getString("Sys" + userName + tp.name()));
   }
-  
+
   public static void setSysPerm(State state, String userName, SystemPermission tp, boolean value) {
     log.debug((value ? "Gave" : "Took") + " the system permission " + tp.name() + (value ? " to" : " from") + " user " + userName);
     state.set("Sys" + userName + tp.name(), Boolean.toString(value));
   }
-  
+
   public static Authorizations getUserAuths(State state, String target) {
     return (Authorizations) state.get(target + "_auths");
   }
-  
+
   public static void setUserAuths(State state, String target, Authorizations auths) {
     state.set(target + "_auths", auths);
   }
-  
+
   @SuppressWarnings("unchecked")
   public static Map<String,Integer> getAuthsMap(State state) {
     return (Map<String,Integer>) state.get(authsMap);
   }
-  
+
   public static void setAuthsMap(State state, Map<String,Integer> map) {
     state.set(authsMap, map);
   }
-  
+
   public static String[] getAuthsArray() {
     return new String[] {"Fishsticks", "PotatoSkins", "Ribs", "Asparagus", "Paper", "Towels", "Lint", "Brush", "Celery"};
   }
-  
+
   public static String getLastKey(State state) {
     return state.getString(lastKey);
   }
-  
+
   public static void setLastKey(State state, String key) {
     state.set(lastKey, key);
   }
-  
+
   public static void increaseAuthMap(State state, String s, int increment) {
     Integer curVal = getAuthsMap(state).get(s);
     if (curVal == null) {
@@ -184,7 +184,7 @@ public class SecurityHelper {
     }
     curVal += increment;
   }
-  
+
   public static FileSystem getFs(State state) {
     FileSystem fs = null;
     try {
@@ -201,7 +201,7 @@ public class SecurityHelper {
     }
     return fs;
   }
-  
+
   public static boolean inAmbiguousZone(State state, String userName, TablePermission tp) {
     if (tp.equals(TablePermission.READ) || tp.equals(TablePermission.WRITE)) {
       Long setTime = (Long) state.get("Tab" + userName + tp.name() + "time");
@@ -210,5 +210,5 @@ public class SecurityHelper {
     }
     return false;
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/6bc67602/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SetAuths.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SetAuths.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SetAuths.java
index e20367d..e80e475 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SetAuths.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/security/SetAuths.java
@@ -30,33 +30,34 @@ import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
 public class SetAuths extends Test {
-  
+
   @Override
   public void visit(State state, Environment env, Properties props) throws Exception {
     String authsString = props.getProperty("auths", "_random");
-    
+
     String targetUser = props.getProperty("system");
     String target;
     String authPrincipal;
     AuthenticationToken authToken;
     if ("table".equals(targetUser)) {
-      target = WalkingSecurity.get(state,env).getTabUserName();
-      authPrincipal = WalkingSecurity.get(state,env).getSysUserName();
-      authToken = WalkingSecurity.get(state,env).getSysToken();
+      target = WalkingSecurity.get(state, env).getTabUserName();
+      authPrincipal = WalkingSecurity.get(state, env).getSysUserName();
+      authToken = WalkingSecurity.get(state, env).getSysToken();
     } else {
-      target = WalkingSecurity.get(state,env).getSysUserName();
+      target = WalkingSecurity.get(state, env).getSysUserName();
       authPrincipal = env.getUserName();
       authToken = env.getToken();
     }
     Connector conn = env.getInstance().getConnector(authPrincipal, authToken);
-    
-    boolean exists = WalkingSecurity.get(state,env).userExists(target);
-    boolean hasPermission = WalkingSecurity.get(state,env).canChangeAuthorizations(new Credentials(authPrincipal, authToken).toThrift(env.getInstance()), target);
-    
+
+    boolean exists = WalkingSecurity.get(state, env).userExists(target);
+    boolean hasPermission = WalkingSecurity.get(state, env).canChangeAuthorizations(new Credentials(authPrincipal, authToken).toThrift(env.getInstance()),
+        target);
+
     Authorizations auths;
     if (authsString.equals("_random")) {
-      String[] possibleAuths = WalkingSecurity.get(state,env).getAuthsArray();
-      
+      String[] possibleAuths = WalkingSecurity.get(state, env).getAuthsArray();
+
       Random r = new Random();
       int i = r.nextInt(possibleAuths.length);
       String[] authSet = new String[i];
@@ -72,7 +73,7 @@ public class SetAuths extends Test {
     } else {
       auths = new Authorizations(authsString.split(","));
     }
-    
+
     try {
       conn.securityOperations().changeUserAuthorizations(target, auths);
     } catch (AccumuloSecurityException ae) {
@@ -91,9 +92,9 @@ public class SetAuths extends Test {
           throw new AccumuloException("Got unexpected exception", ae);
       }
     }
-    WalkingSecurity.get(state,env).changeAuthorizations(target, auths);
+    WalkingSecurity.get(state, env).changeAuthorizations(target, auths);
     if (!hasPermission)
       throw new AccumuloException("Didn't get Security Exception when we should have");
   }
-  
+
 }


Mime
View raw message