accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [10/16] Incomplete, but needs to be checkpointed
Date Mon, 22 Sep 2014 20:48:10 GMT
http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/util/DeleteZooInstance.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/util/DeleteZooInstance.java b/server/src/main/java/org/apache/accumulo/server/util/DeleteZooInstance.java
index a74f2b5..9ed27b6 100644
--- a/server/src/main/java/org/apache/accumulo/server/util/DeleteZooInstance.java
+++ b/server/src/main/java/org/apache/accumulo/server/util/DeleteZooInstance.java
@@ -21,9 +21,7 @@ import java.util.Set;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.cli.Help;
-import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.zookeeper.KeeperException;
 
 import com.beust.jcommander.Parameter;
@@ -35,10 +33,10 @@ public class DeleteZooInstance {
     String instance;
   }
   
-  static void deleteRetry(IZooReaderWriter zk, String path) throws Exception {
+  static void deleteRetry(CuratorReaderWriter zk, String path) throws Exception {
     for (int i = 0; i < 10; i++){
       try {
-        zk.recursiveDelete(path, NodeMissingPolicy.SKIP);
+        zk.recursiveDelete(path);
         return;
       } catch (KeeperException.NotEmptyException ex) {
         // ignored
@@ -56,7 +54,7 @@ public class DeleteZooInstance {
     Opts opts = new Opts();
     opts.parseArgs(DeleteZooInstance.class.getName(), args);
     
-    IZooReaderWriter zk = ZooReaderWriter.getInstance();
+    CuratorReaderWriter zk = CuratorReaderWriter.getInstance();
     // try instance name:
     Set<String> instances = new HashSet<String>(zk.getChildren(Constants.ZROOT + Constants.ZINSTANCES));
     Set<String> uuids = new HashSet<String>(zk.getChildren(Constants.ZROOT));

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java b/server/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java
index 9be6f61..f3a638d 100644
--- a/server/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java
+++ b/server/src/main/java/org/apache/accumulo/server/util/DumpZookeeper.java
@@ -20,8 +20,7 @@ import java.io.PrintStream;
 import java.io.UnsupportedEncodingException;
 
 import org.apache.accumulo.core.cli.Help;
-import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
@@ -32,7 +31,7 @@ import com.beust.jcommander.Parameter;
 
 public class DumpZookeeper {
   
-  static IZooReaderWriter zk = null;
+  static CuratorReaderWriter zk = null;
   
   private static final Logger log = Logger.getLogger(DumpZookeeper.class);
   
@@ -65,7 +64,7 @@ public class DumpZookeeper {
     if (args.length > 0)
       opts.root = args[0];
     try {
-      zk = ZooReaderWriter.getInstance();
+      zk = CuratorReaderWriter.getInstance();
       
       write(out, 0, "<dump root='%s'>", opts.root);
       for (String child : zk.getChildren(opts.root, null))

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/util/Initialize.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/util/Initialize.java b/server/src/main/java/org/apache/accumulo/server/util/Initialize.java
index 0b62c6c..fc6fa18 100644
--- a/server/src/main/java/org/apache/accumulo/server/util/Initialize.java
+++ b/server/src/main/java/org/apache/accumulo/server/util/Initialize.java
@@ -47,14 +47,12 @@ import org.apache.accumulo.core.security.SecurityUtil;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.accumulo.core.util.MetadataTable;
 import org.apache.accumulo.core.util.RootTable;
-import org.apache.accumulo.core.zookeeper.ZooUtil;
-import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
+import org.apache.accumulo.fate.curator.CuratorReaderWriter.NodeExistsPolicy;
 import org.apache.accumulo.server.ServerConstants;
 import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.accumulo.server.constraints.MetadataConstraints;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.accumulo.server.fs.VolumeManagerImpl;
 import org.apache.accumulo.server.iterators.MetadataBulkLoadFilter;
@@ -62,7 +60,6 @@ import org.apache.accumulo.server.master.state.tables.TableManager;
 import org.apache.accumulo.server.security.AuditedSecurityOperation;
 import org.apache.accumulo.server.security.SecurityConstants;
 import org.apache.accumulo.server.tabletserver.TabletTime;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
@@ -192,7 +189,7 @@ public class Initialize {
   }
   
   private static boolean zookeeperAvailable() {
-    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     try {
       return zoo.exists("/");
     } catch (KeeperException e) {
@@ -345,13 +342,13 @@ public class Initialize {
   
   private static void initZooKeeper(Opts opts, String uuid, String instanceNamePath) throws KeeperException, InterruptedException {
     // setup basic data in zookeeper
-    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
-    ZooUtil.putPersistentData(zoo.getZooKeeper(), Constants.ZROOT, new byte[0], -1, NodeExistsPolicy.SKIP, Ids.OPEN_ACL_UNSAFE);
-    ZooUtil.putPersistentData(zoo.getZooKeeper(), Constants.ZROOT + Constants.ZINSTANCES, new byte[0], -1, NodeExistsPolicy.SKIP, Ids.OPEN_ACL_UNSAFE);
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
+    zoo.putPersistentDataWithACL(Constants.ZROOT, new byte[0], NodeExistsPolicy.SKIP, Ids.OPEN_ACL_UNSAFE);
+    zoo.putPersistentDataWithACL(Constants.ZROOT + Constants.ZINSTANCES, new byte[0], NodeExistsPolicy.SKIP, Ids.OPEN_ACL_UNSAFE);
     
     // setup instance name
     if (opts.clearInstanceName)
-      zoo.recursiveDelete(instanceNamePath, NodeMissingPolicy.SKIP);
+      zoo.recursiveDelete(instanceNamePath);
     zoo.putPersistentData(instanceNamePath, uuid.getBytes(), NodeExistsPolicy.FAIL);
     
     // setup the instance
@@ -396,7 +393,7 @@ public class Initialize {
       if (opts.clearInstanceName) {
         exists = false;
         break;
-      } else if (exists = ZooReaderWriter.getInstance().exists(instanceNamePath)) {
+      } else if (exists = CuratorReaderWriter.getInstance().exists(instanceNamePath)) {
         String decision = getConsoleReader().readLine("Instance name \"" + instanceName + "\" exists. Delete existing entry from zookeeper? [Y/N] : ");
         if (decision == null)
           System.exit(0);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/util/ListInstances.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/util/ListInstances.java b/server/src/main/java/org/apache/accumulo/server/util/ListInstances.java
index b83405d..c8cfc83 100644
--- a/server/src/main/java/org/apache/accumulo/server/util/ListInstances.java
+++ b/server/src/main/java/org/apache/accumulo/server/util/ListInstances.java
@@ -27,10 +27,9 @@ import java.util.UUID;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.cli.Help;
 import org.apache.accumulo.core.conf.Property;
-import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
 import org.apache.accumulo.server.conf.ServerConfiguration;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.zookeeper.ZooLock;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.log4j.Logger;
 
 import com.beust.jcommander.Parameter;
@@ -153,7 +152,7 @@ public class ListInstances {
   
   private static TreeMap<String,UUID> getInstanceNames() {
     
-    IZooReaderWriter zk = ZooReaderWriter.getInstance();
+    CuratorReaderWriter zk = CuratorReaderWriter.getInstance();
     String instancesPath = Constants.ZROOT + Constants.ZINSTANCES;
     
     TreeMap<String,UUID> tm = new TreeMap<String,UUID>();
@@ -184,7 +183,7 @@ public class ListInstances {
   private static TreeSet<UUID> getInstanceIDs() {
     TreeSet<UUID> ts = new TreeSet<UUID>();
     
-    IZooReaderWriter zk = ZooReaderWriter.getInstance();
+    CuratorReaderWriter zk = CuratorReaderWriter.getInstance();
     
     try {
       List<String> children = zk.getChildren(Constants.ZROOT);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java b/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java
index ec2d17e..4233bb8 100644
--- a/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java
+++ b/server/src/main/java/org/apache/accumulo/server/util/MetadataTable.java
@@ -63,18 +63,16 @@ import org.apache.accumulo.core.util.RootTable;
 import org.apache.accumulo.core.util.StringUtil;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
-import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
+import org.apache.accumulo.fate.curator.CuratorReaderWriter.NodeExistsPolicy;
 import org.apache.accumulo.server.ServerConstants;
 import org.apache.accumulo.server.client.HdfsZooInstance;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.fs.FileRef;
 import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.accumulo.server.fs.VolumeManagerImpl;
 import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.accumulo.server.security.SecurityConstants;
 import org.apache.accumulo.server.zookeeper.ZooLock;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.DataInputBuffer;
@@ -154,7 +152,7 @@ public class MetadataTable extends org.apache.accumulo.core.util.MetadataTable {
       Set<FileRef> filesInUseByScans, String address, ZooLock zooLock, Set<String> unusedWalLogs, TServerInstance lastLocation, long flushId) {
     if (extent.equals(RootTable.EXTENT)) {
       if (unusedWalLogs != null) {
-        IZooReaderWriter zk = ZooReaderWriter.getInstance();
+        CuratorReaderWriter zk = CuratorReaderWriter.getInstance();
         // unusedWalLogs will contain the location/name of each log in a log set
         // the log set is stored under one of the log names, but not both
         // find the entry under one of the names and delete it.
@@ -166,7 +164,7 @@ public class MetadataTable extends org.apache.accumulo.core.util.MetadataTable {
           while (true) {
             try {
               if (zk.exists(zpath)) {
-                zk.recursiveDelete(zpath, NodeMissingPolicy.SKIP);
+                zk.recursiveDelete(zpath);
                 foundEntry = true;
               }
               break;
@@ -738,7 +736,7 @@ public class MetadataTable extends org.apache.accumulo.core.util.MetadataTable {
       String root = getZookeeperLogLocation();
       while (true) {
         try {
-          IZooReaderWriter zoo = ZooReaderWriter.getInstance();
+          CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
           if (zoo.isLockHeld(zooLock.getLockID())) {
             String[] parts = entry.filename.split("/");
             String uniqueId = parts[parts.length - 1];
@@ -856,7 +854,7 @@ public class MetadataTable extends org.apache.accumulo.core.util.MetadataTable {
   }
   
   private static void getRootLogEntries(ArrayList<LogEntry> result) throws KeeperException, InterruptedException, IOException {
-    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     String root = getZookeeperLogLocation();
     // there's a little race between getting the children and fetching
     // the data. The log can be removed in between.
@@ -937,9 +935,9 @@ public class MetadataTable extends org.apache.accumulo.core.util.MetadataTable {
         String root = getZookeeperLogLocation();
         while (true) {
           try {
-            IZooReaderWriter zoo = ZooReaderWriter.getInstance();
+            CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
             if (zoo.isLockHeld(zooLock.getLockID()))
-              zoo.recursiveDelete(root + "/" + entry.filename, NodeMissingPolicy.SKIP);
+              zoo.recursiveDelete(root + "/" + entry.filename);
             break;
           } catch (Exception e) {
             log.error(e, e);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/util/RestoreZookeeper.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/util/RestoreZookeeper.java b/server/src/main/java/org/apache/accumulo/server/util/RestoreZookeeper.java
index f80c098..b2963d1 100644
--- a/server/src/main/java/org/apache/accumulo/server/util/RestoreZookeeper.java
+++ b/server/src/main/java/org/apache/accumulo/server/util/RestoreZookeeper.java
@@ -24,9 +24,8 @@ import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
 
 import org.apache.accumulo.core.cli.Help;
-import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
+import org.apache.accumulo.fate.curator.CuratorReaderWriter.NodeExistsPolicy;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
@@ -40,11 +39,11 @@ import com.beust.jcommander.Parameter;
 public class RestoreZookeeper {
   
   private static class Restore extends DefaultHandler {
-    IZooReaderWriter zk = null;
+    CuratorReaderWriter zk = null;
     Stack<String> cwd = new Stack<String>();
     boolean overwrite = false;
     
-    Restore(IZooReaderWriter zk, boolean overwrite) {
+    Restore(CuratorReaderWriter zk, boolean overwrite) {
       this.zk = zk;
       this.overwrite = overwrite;
     }
@@ -117,7 +116,7 @@ public class RestoreZookeeper {
     
     SAXParserFactory factory = SAXParserFactory.newInstance();
     SAXParser parser = factory.newSAXParser();
-    parser.parse(in, new Restore(ZooReaderWriter.getInstance(), opts.overwrite));
+    parser.parse(in, new Restore(CuratorReaderWriter.getInstance(), opts.overwrite));
     in.close();
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java b/server/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java
index affe12f..3838296 100644
--- a/server/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java
+++ b/server/src/main/java/org/apache/accumulo/server/util/SystemPropUtil.java
@@ -19,10 +19,9 @@ package org.apache.accumulo.server.util;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
+import org.apache.accumulo.fate.curator.CuratorReaderWriter.NodeExistsPolicy;
 import org.apache.accumulo.server.client.HdfsZooInstance;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.zookeeper.KeeperException;
 
 public class SystemPropUtil {
@@ -33,13 +32,13 @@ public class SystemPropUtil {
     
     // create the zk node for this property and set it's data to the specified value
     String zPath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZCONFIG + "/" + property;
-    ZooReaderWriter.getInstance().putPersistentData(zPath, value.getBytes(), NodeExistsPolicy.OVERWRITE);
+    CuratorReaderWriter.getInstance().putPersistentData(zPath, value.getBytes(), NodeExistsPolicy.OVERWRITE);
     
     return true;
   }
   
   public static void removeSystemProperty(String property) throws InterruptedException, KeeperException {
     String zPath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZCONFIG + "/" + property;
-    ZooReaderWriter.getInstance().recursiveDelete(zPath, NodeMissingPolicy.FAIL);
+    CuratorReaderWriter.getInstance().recursiveDelete(zPath);
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/util/TablePropUtil.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/util/TablePropUtil.java b/server/src/main/java/org/apache/accumulo/server/util/TablePropUtil.java
index cdee8fb..c7c65aa 100644
--- a/server/src/main/java/org/apache/accumulo/server/util/TablePropUtil.java
+++ b/server/src/main/java/org/apache/accumulo/server/util/TablePropUtil.java
@@ -19,10 +19,9 @@ package org.apache.accumulo.server.util;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
+import org.apache.accumulo.fate.curator.CuratorReaderWriter.NodeExistsPolicy;
 import org.apache.accumulo.server.client.HdfsZooInstance;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.zookeeper.KeeperException;
 
 public class TablePropUtil {
@@ -32,11 +31,11 @@ public class TablePropUtil {
     
     // create the zk node for per-table properties for this table if it doesn't already exist
     String zkTablePath = getTablePath(tableId);
-    ZooReaderWriter.getInstance().putPersistentData(zkTablePath, new byte[0], NodeExistsPolicy.SKIP);
+    CuratorReaderWriter.getInstance().putPersistentData(zkTablePath, new byte[0], NodeExistsPolicy.SKIP);
     
     // create the zk node for this property and set it's data to the specified value
     String zPath = zkTablePath + "/" + property;
-    ZooReaderWriter.getInstance().putPersistentData(zPath, value.getBytes(), NodeExistsPolicy.OVERWRITE);
+    CuratorReaderWriter.getInstance().putPersistentData(zPath, value.getBytes(), NodeExistsPolicy.OVERWRITE);
     
     return true;
   }
@@ -51,7 +50,7 @@ public class TablePropUtil {
   
   public static void removeTableProperty(String tableId, String property) throws InterruptedException, KeeperException {
     String zPath = getTablePath(tableId) + "/" + property;
-    ZooReaderWriter.getInstance().recursiveDelete(zPath, NodeMissingPolicy.SKIP);
+    CuratorReaderWriter.getInstance().recursiveDelete(zPath);
   }
   
   private static String getTablePath(String tablename) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/util/TabletServerLocks.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/util/TabletServerLocks.java b/server/src/main/java/org/apache/accumulo/server/util/TabletServerLocks.java
index dea12fb..5e09a66 100644
--- a/server/src/main/java/org/apache/accumulo/server/util/TabletServerLocks.java
+++ b/server/src/main/java/org/apache/accumulo/server/util/TabletServerLocks.java
@@ -21,10 +21,9 @@ import java.util.List;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.cli.Help;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
-import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
 import org.apache.accumulo.server.client.HdfsZooInstance;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.zookeeper.ZooLock;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 
 import com.beust.jcommander.Parameter;
 
@@ -36,9 +35,7 @@ public class TabletServerLocks {
     @Parameter(names="-delete")
     String delete = null;
   }
-  /**
-   * @param args
-   */
+
   public static void main(String[] args) throws Exception {
     
     String tserverPath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZTSERVERS;
@@ -46,7 +43,7 @@ public class TabletServerLocks {
     opts.parseArgs(TabletServerLocks.class.getName(), args);
     
     if (opts.list) {
-      IZooReaderWriter zoo = ZooReaderWriter.getInstance();
+      CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
       
       List<String> tabletServers = zoo.getChildren(tserverPath);
       

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/util/ZooZap.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/util/ZooZap.java b/server/src/main/java/org/apache/accumulo/server/util/ZooZap.java
index 489d4bc..208ee67 100644
--- a/server/src/main/java/org/apache/accumulo/server/util/ZooZap.java
+++ b/server/src/main/java/org/apache/accumulo/server/util/ZooZap.java
@@ -20,10 +20,8 @@ import java.util.List;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.server.cli.ClientOpts;
-import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.zookeeper.ZooLock;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 
 import com.beust.jcommander.JCommander;
 import com.beust.jcommander.Parameter;
@@ -62,7 +60,7 @@ public class ZooZap {
     }
     
     String iid = opts.getInstance().getInstanceID();
-    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     
     if (opts.zapMaster) {
       String masterLockPath = Constants.ZROOT + "/" + iid + Constants.ZMASTER_LOCK;
@@ -78,7 +76,7 @@ public class ZooZap {
           message("Deleting " + tserversPath + "/" + child + " from zookeeper");
           
           if (opts.zapMaster)
-            ZooReaderWriter.getInstance().recursiveDelete(tserversPath + "/" + child, NodeMissingPolicy.SKIP);
+            CuratorReaderWriter.getInstance().recursiveDelete(tserversPath + "/" + child);
           else {
             String path = tserversPath + "/" + child;
             if (zoo.getChildren(path).size() > 0) {
@@ -100,12 +98,12 @@ public class ZooZap {
     
   }
   
-  private static void zapDirectory(IZooReaderWriter zoo, String path) {
+  private static void zapDirectory(CuratorReaderWriter zoo, String path) {
     try {
       List<String> children = zoo.getChildren(path);
       for (String child : children) {
         message("Deleting " + path + "/" + child + " from zookeeper");
-        zoo.recursiveDelete(path + "/" + child, NodeMissingPolicy.SKIP);
+        zoo.recursiveDelete(path + "/" + child);
       }
     } catch (Exception e) {
       e.printStackTrace();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java b/server/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
index 66e68c3..f40460e 100644
--- a/server/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
+++ b/server/src/main/java/org/apache/accumulo/server/zookeeper/DistributedWorkQueue.java
@@ -24,8 +24,8 @@ import java.util.Set;
 import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.atomic.AtomicInteger;
 
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
+import org.apache.accumulo.fate.curator.CuratorReaderWriter.NodeExistsPolicy;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.util.time.SimpleTimer;
 import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
@@ -45,7 +45,7 @@ public class DistributedWorkQueue {
   private static final Logger log = Logger.getLogger(DistributedWorkQueue.class);
   
   private ThreadPoolExecutor threadPool;
-  private ZooReaderWriter zoo = ZooReaderWriter.getInstance();
+  private CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
   private String path;
 
   private AtomicInteger numTask = new AtomicInteger(0);
@@ -80,13 +80,13 @@ public class DistributedWorkQueue {
         
         // check to see if another node processed it already
         if (!zoo.exists(childPath)) {
-          zoo.recursiveDelete(lockPath, NodeMissingPolicy.SKIP);
+          zoo.recursiveDelete(lockPath);
           continue;
         }
 
         // Great... we got the lock, but maybe we're too busy
         if (numTask.get() >= threadPool.getCorePoolSize()) {
-          zoo.recursiveDelete(lockPath, NodeMissingPolicy.SKIP);
+          zoo.recursiveDelete(lockPath);
           break;
         }
         
@@ -102,7 +102,7 @@ public class DistributedWorkQueue {
                 
                 // if the task fails, then its entry in the Q is not deleted... so it will be retried
                 try {
-                  zoo.recursiveDelete(childPath, NodeMissingPolicy.SKIP);
+                  zoo.recursiveDelete(childPath);
                 } catch (Exception e) {
                   log.error("Error received when trying to delete entry in zookeeper " + childPath, e);
                 }
@@ -112,7 +112,7 @@ public class DistributedWorkQueue {
               }
               
               try {
-                zoo.recursiveDelete(lockPath, NodeMissingPolicy.SKIP);
+                zoo.recursiveDelete(lockPath);
               } catch (Exception e) {
                 log.error("Error received when trying to delete entry in zookeeper " + childPath, e);
               }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/zookeeper/TransactionWatcher.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/zookeeper/TransactionWatcher.java b/server/src/main/java/org/apache/accumulo/server/zookeeper/TransactionWatcher.java
index 4e0e977..4752fb5 100644
--- a/server/src/main/java/org/apache/accumulo/server/zookeeper/TransactionWatcher.java
+++ b/server/src/main/java/org/apache/accumulo/server/zookeeper/TransactionWatcher.java
@@ -18,18 +18,17 @@ package org.apache.accumulo.server.zookeeper;
 
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
-import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
-import org.apache.accumulo.fate.zookeeper.ZooReader;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
+import org.apache.accumulo.fate.curator.CuratorReader;
+import org.apache.accumulo.fate.curator.CuratorReaderWriter.NodeExistsPolicy;
 import org.apache.accumulo.server.client.HdfsZooInstance;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.zookeeper.KeeperException;
 
 public class TransactionWatcher extends org.apache.accumulo.fate.zookeeper.TransactionWatcher {
   public static class ZooArbitrator implements Arbitrator {
     
     Instance instance = HdfsZooInstance.getInstance();
-    ZooReader rdr = new ZooReader(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut());
+    CuratorReader rdr = new CuratorReader(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut());
     
     @Override
     public boolean transactionAlive(String type, long tid) throws Exception {
@@ -40,7 +39,7 @@ public class TransactionWatcher extends org.apache.accumulo.fate.zookeeper.Trans
     
     public static void start(String type, long tid) throws KeeperException, InterruptedException {
       Instance instance = HdfsZooInstance.getInstance();
-      IZooReaderWriter writer = ZooReaderWriter.getInstance();
+      CuratorReaderWriter writer = CuratorReaderWriter.getInstance();
       writer.putPersistentData(ZooUtil.getRoot(instance) + "/" + type, new byte[] {}, NodeExistsPolicy.OVERWRITE);
       writer.putPersistentData(ZooUtil.getRoot(instance) + "/" + type + "/" + tid, new byte[] {}, NodeExistsPolicy.OVERWRITE);
       writer.putPersistentData(ZooUtil.getRoot(instance) + "/" + type + "/" + tid + "-running", new byte[] {}, NodeExistsPolicy.OVERWRITE);
@@ -48,15 +47,15 @@ public class TransactionWatcher extends org.apache.accumulo.fate.zookeeper.Trans
     
     public static void stop(String type, long tid) throws KeeperException, InterruptedException {
       Instance instance = HdfsZooInstance.getInstance();
-      IZooReaderWriter writer = ZooReaderWriter.getInstance();
-      writer.recursiveDelete(ZooUtil.getRoot(instance) + "/" + type + "/" + tid, NodeMissingPolicy.SKIP);
+      CuratorReaderWriter writer = CuratorReaderWriter.getInstance();
+      writer.recursiveDelete(ZooUtil.getRoot(instance) + "/" + type + "/" + tid);
     }
     
     public static void cleanup(String type, long tid) throws KeeperException, InterruptedException {
       Instance instance = HdfsZooInstance.getInstance();
-      IZooReaderWriter writer = ZooReaderWriter.getInstance();
-      writer.recursiveDelete(ZooUtil.getRoot(instance) + "/" + type + "/" + tid, NodeMissingPolicy.SKIP);
-      writer.recursiveDelete(ZooUtil.getRoot(instance) + "/" + type + "/" + tid + "-running", NodeMissingPolicy.SKIP);
+      CuratorReaderWriter writer = CuratorReaderWriter.getInstance();
+      writer.recursiveDelete(ZooUtil.getRoot(instance) + "/" + type + "/" + tid);
+      writer.recursiveDelete(ZooUtil.getRoot(instance) + "/" + type + "/" + tid + "-running");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooCache.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooCache.java b/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooCache.java
index e9c4320..8418063 100644
--- a/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooCache.java
+++ b/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooCache.java
@@ -18,11 +18,11 @@ package org.apache.accumulo.server.zookeeper;
 
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
-import org.apache.accumulo.server.curator.CuratorUtil;
+import org.apache.accumulo.server.conf.ServerConfiguration;
 
-public class ZooCache extends org.apache.accumulo.fate.zookeeper.ZooCache {
+public class ZooCache extends org.apache.accumulo.fate.curator.CuratorCaches {
   public ZooCache() {
-    super(CuratorUtil.getInstance());
+    this(ServerConfiguration.getSiteConfiguration());
   }
   
   public ZooCache(AccumuloConfiguration conf) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java b/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java
index dce6d38..f65410a 100644
--- a/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java
+++ b/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooLock.java
@@ -16,19 +16,20 @@
  */
 package org.apache.accumulo.server.zookeeper;
 
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.zookeeper.KeeperException;
 
 public class ZooLock extends org.apache.accumulo.fate.zookeeper.ZooLock {
   
   public ZooLock(String path) {
-    super(new ZooCache(), ZooReaderWriter.getInstance(), path);
+    super(new ZooCache(), CuratorReaderWriter.getInstance(), path);
   }
   
   public static void deleteLock(String path) throws InterruptedException, KeeperException {
-    deleteLock(ZooReaderWriter.getInstance(), path);
+    deleteLock(CuratorReaderWriter.getInstance(), path);
   }
   
   public static boolean deleteLock(String path, String lockData) throws InterruptedException, KeeperException {
-    return deleteLock(ZooReaderWriter.getInstance(), path, lockData);
+    return deleteLock(CuratorReaderWriter.getInstance(), path, lockData);
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooQueueLock.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooQueueLock.java b/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooQueueLock.java
index 93a0460..7ce2a76 100644
--- a/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooQueueLock.java
+++ b/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooQueueLock.java
@@ -20,12 +20,13 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.locks.Lock;
 
 import org.apache.accumulo.fate.zookeeper.DistributedReadWriteLock;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.zookeeper.KeeperException;
 
 public class ZooQueueLock extends org.apache.accumulo.fate.zookeeper.ZooQueueLock {
   
   public ZooQueueLock(String path, boolean ephemeral) throws KeeperException, InterruptedException {
-    super(ZooReaderWriter.getRetryingInstance(), path, ephemeral);
+    super(CuratorReaderWriter.getInstance(), path, ephemeral);
   }
   
   public static void main(String args[]) throws InterruptedException, KeeperException {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriter.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriter.java b/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriter.java
deleted file mode 100644
index 70ba661..0000000
--- a/server/src/main/java/org/apache/accumulo/server/zookeeper/ZooReaderWriter.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.accumulo.server.zookeeper;
-
-import java.lang.reflect.InvocationHandler;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-
-import org.apache.accumulo.core.conf.AccumuloConfiguration;
-import org.apache.accumulo.core.conf.Property;
-import org.apache.accumulo.fate.util.UtilWaitThread;
-import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
-import org.apache.accumulo.server.conf.ServerConfiguration;
-import org.apache.log4j.Logger;
-import org.apache.zookeeper.KeeperException;
-
-public class ZooReaderWriter extends org.apache.accumulo.fate.zookeeper.ZooReaderWriter {
-  private static final String SCHEME = "digest";
-  private static final String USER = "accumulo";
-  private static ZooReaderWriter instance = null;
-  private static IZooReaderWriter retryingInstance = null;
-  
-  public ZooReaderWriter(String string, int timeInMillis, String secret) {
-    super(string, timeInMillis, SCHEME, (USER + ":" + secret).getBytes());
-  }
-  
-  public static synchronized ZooReaderWriter getInstance() {
-    if (instance == null) {
-      AccumuloConfiguration conf = ServerConfiguration.getSiteConfiguration();
-      instance = new ZooReaderWriter(conf.get(Property.INSTANCE_ZK_HOST), (int) conf.getTimeInMillis(Property.INSTANCE_ZK_TIMEOUT),
-          conf.get(Property.INSTANCE_SECRET));
-    }
-    return instance;
-  }
-  
-  /**
-   * get an instance that retries when zookeeper connection errors occur
-   * 
-   * @return an instance that retries when Zookeeper connection errors occur.
-   */
-  public static synchronized IZooReaderWriter getRetryingInstance() {
-    
-    if (retryingInstance == null) {
-      final IZooReaderWriter inst = getInstance();
-      
-      InvocationHandler ih = new InvocationHandler() {
-        @Override
-        public Object invoke(Object obj, Method method, Object[] args) throws Throwable {
-          long retryTime = 250;
-          while (true) {
-            try {
-              return method.invoke(inst, args);
-            } catch (InvocationTargetException e) {
-              if (e.getCause() instanceof KeeperException.ConnectionLossException) {
-                Logger.getLogger(ZooReaderWriter.class).warn("Error connecting to zookeeper, will retry in " + retryTime, e.getCause());
-                UtilWaitThread.sleep(retryTime);
-                retryTime = Math.min(5000, retryTime + 250);
-              } else {
-                throw e.getCause();
-              }
-            }
-          }
-        }
-      };
-      
-      retryingInstance = (IZooReaderWriter) Proxy.newProxyInstance(ZooReaderWriter.class.getClassLoader(), new Class[] {IZooReaderWriter.class}, ih);
-    }
-    
-    return retryingInstance;
-  }
-}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/test/java/org/apache/accumulo/server/client/BulkImporterTest.java
----------------------------------------------------------------------
diff --git a/server/src/test/java/org/apache/accumulo/server/client/BulkImporterTest.java b/server/src/test/java/org/apache/accumulo/server/client/BulkImporterTest.java
index 451a079..0d31bf6 100644
--- a/server/src/test/java/org/apache/accumulo/server/client/BulkImporterTest.java
+++ b/server/src/test/java/org/apache/accumulo/server/client/BulkImporterTest.java
@@ -23,8 +23,6 @@ import java.util.Map;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
-import org.junit.Assert;
-
 import org.apache.accumulo.core.client.AccumuloException;
 import org.apache.accumulo.core.client.AccumuloSecurityException;
 import org.apache.accumulo.core.client.TableNotFoundException;
@@ -44,6 +42,7 @@ import org.apache.commons.lang.NotImplementedException;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Text;
+import org.junit.Assert;
 import org.junit.Test;
 
 public class BulkImporterTest {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/test/java/org/apache/accumulo/server/iterators/MetadataBulkLoadFilterTest.java
----------------------------------------------------------------------
diff --git a/server/src/test/java/org/apache/accumulo/server/iterators/MetadataBulkLoadFilterTest.java b/server/src/test/java/org/apache/accumulo/server/iterators/MetadataBulkLoadFilterTest.java
index 79f8ec4..c901871 100644
--- a/server/src/test/java/org/apache/accumulo/server/iterators/MetadataBulkLoadFilterTest.java
+++ b/server/src/test/java/org/apache/accumulo/server/iterators/MetadataBulkLoadFilterTest.java
@@ -21,8 +21,6 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.TreeMap;
 
-import org.junit.Assert;
-
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.data.ByteSequence;
 import org.apache.accumulo.core.data.Key;
@@ -36,6 +34,7 @@ import org.apache.accumulo.core.util.ColumnFQ;
 import org.apache.accumulo.core.util.MetadataTable;
 import org.apache.accumulo.fate.zookeeper.TransactionWatcher.Arbitrator;
 import org.apache.hadoop.io.Text;
+import org.junit.Assert;
 import org.junit.Test;
 
 /**

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/test/java/org/apache/accumulo/server/master/DefaultMapTest.java
----------------------------------------------------------------------
diff --git a/server/src/test/java/org/apache/accumulo/server/master/DefaultMapTest.java b/server/src/test/java/org/apache/accumulo/server/master/DefaultMapTest.java
index efa39e7..2f14557 100644
--- a/server/src/test/java/org/apache/accumulo/server/master/DefaultMapTest.java
+++ b/server/src/test/java/org/apache/accumulo/server/master/DefaultMapTest.java
@@ -16,11 +16,12 @@
  */
 package org.apache.accumulo.server.master;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 import org.apache.accumulo.server.util.DefaultMap;
 import org.junit.Test;
 
-import static org.junit.Assert.*;
-
 public class DefaultMapTest {
   
   @Test

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java
----------------------------------------------------------------------
diff --git a/server/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java b/server/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java
index 2dddbc4..a353feb 100644
--- a/server/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java
+++ b/server/src/test/java/org/apache/accumulo/server/master/balancer/DefaultLoadBalancerTest.java
@@ -16,7 +16,10 @@
  */
 package org.apache.accumulo.server.master.balancer;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
 
 import java.net.InetSocketAddress;
 import java.util.ArrayList;
@@ -24,10 +27,10 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Map.Entry;
 import java.util.Set;
 import java.util.SortedMap;
 import java.util.TreeMap;
-import java.util.Map.Entry;
 
 import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
 import org.apache.accumulo.core.data.KeyExtent;
@@ -35,7 +38,6 @@ import org.apache.accumulo.core.master.thrift.TableInfo;
 import org.apache.accumulo.core.master.thrift.TabletServerStatus;
 import org.apache.accumulo.core.tabletserver.thrift.TabletStats;
 import org.apache.accumulo.core.util.AddressUtil;
-import org.apache.accumulo.server.master.balancer.DefaultLoadBalancer;
 import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.accumulo.server.master.state.TabletMigration;
 import org.apache.hadoop.io.Text;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/test/java/org/apache/accumulo/server/master/state/MergeInfoTest.java
----------------------------------------------------------------------
diff --git a/server/src/test/java/org/apache/accumulo/server/master/state/MergeInfoTest.java b/server/src/test/java/org/apache/accumulo/server/master/state/MergeInfoTest.java
index e1e2dd5..427f2ea 100644
--- a/server/src/test/java/org/apache/accumulo/server/master/state/MergeInfoTest.java
+++ b/server/src/test/java/org/apache/accumulo/server/master/state/MergeInfoTest.java
@@ -17,8 +17,6 @@
 package org.apache.accumulo.server.master.state;
 
 import org.apache.accumulo.core.data.KeyExtent;
-import org.apache.accumulo.server.master.state.MergeInfo;
-import org.apache.accumulo.server.master.state.MergeState;
 import org.apache.hadoop.io.DataInputBuffer;
 import org.apache.hadoop.io.DataOutputBuffer;
 import org.apache.hadoop.io.Text;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/test/java/org/apache/accumulo/server/security/handler/ZKAuthenticatorTest.java
----------------------------------------------------------------------
diff --git a/server/src/test/java/org/apache/accumulo/server/security/handler/ZKAuthenticatorTest.java b/server/src/test/java/org/apache/accumulo/server/security/handler/ZKAuthenticatorTest.java
index 9700c8a..9619007 100644
--- a/server/src/test/java/org/apache/accumulo/server/security/handler/ZKAuthenticatorTest.java
+++ b/server/src/test/java/org/apache/accumulo/server/security/handler/ZKAuthenticatorTest.java
@@ -19,14 +19,13 @@ package org.apache.accumulo.server.security.handler;
 import java.util.Set;
 import java.util.TreeSet;
 
+import junit.framework.TestCase;
+
 import org.apache.accumulo.core.client.AccumuloException;
 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.core.util.ByteArraySet;
-import org.apache.accumulo.server.security.handler.ZKSecurityTool;
-
-import junit.framework.TestCase;
 
 public class ZKAuthenticatorTest extends TestCase {
   public void testPermissionIdConversions() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/test/java/org/apache/accumulo/server/util/DefaultMapTest.java
----------------------------------------------------------------------
diff --git a/server/src/test/java/org/apache/accumulo/server/util/DefaultMapTest.java b/server/src/test/java/org/apache/accumulo/server/util/DefaultMapTest.java
index b68d412..b7e97b7 100644
--- a/server/src/test/java/org/apache/accumulo/server/util/DefaultMapTest.java
+++ b/server/src/test/java/org/apache/accumulo/server/util/DefaultMapTest.java
@@ -16,11 +16,11 @@
  */
 package org.apache.accumulo.server.util;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 import java.util.concurrent.atomic.AtomicInteger;
 
-import org.apache.accumulo.server.util.DefaultMap;
 import org.junit.Test;
 
 public class DefaultMapTest {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/test/java/org/apache/accumulo/server/util/time/BaseRelativeTimeTest.java
----------------------------------------------------------------------
diff --git a/server/src/test/java/org/apache/accumulo/server/util/time/BaseRelativeTimeTest.java b/server/src/test/java/org/apache/accumulo/server/util/time/BaseRelativeTimeTest.java
index fdedd84..6039f35 100644
--- a/server/src/test/java/org/apache/accumulo/server/util/time/BaseRelativeTimeTest.java
+++ b/server/src/test/java/org/apache/accumulo/server/util/time/BaseRelativeTimeTest.java
@@ -16,10 +16,9 @@
  */
 package org.apache.accumulo.server.util.time;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
-import org.apache.accumulo.server.util.time.BaseRelativeTime;
-import org.apache.accumulo.server.util.time.ProvidesTime;
 import org.junit.Test;
 
 public class BaseRelativeTimeTest {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/test/src/main/java/org/apache/accumulo/test/TestIngest.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/TestIngest.java b/test/src/main/java/org/apache/accumulo/test/TestIngest.java
index 73fa400..5b95fa3 100644
--- a/test/src/main/java/org/apache/accumulo/test/TestIngest.java
+++ b/test/src/main/java/org/apache/accumulo/test/TestIngest.java
@@ -43,7 +43,7 @@ import org.apache.accumulo.core.security.ColumnVisibility;
 import org.apache.accumulo.core.trace.DistributedTrace;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.accumulo.core.util.FastFormat;
-import org.apache.accumulo.fate.zookeeper.ZooReader;
+import org.apache.accumulo.fate.curator.CuratorReader;
 import org.apache.accumulo.server.cli.ClientOnDefaultTable;
 import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.accumulo.trace.instrument.Trace;
@@ -184,7 +184,7 @@ public class TestIngest {
     Instance instance = opts.getInstance();
     
     String name = TestIngest.class.getSimpleName();
-    DistributedTrace.enable(instance, new ZooReader(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut()), name, null);
+    DistributedTrace.enable(instance, new CuratorReader(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut()), name, null);
     
     try {
       opts.startTracing(name);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/test/src/main/java/org/apache/accumulo/test/VerifyIngest.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/VerifyIngest.java b/test/src/main/java/org/apache/accumulo/test/VerifyIngest.java
index 935c3a7..d2fc8a0 100644
--- a/test/src/main/java/org/apache/accumulo/test/VerifyIngest.java
+++ b/test/src/main/java/org/apache/accumulo/test/VerifyIngest.java
@@ -31,7 +31,7 @@ import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.trace.DistributedTrace;
-import org.apache.accumulo.fate.zookeeper.ZooReader;
+import org.apache.accumulo.fate.curator.CuratorReader;
 import org.apache.accumulo.trace.instrument.Trace;
 import org.apache.hadoop.io.Text;
 import org.apache.log4j.Logger;
@@ -63,7 +63,7 @@ public class VerifyIngest {
     try {
       if (opts.trace) {
         String name = VerifyIngest.class.getSimpleName();
-        DistributedTrace.enable(instance, new ZooReader(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut()), name, null);
+        DistributedTrace.enable(instance, new CuratorReader(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut()), name, null);
         Trace.on(name);
         Trace.currentTrace().data("cmdLine", Arrays.asList(args).toString());
       }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/test/src/main/java/org/apache/accumulo/test/functional/CacheTestClean.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/CacheTestClean.java b/test/src/main/java/org/apache/accumulo/test/functional/CacheTestClean.java
index c522914..7c66a48 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/CacheTestClean.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/CacheTestClean.java
@@ -19,9 +19,7 @@ package org.apache.accumulo.test.functional;
 import java.io.File;
 import java.util.Arrays;
 
-import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 
 public class CacheTestClean {
   
@@ -32,10 +30,10 @@ public class CacheTestClean {
     String rootDir = args[0];
     File reportDir = new File(args[1]);
     
-    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     
     if (zoo.exists(rootDir)) {
-      zoo.recursiveDelete(rootDir, NodeMissingPolicy.FAIL);
+      zoo.recursiveDelete(rootDir);
     }
     
     if (!reportDir.exists()) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/test/src/main/java/org/apache/accumulo/test/functional/CacheTestReader.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/CacheTestReader.java b/test/src/main/java/org/apache/accumulo/test/functional/CacheTestReader.java
index 32555d5..18f4e4e 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/CacheTestReader.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/CacheTestReader.java
@@ -25,7 +25,7 @@ import java.util.TreeMap;
 import java.util.UUID;
 
 import org.apache.accumulo.core.util.UtilWaitThread;
-import org.apache.accumulo.fate.zookeeper.ZooCache;
+import org.apache.accumulo.fate.curator.CuratorCaches;
 
 public class CacheTestReader {
   public static void main(String[] args) throws Exception {
@@ -37,7 +37,7 @@ public class CacheTestReader {
     File myfile = new File(reportDir + "/" + UUID.randomUUID());
     myfile.deleteOnExit();
     
-    ZooCache zc = new ZooCache(keepers, 30000);
+    CuratorCaches zc = new CuratorCaches(keepers, 30000);
     
     while (true) {
       if (myfile.exists())

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/test/src/main/java/org/apache/accumulo/test/functional/CacheTestWriter.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/CacheTestWriter.java b/test/src/main/java/org/apache/accumulo/test/functional/CacheTestWriter.java
index 0c8afe6..56510a1 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/CacheTestWriter.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/CacheTestWriter.java
@@ -27,17 +27,15 @@ import java.util.TreeMap;
 import java.util.UUID;
 
 import org.apache.accumulo.core.util.UtilWaitThread;
-import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
+import org.apache.accumulo.fate.curator.CuratorReaderWriter.NodeExistsPolicy;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 
 public class CacheTestWriter {
   
   static final int NUM_DATA = 3;
   
   public static void main(String[] args) throws Exception {
-    IZooReaderWriter zk = ZooReaderWriter.getInstance();
+    CuratorReaderWriter zk = CuratorReaderWriter.getInstance();
     
     String rootDir = args[0];
     File reportDir = new File(args[1]);
@@ -74,7 +72,7 @@ public class CacheTestWriter {
         } else if (children.size() > 0) {
           int index = r.nextInt(children.size());
           String child = children.remove(index);
-          zk.recursiveDelete(rootDir + "/dir/" + child, NodeMissingPolicy.FAIL);
+          zk.recursiveDelete(rootDir + "/dir/" + child);
         }
         
         for (String child : children) {
@@ -104,7 +102,7 @@ public class CacheTestWriter {
           
         } else {
           if (dataSExists) {
-            zk.recursiveDelete(rootDir + "/dataS", NodeMissingPolicy.FAIL);
+            zk.recursiveDelete(rootDir + "/dataS");
             dataSExists = false;
           }
         }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/test/src/main/java/org/apache/accumulo/test/functional/SplitRecoveryTest.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/SplitRecoveryTest.java b/test/src/main/java/org/apache/accumulo/test/functional/SplitRecoveryTest.java
index ce31323..c19a005 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/SplitRecoveryTest.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/SplitRecoveryTest.java
@@ -40,12 +40,12 @@ import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.util.ColumnFQ;
 import org.apache.accumulo.core.util.MetadataTable.DataFileValue;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
-import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
+import org.apache.accumulo.fate.curator.CuratorReaderWriter.NodeExistsPolicy;
 import org.apache.accumulo.fate.zookeeper.ZooLock.LockLossReason;
 import org.apache.accumulo.fate.zookeeper.ZooLock.LockWatcher;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
 import org.apache.accumulo.server.ServerConstants;
 import org.apache.accumulo.server.client.HdfsZooInstance;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.fs.FileRef;
 import org.apache.accumulo.server.master.state.Assignment;
 import org.apache.accumulo.server.master.state.TServerInstance;
@@ -56,7 +56,6 @@ import org.apache.accumulo.server.util.FileUtil;
 import org.apache.accumulo.server.util.MetadataTable;
 import org.apache.accumulo.server.zookeeper.TransactionWatcher;
 import org.apache.accumulo.server.zookeeper.ZooLock;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.hadoop.io.Text;
 
 public class SplitRecoveryTest extends FunctionalTest {
@@ -83,7 +82,7 @@ public class SplitRecoveryTest extends FunctionalTest {
   @Override
   public void run() throws Exception {
     String zPath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + "/testLock";
-    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     zoo.putPersistentData(zPath, "".getBytes(), NodeExistsPolicy.OVERWRITE);
     ZooLock zl = new ZooLock(zPath);
     boolean gotLock = zl.tryLock(new LockWatcher() {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java b/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java
index 2afca25..dd6d732 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java
@@ -34,15 +34,15 @@ import org.apache.accumulo.core.util.ServerServices;
 import org.apache.accumulo.core.util.ServerServices.Service;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
+import org.apache.accumulo.fate.curator.CuratorReaderWriter.NodeExistsPolicy;
 import org.apache.accumulo.fate.zookeeper.ZooLock.LockLossReason;
 import org.apache.accumulo.fate.zookeeper.ZooLock.LockWatcher;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
 import org.apache.accumulo.server.client.HdfsZooInstance;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.util.TServerUtils;
 import org.apache.accumulo.server.util.TServerUtils.ServerPort;
 import org.apache.accumulo.server.zookeeper.TransactionWatcher;
 import org.apache.accumulo.server.zookeeper.ZooLock;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.accumulo.trace.instrument.Tracer;
 import org.apache.accumulo.trace.thrift.TInfo;
 import org.apache.log4j.Logger;
@@ -104,7 +104,7 @@ public class ZombieTServer {
     InetSocketAddress addr = new InetSocketAddress(InetAddress.getLocalHost(), serverPort.port);
     String addressString = AddressUtil.toString(addr);
     String zPath = ZooUtil.getRoot(instance) + Constants.ZTSERVERS + "/" + addressString;
-    ZooReaderWriter zoo = ZooReaderWriter.getInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     zoo.putPersistentData(zPath, new byte[] {}, NodeExistsPolicy.SKIP);
     
     ZooLock zlock = new ZooLock(zPath);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/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 4bffee8..ae71d17 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
@@ -26,7 +26,7 @@ import java.util.Set;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
-import org.apache.accumulo.fate.zookeeper.ZooReader;
+import org.apache.accumulo.fate.curator.CuratorReader;
 import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.accumulo.server.util.AddressUtil;
 import org.apache.accumulo.test.randomwalk.State;
@@ -38,7 +38,7 @@ 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());
+    CuratorReader rdr = new CuratorReader(instance.getZooKeepers(), instance.getZooKeepersSessionTimeOut());
     String base = ZooUtil.getRoot(instance) + Constants.ZTSERVERS;
     for (String child : rdr.getChildren(base)) {
       try {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/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 d29ad6d..0c3d467 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
@@ -20,6 +20,7 @@ import java.lang.reflect.Field;
 import java.util.Collections;
 import java.util.List;
 
+import org.apache.accumulo.fate.curator.CuratorReaderWriter;
 import org.apache.accumulo.fate.zookeeper.ZooLock.AsyncLockWatcher;
 import org.apache.accumulo.fate.zookeeper.ZooLock.LockLossReason;
 import org.apache.accumulo.minicluster.MiniAccumuloCluster;
@@ -109,7 +110,7 @@ public class ZooLockTest {
     
     Assert.assertFalse(zl.isLocked());
     
-    ZooReaderWriter zk = ZooReaderWriter.getInstance(accumulo.getConfig().getZooKeepers(), 30000, "digest", "secret".getBytes());
+    CuratorReaderWriter zk = CuratorReaderWriter.getInstance(accumulo.getConfig().getZooKeepers(), 30000, "digest", "secret".getBytes());
     
     // intentionally created parent after lock
     zk.mkdirs(parent);
@@ -160,7 +161,7 @@ public class ZooLockTest {
     
     String parent = "/zltest-" + this.hashCode() + "-l" + pdCount++;
     
-    ZooReaderWriter zk = ZooReaderWriter.getInstance(accumulo.getConfig().getZooKeepers(), 30000, "digest", "secret".getBytes());
+    CuratorReaderWriter zk = CuratorReaderWriter.getInstance(accumulo.getConfig().getZooKeepers(), 30000, "digest", "secret".getBytes());
     zk.mkdirs(parent);
     
     ZooLock zl = new ZooLock(accumulo.getConfig().getZooKeepers(), 30000, "digest", "secret".getBytes(), parent);
@@ -193,7 +194,7 @@ public class ZooLockTest {
     
     String parent = "/zltest-" + this.hashCode() + "-l" + pdCount++;
     
-    ZooReaderWriter zk = ZooReaderWriter.getInstance(accumulo.getConfig().getZooKeepers(), 30000, "digest", "secret".getBytes());
+    CuratorReaderWriter zk = CuratorReaderWriter.getInstance(accumulo.getConfig().getZooKeepers(), 30000, "digest", "secret".getBytes());
     zk.mkdirs(parent);
     
     ZooLock zl = new ZooLock(accumulo.getConfig().getZooKeepers(), 30000, "digest", "secret".getBytes(), parent);


Mime
View raw message