accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [11/16] Incomplete, but needs to be checkpointed
Date Mon, 22 Sep 2014 20:48:11 GMT
http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/master/TabletGroupWatcher.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/TabletGroupWatcher.java b/server/src/main/java/org/apache/accumulo/server/master/TabletGroupWatcher.java
index 37f519e..a7fb4c9 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/TabletGroupWatcher.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/TabletGroupWatcher.java
@@ -24,11 +24,11 @@ import java.util.HashMap;
 import java.util.Iterator;
 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.TreeSet;
-import java.util.Map.Entry;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.AccumuloException;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/master/balancer/TabletBalancer.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/balancer/TabletBalancer.java b/server/src/main/java/org/apache/accumulo/server/master/balancer/TabletBalancer.java
index d6dce2f..4a9e769 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/balancer/TabletBalancer.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/balancer/TabletBalancer.java
@@ -22,7 +22,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.SortedMap;
 
-import org.apache.accumulo.trace.instrument.Tracer;
 import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.master.thrift.TabletServerStatus;
@@ -34,6 +33,7 @@ import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.accumulo.server.master.state.TabletMigration;
 import org.apache.accumulo.server.security.SecurityConstants;
+import org.apache.accumulo.trace.instrument.Tracer;
 import org.apache.log4j.Logger;
 import org.apache.thrift.TException;
 import org.apache.thrift.transport.TTransportException;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/master/recovery/HadoopLogCloser.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/recovery/HadoopLogCloser.java b/server/src/main/java/org/apache/accumulo/server/master/recovery/HadoopLogCloser.java
index 2d79975..18c00da 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/recovery/HadoopLogCloser.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/recovery/HadoopLogCloser.java
@@ -20,8 +20,8 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 
 import org.apache.accumulo.core.conf.Property;
-import org.apache.accumulo.server.master.Master;
 import org.apache.accumulo.server.fs.VolumeManager;
+import org.apache.accumulo.server.master.Master;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.LocalFileSystem;
 import org.apache.hadoop.fs.Path;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/master/recovery/LogCloser.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/recovery/LogCloser.java b/server/src/main/java/org/apache/accumulo/server/master/recovery/LogCloser.java
index 42497ff..987b0c1 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/recovery/LogCloser.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/recovery/LogCloser.java
@@ -18,8 +18,8 @@ package org.apache.accumulo.server.master.recovery;
 
 import java.io.IOException;
 
-import org.apache.accumulo.server.master.Master;
 import org.apache.accumulo.server.fs.VolumeManager;
+import org.apache.accumulo.server.master.Master;
 import org.apache.hadoop.fs.Path;
 
 public interface LogCloser {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/master/recovery/MapRLogCloser.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/recovery/MapRLogCloser.java b/server/src/main/java/org/apache/accumulo/server/master/recovery/MapRLogCloser.java
index a5bb0c7..46388ad 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/recovery/MapRLogCloser.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/recovery/MapRLogCloser.java
@@ -18,8 +18,8 @@ package org.apache.accumulo.server.master.recovery;
 
 import java.io.IOException;
 
-import org.apache.accumulo.server.master.Master;
 import org.apache.accumulo.server.fs.VolumeManager;
+import org.apache.accumulo.server.master.Master;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.permission.FsPermission;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/master/state/DeadServerList.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/state/DeadServerList.java b/server/src/main/java/org/apache/accumulo/server/master/state/DeadServerList.java
index b2ea7d6..e39664c 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/state/DeadServerList.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/state/DeadServerList.java
@@ -20,10 +20,8 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.accumulo.core.master.thrift.DeadServer;
-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;
 import org.apache.log4j.Logger;
 import org.apache.zookeeper.data.Stat;
 
@@ -33,7 +31,7 @@ public class DeadServerList {
   
   public DeadServerList(String path) {
     this.path = path;
-    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     try {
       zoo.mkdirs(path);
     } catch (Exception ex) {
@@ -43,7 +41,7 @@ public class DeadServerList {
   
   public List<DeadServer> getList() {
     List<DeadServer> result = new ArrayList<DeadServer>();
-    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     try {
       List<String> children = zoo.getChildren(path);
       if (children != null) {
@@ -61,16 +59,16 @@ public class DeadServerList {
   }
   
   public void delete(String server) {
-    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     try {
-      zoo.recursiveDelete(path + "/" + server, NodeMissingPolicy.SKIP);
+      zoo.recursiveDelete(path + "/" + server);
     } catch (Exception ex) {
       log.error(ex, ex);
     }
   }
   
   public void post(String server, String cause) {
-    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     try {
       zoo.putPersistentData(path + "/" + server, cause.getBytes(), NodeExistsPolicy.SKIP);
     } catch (Exception ex) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/master/state/IllegalDSException.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/state/IllegalDSException.java b/server/src/main/java/org/apache/accumulo/server/master/state/IllegalDSException.java
index 872c2fa..ff3059f 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/state/IllegalDSException.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/state/IllegalDSException.java
@@ -16,7 +16,6 @@
  */
 package org.apache.accumulo.server.master.state;
 
-import org.apache.accumulo.server.master.state.DistributedStoreException;
 
 public class IllegalDSException extends DistributedStoreException {
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/master/state/MergeStats.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/state/MergeStats.java b/server/src/main/java/org/apache/accumulo/server/master/state/MergeStats.java
index 64172ee..24d1601 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/state/MergeStats.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/state/MergeStats.java
@@ -33,8 +33,8 @@ 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.server.cli.ClientOpts;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.master.state.TabletLocationState.BadLocationStateException;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.hadoop.io.DataInputBuffer;
 import org.apache.hadoop.io.Text;
 import org.apache.log4j.Logger;
@@ -244,8 +244,8 @@ public class MergeStats {
       String tableId = tableIdMap.get(table);
       String path = ZooUtil.getRoot(conn.getInstance().getInstanceID()) + Constants.ZTABLES + "/" + tableId.toString() + "/merge";
       MergeInfo info = new MergeInfo();
-      if (ZooReaderWriter.getInstance().exists(path)) {
-        byte[] data = ZooReaderWriter.getInstance().getData(path, new Stat());
+      if (CuratorReaderWriter.getInstance().exists(path)) {
+        byte[] data = CuratorReaderWriter.getInstance().getData(path, new Stat());
         DataInputBuffer in = new DataInputBuffer();
         in.reset(data, data.length);
         info.readFields(in);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/master/state/SetGoalState.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/state/SetGoalState.java b/server/src/main/java/org/apache/accumulo/server/master/state/SetGoalState.java
index 0d1b683..a461c63 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/state/SetGoalState.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/state/SetGoalState.java
@@ -20,12 +20,12 @@ import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.master.thrift.MasterGoalState;
 import org.apache.accumulo.core.security.SecurityUtil;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
+import org.apache.accumulo.fate.curator.CuratorReaderWriter.NodeExistsPolicy;
 import org.apache.accumulo.server.Accumulo;
 import org.apache.accumulo.server.client.HdfsZooInstance;
+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.zookeeper.ZooReaderWriter;
 
 public class SetGoalState {
   
@@ -41,7 +41,7 @@ public class SetGoalState {
 
     VolumeManager fs = VolumeManagerImpl.get();
     Accumulo.waitForZookeeperAndHdfs(fs);
-    ZooReaderWriter.getInstance().putPersistentData(ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZMASTER_GOAL_STATE, args[0].getBytes(),
+    CuratorReaderWriter.getInstance().putPersistentData(ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZMASTER_GOAL_STATE, args[0].getBytes(),
         NodeExistsPolicy.OVERWRITE);
   }
   

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/master/state/ZooStore.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/state/ZooStore.java b/server/src/main/java/org/apache/accumulo/server/master/state/ZooStore.java
index 6faeb1e..95b0771 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/state/ZooStore.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/state/ZooStore.java
@@ -20,12 +20,10 @@ import java.io.IOException;
 import java.util.List;
 
 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.client.HdfsZooInstance;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.zookeeper.ZooCache;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.curator.framework.recipes.cache.ChildData;
 import org.apache.log4j.Logger;
 
@@ -76,7 +74,7 @@ public class ZooStore implements DistributedStore {
   public void put(String path, byte[] bs) throws DistributedStoreException {
     try {
       path = relative(path);
-      ZooReaderWriter.getInstance().putPersistentData(path, bs, NodeExistsPolicy.OVERWRITE);
+      CuratorReaderWriter.getInstance().putPersistentData(path, bs, NodeExistsPolicy.OVERWRITE);
       cache.clear();
       log.debug("Wrote " + new String(bs) + " to " + path);
     } catch (Exception ex) {
@@ -89,9 +87,9 @@ public class ZooStore implements DistributedStore {
     try {
       log.debug("Removing " + path);
       path = relative(path);
-      IZooReaderWriter zoo = ZooReaderWriter.getInstance();
+      CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
       if (zoo.exists(path))
-        zoo.recursiveDelete(path, NodeMissingPolicy.SKIP);
+        zoo.recursiveDelete(path);
       cache.clear();
     } catch (Exception ex) {
       throw new DistributedStoreException(ex);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/master/state/tables/TableManager.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/state/tables/TableManager.java b/server/src/main/java/org/apache/accumulo/server/master/state/tables/TableManager.java
index 040d080..296ffb3 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/state/tables/TableManager.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/state/tables/TableManager.java
@@ -28,15 +28,13 @@ import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.master.state.tables.TableState;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
+import org.apache.accumulo.fate.curator.CuratorReaderWriter.Mutator;
+import org.apache.accumulo.fate.curator.CuratorReaderWriter.NodeExistsPolicy;
 import org.apache.accumulo.fate.curator.CuratorUtil;
-import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
-import org.apache.accumulo.fate.zookeeper.ZooReaderWriter.Mutator;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeMissingPolicy;
 import org.apache.accumulo.server.client.HdfsZooInstance;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.util.TablePropUtil;
 import org.apache.accumulo.server.zookeeper.ZooCache;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.recipes.cache.ChildData;
 import org.apache.curator.framework.recipes.cache.PathChildrenCacheEvent;
@@ -61,7 +59,7 @@ public class TableManager {
       throws KeeperException, InterruptedException {
     // state gets created last
     String zTablePath = Constants.ZROOT + "/" + instanceId + Constants.ZTABLES + "/" + tableId;
-    IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     zoo.putPersistentData(zTablePath, new byte[0], existsPolicy);
     zoo.putPersistentData(zTablePath + Constants.ZTABLE_CONF, new byte[0], existsPolicy);
     zoo.putPersistentData(zTablePath + Constants.ZTABLE_NAME, tableName.getBytes(), existsPolicy);
@@ -117,7 +115,7 @@ public class TableManager {
     String statePath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_STATE;
     
     try {
-      ZooReaderWriter.getRetryingInstance().mutate(statePath, (byte[]) newState.name().getBytes(), ZooUtil.PUBLIC, new Mutator() {
+      CuratorReaderWriter.getInstance().mutate(statePath, (byte[]) newState.name().getBytes(), false, new Mutator() {
         @Override
         public byte[] mutate(byte[] oldData) throws Exception {
           TableState oldState = TableState.UNKNOWN;
@@ -194,14 +192,14 @@ public class TableManager {
     prepareNewTableState(instance.getInstanceID(), tableId, tableName, TableState.NEW, existsPolicy);
     String srcTablePath = Constants.ZROOT + "/" + instance.getInstanceID() + Constants.ZTABLES + "/" + srcTable + Constants.ZTABLE_CONF;
     String newTablePath = Constants.ZROOT + "/" + instance.getInstanceID() + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_CONF;
-    ZooReaderWriter.getRetryingInstance().recursiveCopyPersistent(srcTablePath, newTablePath, NodeExistsPolicy.OVERWRITE);
+    CuratorReaderWriter.getInstance().recursiveCopyPersistent(srcTablePath, newTablePath, NodeExistsPolicy.OVERWRITE);
     
     for (Entry<String,String> entry : propertiesToSet.entrySet())
       TablePropUtil.setTableProperty(tableId, entry.getKey(), entry.getValue());
     
     for (String prop : propertiesToExclude)
-      ZooReaderWriter.getRetryingInstance().recursiveDelete(
-          Constants.ZROOT + "/" + instance.getInstanceID() + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_CONF + "/" + prop, NodeMissingPolicy.SKIP);
+      CuratorReaderWriter.getInstance().recursiveDelete(
+          Constants.ZROOT + "/" + instance.getInstanceID() + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_CONF + "/" + prop);
     
     updateTableStateCache(tableId);
   }
@@ -209,9 +207,8 @@ public class TableManager {
   public void removeTable(String tableId) throws KeeperException, InterruptedException {
     synchronized (tableStateCache) {
       tableStateCache.remove(tableId);
-      ZooReaderWriter.getRetryingInstance().recursiveDelete(ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_STATE,
-          NodeMissingPolicy.SKIP);
-      ZooReaderWriter.getRetryingInstance().recursiveDelete(ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + tableId, NodeMissingPolicy.SKIP);
+      CuratorReaderWriter.getInstance().recursiveDelete(ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_STATE);
+      CuratorReaderWriter.getInstance().recursiveDelete(ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + tableId);
     }
   }
   

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/master/tableOps/CancelCompactions.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/tableOps/CancelCompactions.java b/server/src/main/java/org/apache/accumulo/server/master/tableOps/CancelCompactions.java
index efddc79..eb6257d 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/tableOps/CancelCompactions.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/tableOps/CancelCompactions.java
@@ -19,11 +19,10 @@ package org.apache.accumulo.server.master.tableOps;
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.impl.thrift.TableOperation;
 import org.apache.accumulo.fate.Repo;
-import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
-import org.apache.accumulo.fate.zookeeper.ZooReaderWriter.Mutator;
+import org.apache.accumulo.fate.curator.CuratorReaderWriter.Mutator;
 import org.apache.accumulo.server.client.HdfsZooInstance;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.master.Master;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 
 class FinishCancelCompaction extends MasterRepo {
   private static final long serialVersionUID = 1L;
@@ -68,7 +67,7 @@ public class CancelCompactions extends MasterRepo {
     String zCancelID = Constants.ZROOT + "/" + HdfsZooInstance.getInstance().getInstanceID() + Constants.ZTABLES + "/" + tableId
         + Constants.ZTABLE_COMPACT_CANCEL_ID;
     
-    IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     
     byte[] currentValue = zoo.getData(zCompactID, null);
     
@@ -76,7 +75,7 @@ public class CancelCompactions extends MasterRepo {
     String[] tokens = cvs.split(",");
     final long flushID = Long.parseLong(new String(tokens[0]));
     
-    zoo.mutate(zCancelID, null, null, new Mutator() {
+    zoo.mutate(zCancelID, null, false, new Mutator() {
       @Override
       public byte[] mutate(byte[] currentValue) throws Exception {
         long cid = Long.parseLong(new String(currentValue));

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/master/tableOps/CloneTable.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/tableOps/CloneTable.java b/server/src/main/java/org/apache/accumulo/server/master/tableOps/CloneTable.java
index dc36087..b57b003 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/tableOps/CloneTable.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/tableOps/CloneTable.java
@@ -27,7 +27,7 @@ import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
 import org.apache.accumulo.core.master.state.tables.TableState;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.fate.Repo;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
+import org.apache.accumulo.fate.curator.CuratorReaderWriter.NodeExistsPolicy;
 import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.master.Master;
 import org.apache.accumulo.server.master.state.tables.TableManager;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java b/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java
index 5b0f489..5d98ed4 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/tableOps/CompactRange.java
@@ -45,14 +45,13 @@ import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.util.MetadataTable;
 import org.apache.accumulo.core.util.RootTable;
 import org.apache.accumulo.fate.Repo;
-import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
-import org.apache.accumulo.fate.zookeeper.ZooReaderWriter.Mutator;
+import org.apache.accumulo.fate.curator.CuratorReaderWriter.Mutator;
 import org.apache.accumulo.server.client.HdfsZooInstance;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.master.LiveTServerSet.TServerConnection;
 import org.apache.accumulo.server.master.Master;
 import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.accumulo.server.util.MapCounter;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.commons.codec.binary.Hex;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.io.Writable;
@@ -84,7 +83,7 @@ class CompactionDriver extends MasterRepo {
     String zCancelID = Constants.ZROOT + "/" + HdfsZooInstance.getInstance().getInstanceID() + Constants.ZTABLES + "/" + tableId
         + Constants.ZTABLE_COMPACT_CANCEL_ID;
     
-    IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     
     if (Long.parseLong(new String(zoo.getData(zCancelID, null))) >= compactId) {
       // compaction was canceled
@@ -303,10 +302,10 @@ public class CompactRange extends MasterRepo {
   public Repo<Master> call(final long tid, Master environment) throws Exception {
     String zTablePath = Constants.ZROOT + "/" + HdfsZooInstance.getInstance().getInstanceID() + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_COMPACT_ID;
     
-    IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     byte[] cid;
     try {
-      cid = zoo.mutate(zTablePath, null, null, new Mutator() {
+      cid = zoo.mutate(zTablePath, null, false, new Mutator() {
         @Override
         public byte[] mutate(byte[] currentValue) throws Exception {
           String cvs = new String(currentValue);
@@ -348,9 +347,9 @@ public class CompactRange extends MasterRepo {
   static void removeIterators(final long txid, String tableId) throws Exception {
     String zTablePath = Constants.ZROOT + "/" + HdfsZooInstance.getInstance().getInstanceID() + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_COMPACT_ID;
     
-    IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     
-    zoo.mutate(zTablePath, null, null, new Mutator() {
+    zoo.mutate(zTablePath, null, false, new Mutator() {
       @Override
       public byte[] mutate(byte[] currentValue) throws Exception {
         String cvs = new String(currentValue);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/master/tableOps/CreateTable.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/tableOps/CreateTable.java b/server/src/main/java/org/apache/accumulo/server/master/tableOps/CreateTable.java
index f69126a..abce1a9 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/tableOps/CreateTable.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/tableOps/CreateTable.java
@@ -30,7 +30,7 @@ import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.master.state.tables.TableState;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.fate.Repo;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
+import org.apache.accumulo.fate.curator.CuratorReaderWriter.NodeExistsPolicy;
 import org.apache.accumulo.server.ServerConstants;
 import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.accumulo.server.master.Master;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java b/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java
index f4f8cd0..349e6e0 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/tableOps/ImportTable.java
@@ -49,7 +49,7 @@ import org.apache.accumulo.core.master.state.tables.TableState;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.util.FastFormat;
 import org.apache.accumulo.fate.Repo;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
+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.fs.VolumeManager;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/master/tableOps/RenameTable.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/tableOps/RenameTable.java b/server/src/main/java/org/apache/accumulo/server/master/tableOps/RenameTable.java
index 0ca29cd..22103e2 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/tableOps/RenameTable.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/tableOps/RenameTable.java
@@ -24,10 +24,9 @@ import org.apache.accumulo.core.client.impl.thrift.TableOperationExceptionType;
 import org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.Repo;
-import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
-import org.apache.accumulo.fate.zookeeper.ZooReaderWriter.Mutator;
+import org.apache.accumulo.fate.curator.CuratorReaderWriter.Mutator;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.master.Master;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.log4j.Logger;
 
 public class RenameTable extends MasterRepo {
@@ -53,14 +52,14 @@ public class RenameTable extends MasterRepo {
     
     Instance instance = master.getInstance();
     
-    IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     Utils.tableNameLock.lock();
     try {
       Utils.checkTableDoesNotExist(instance, newTableName, tableId, TableOperation.RENAME);
       
       final String tap = ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + tableId + Constants.ZTABLE_NAME;
       
-      zoo.mutate(tap, null, null, new Mutator() {
+      zoo.mutate(tap, null, false, new Mutator() {
         public byte[] mutate(byte[] current) throws Exception {
           final String currentName = new String(current);
           if (currentName.equals(newTableName))

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/master/tableOps/Utils.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/tableOps/Utils.java b/server/src/main/java/org/apache/accumulo/server/master/tableOps/Utils.java
index d467119..ed16fd7 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/tableOps/Utils.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/tableOps/Utils.java
@@ -27,13 +27,12 @@ import org.apache.accumulo.core.client.impl.thrift.TableOperation;
 import org.apache.accumulo.core.client.impl.thrift.TableOperationExceptionType;
 import org.apache.accumulo.core.client.impl.thrift.ThriftTableOperationException;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
+import org.apache.accumulo.fate.curator.CuratorReaderWriter.Mutator;
 import org.apache.accumulo.fate.zookeeper.DistributedReadWriteLock;
-import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
-import org.apache.accumulo.fate.zookeeper.ZooReaderWriter.Mutator;
 import org.apache.accumulo.fate.zookeeper.ZooReservation;
 import org.apache.accumulo.server.client.HdfsZooInstance;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.zookeeper.ZooQueueLock;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.commons.codec.binary.Base64;
 import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
@@ -52,9 +51,9 @@ public class Utils {
     
     String tableId = null;
     try {
-      IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
+      CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
       final String ntp = ZooUtil.getRoot(instance) + Constants.ZTABLES;
-      byte[] nid = zoo.mutate(ntp, "0".getBytes(), ZooUtil.PUBLIC, new Mutator() {
+      byte[] nid = zoo.mutate(ntp, "0".getBytes(), false, new Mutator() {
         @Override
         public byte[] mutate(byte[] currentValue) throws Exception {
           BigInteger nextId = new BigInteger(new String(currentValue), Character.MAX_RADIX);
@@ -77,7 +76,7 @@ public class Utils {
     if (getLock(tableId, tid, writeLock).tryLock()) {
       if (tableMustExist) {
         Instance instance = HdfsZooInstance.getInstance();
-        IZooReaderWriter zk = ZooReaderWriter.getRetryingInstance();
+        CuratorReaderWriter zk = CuratorReaderWriter.getInstance();
         if (!zk.exists(ZooUtil.getRoot(instance) + Constants.ZTABLES + "/" + tableId))
           throw new ThriftTableOperationException(tableId, "", op, TableOperationExceptionType.NOTFOUND, "Table does not exists");
       }
@@ -97,7 +96,7 @@ public class Utils {
     
     String resvPath = ZooUtil.getRoot(instance) + Constants.ZHDFS_RESERVATIONS + "/" + new String(Base64.encodeBase64(directory.getBytes()));
     
-    IZooReaderWriter zk = ZooReaderWriter.getRetryingInstance();
+    CuratorReaderWriter zk = CuratorReaderWriter.getInstance();
     
     if (ZooReservation.attempt(zk, resvPath, String.format("%016x", tid), "")) {
       return 0;
@@ -108,7 +107,7 @@ public class Utils {
   public static void unreserveHdfsDirectory(String directory, long tid) throws KeeperException, InterruptedException {
     Instance instance = HdfsZooInstance.getInstance();
     String resvPath = ZooUtil.getRoot(instance) + Constants.ZHDFS_RESERVATIONS + "/" + new String(Base64.encodeBase64(directory.getBytes()));
-    ZooReservation.release(ZooReaderWriter.getRetryingInstance(), resvPath, String.format("%016x", tid));
+    ZooReservation.release(CuratorReaderWriter.getInstance(), resvPath, String.format("%016x", tid));
   }
   
   private static Lock getLock(String tableId, long tid, boolean writeLock) throws Exception {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/master/tserverOps/ShutdownTServer.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/master/tserverOps/ShutdownTServer.java b/server/src/main/java/org/apache/accumulo/server/master/tserverOps/ShutdownTServer.java
index d411ac4..ff49f34 100644
--- a/server/src/main/java/org/apache/accumulo/server/master/tserverOps/ShutdownTServer.java
+++ b/server/src/main/java/org/apache/accumulo/server/master/tserverOps/ShutdownTServer.java
@@ -21,15 +21,14 @@ import org.apache.accumulo.core.master.thrift.TabletServerStatus;
 import org.apache.accumulo.core.util.AddressUtil;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.Repo;
-import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
-import org.apache.accumulo.fate.zookeeper.ZooUtil.NodeExistsPolicy;
+import org.apache.accumulo.fate.curator.CuratorReaderWriter.NodeExistsPolicy;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.master.EventCoordinator.Listener;
 import org.apache.accumulo.server.master.LiveTServerSet.TServerConnection;
 import org.apache.accumulo.server.master.Master;
 import org.apache.accumulo.server.master.state.TServerInstance;
 import org.apache.accumulo.server.master.tableOps.MasterRepo;
 import org.apache.accumulo.server.zookeeper.ZooLock;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.log4j.Logger;
 import org.apache.thrift.transport.TTransportException;
 
@@ -58,7 +57,7 @@ public class ShutdownTServer extends MasterRepo {
       String path = ZooUtil.getRoot(master.getInstance()) + Constants.ZTSERVERS + "/" + tserver;
       ZooLock.deleteLock(path);
       path = ZooUtil.getRoot(master.getInstance()) + Constants.ZDEADTSERVERS + "/" + tserver;
-      IZooReaderWriter zoo = ZooReaderWriter.getInstance();
+      CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
       zoo.putPersistentData(path, "forced down".getBytes(), NodeExistsPolicy.OVERWRITE);
       return null;
     }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/metanalysis/FindTablet.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/metanalysis/FindTablet.java b/server/src/main/java/org/apache/accumulo/server/metanalysis/FindTablet.java
index f7e5de9..59fe331 100644
--- a/server/src/main/java/org/apache/accumulo/server/metanalysis/FindTablet.java
+++ b/server/src/main/java/org/apache/accumulo/server/metanalysis/FindTablet.java
@@ -18,13 +18,13 @@ package org.apache.accumulo.server.metanalysis;
 
 import java.util.Map.Entry;
 
-import org.apache.accumulo.server.cli.ClientOpts;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.util.TextUtil;
+import org.apache.accumulo.server.cli.ClientOpts;
 import org.apache.hadoop.io.Text;
 
 import com.beust.jcommander.Parameter;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/metanalysis/PrintEvents.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/metanalysis/PrintEvents.java b/server/src/main/java/org/apache/accumulo/server/metanalysis/PrintEvents.java
index 281c8f5..1d773cd 100644
--- a/server/src/main/java/org/apache/accumulo/server/metanalysis/PrintEvents.java
+++ b/server/src/main/java/org/apache/accumulo/server/metanalysis/PrintEvents.java
@@ -22,7 +22,6 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Map.Entry;
 
-import org.apache.accumulo.server.cli.ClientOpts;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.data.ColumnUpdate;
@@ -33,6 +32,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.util.MetadataTable;
+import org.apache.accumulo.server.cli.ClientOpts;
 import org.apache.accumulo.server.logger.LogFileValue;
 import org.apache.hadoop.io.Text;
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/monitor/servlets/TServersServlet.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/monitor/servlets/TServersServlet.java b/server/src/main/java/org/apache/accumulo/server/monitor/servlets/TServersServlet.java
index 095725e..b2bd882 100644
--- a/server/src/main/java/org/apache/accumulo/server/monitor/servlets/TServersServlet.java
+++ b/server/src/main/java/org/apache/accumulo/server/monitor/servlets/TServersServlet.java
@@ -27,7 +27,6 @@ import java.util.Map.Entry;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.accumulo.trace.instrument.Tracer;
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.master.thrift.DeadServer;
 import org.apache.accumulo.core.master.thrift.MasterMonitorInfo;
@@ -53,6 +52,7 @@ import org.apache.accumulo.server.monitor.util.celltypes.TServerLinkType;
 import org.apache.accumulo.server.monitor.util.celltypes.TableLinkType;
 import org.apache.accumulo.server.security.SecurityConstants;
 import org.apache.accumulo.server.tabletserver.TabletStatsKeeper;
+import org.apache.accumulo.trace.instrument.Tracer;
 import org.apache.commons.codec.binary.Base64;
 
 public class TServersServlet extends BasicServlet {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/Summary.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/Summary.java b/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/Summary.java
index 329cf4f..1d606c0 100644
--- a/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/Summary.java
+++ b/server/src/main/java/org/apache/accumulo/server/monitor/servlets/trace/Summary.java
@@ -23,7 +23,6 @@ import java.util.TreeMap;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.accumulo.trace.thrift.RemoteSpan;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Range;
@@ -34,6 +33,7 @@ import org.apache.accumulo.server.monitor.util.Table;
 import org.apache.accumulo.server.monitor.util.celltypes.DurationType;
 import org.apache.accumulo.server.monitor.util.celltypes.NumberType;
 import org.apache.accumulo.server.monitor.util.celltypes.StringType;
+import org.apache.accumulo.trace.thrift.RemoteSpan;
 import org.apache.hadoop.io.Text;
 
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/problems/ProblemReport.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/problems/ProblemReport.java b/server/src/main/java/org/apache/accumulo/server/problems/ProblemReport.java
index 6b32117..297e4e8 100644
--- a/server/src/main/java/org/apache/accumulo/server/problems/ProblemReport.java
+++ b/server/src/main/java/org/apache/accumulo/server/problems/ProblemReport.java
@@ -31,12 +31,11 @@ import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.util.Encoding;
 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.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.security.SecurityConstants;
 import org.apache.accumulo.server.util.MetadataTable;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.hadoop.io.Text;
 
 public class ProblemReport {
@@ -136,11 +135,11 @@ public class ProblemReport {
   
   void removeFromZooKeeper() throws Exception {
     String zpath = getZPath();
-    ZooReaderWriter.getInstance().recursiveDelete(zpath, NodeMissingPolicy.SKIP);
+    CuratorReaderWriter.getInstance().recursiveDelete(zpath);
   }
   
   void saveToZooKeeper() throws Exception {
-    ZooReaderWriter.getInstance().putPersistentData(getZPath(), encode(), NodeExistsPolicy.OVERWRITE);
+    CuratorReaderWriter.getInstance().putPersistentData(getZPath(), encode(), NodeExistsPolicy.OVERWRITE);
   }
   
   private String getZPath() throws IOException {
@@ -167,7 +166,7 @@ public class ProblemReport {
     String resource = dis.readUTF();
     
     String zpath = ZooUtil.getRoot(HdfsZooInstance.getInstance()) + Constants.ZPROBLEMS + "/" + node;
-    byte[] enc = ZooReaderWriter.getInstance().getData(zpath, null);
+    byte[] enc = CuratorReaderWriter.getInstance().getData(zpath, null);
     
     return new ProblemReport(tableName, ProblemType.valueOf(problemType), resource, enc);
     

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java b/server/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
index 6fbd377..6677cec 100644
--- a/server/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
+++ b/server/src/main/java/org/apache/accumulo/server/problems/ProblemReports.java
@@ -44,11 +44,10 @@ import org.apache.accumulo.core.util.LoggingRunnable;
 import org.apache.accumulo.core.util.NamingThreadFactory;
 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.server.client.HdfsZooInstance;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.security.SecurityConstants;
 import org.apache.accumulo.server.util.MetadataTable;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.commons.collections.map.LRUMap;
 import org.apache.hadoop.io.Text;
 import org.apache.log4j.Logger;
@@ -181,7 +180,7 @@ public class ProblemReports implements Iterable<ProblemReport> {
       
       return new Iterator<ProblemReport>() {
         
-        IZooReaderWriter zoo = ZooReaderWriter.getInstance();
+        CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
         private int iter1Count = 0;
         private Iterator<String> iter1;
         

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java b/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
index 7878cb9..74d6730 100644
--- a/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
+++ b/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthenticator.java
@@ -27,11 +27,9 @@ import org.apache.accumulo.core.client.impl.thrift.SecurityErrorCode;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.security.thrift.TCredentials;
-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.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.zookeeper.ZooCache;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.curator.framework.recipes.cache.ChildData;
 import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
@@ -62,11 +60,11 @@ public final class ZKAuthenticator implements Authenticator {
   public void initializeSecurity(TCredentials credentials, String principal, byte[] token) throws AccumuloSecurityException {
     try {
       // remove old settings from zookeeper first, if any
-      IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
+      CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
       synchronized (zooCache) {
         zooCache.clear();
         if (zoo.exists(ZKUserPath)) {
-          zoo.recursiveDelete(ZKUserPath, NodeMissingPolicy.SKIP);
+          zoo.recursiveDelete(ZKUserPath);
           log.info("Removed " + ZKUserPath + "/" + " from zookeeper");
         }
         
@@ -93,7 +91,7 @@ public final class ZKAuthenticator implements Authenticator {
   private void constructUser(String user, byte[] pass) throws KeeperException, InterruptedException {
     synchronized (zooCache) {
       zooCache.clear();
-      IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
+      CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
       zoo.putPrivatePersistentData(ZKUserPath + "/" + user, pass, NodeExistsPolicy.FAIL);
     }
   }
@@ -131,7 +129,7 @@ public final class ZKAuthenticator implements Authenticator {
     try {
       synchronized (zooCache) {
         zooCache.clear();
-        ZooReaderWriter.getRetryingInstance().recursiveDelete(ZKUserPath + "/" + user, NodeMissingPolicy.FAIL);
+        CuratorReaderWriter.getInstance().recursiveDelete(ZKUserPath + "/" + user);
       }
     } catch (InterruptedException e) {
       log.error(e, e);
@@ -153,7 +151,7 @@ public final class ZKAuthenticator implements Authenticator {
       try {
         synchronized (zooCache) {
           zooCache.clear(ZKUserPath + "/" + principal);
-          ZooReaderWriter.getRetryingInstance().putPrivatePersistentData(ZKUserPath + "/" + principal, ZKSecurityTool.createPass(pt.getPassword()),
+          CuratorReaderWriter.getInstance().putPrivatePersistentData(ZKUserPath + "/" + principal, ZKSecurityTool.createPass(pt.getPassword()),
               NodeExistsPolicy.OVERWRITE);
         }
       } catch (KeeperException e) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthorizor.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthorizor.java b/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthorizor.java
index 79e1fe7..2359ab8 100644
--- a/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthorizor.java
+++ b/server/src/main/java/org/apache/accumulo/server/security/handler/ZKAuthorizor.java
@@ -29,11 +29,9 @@ import org.apache.accumulo.core.security.SystemPermission;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.core.util.MetadataTable;
-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.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.zookeeper.ZooCache;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
 
@@ -74,7 +72,7 @@ public class ZKAuthorizor implements Authorizor {
   
   @Override
   public void initializeSecurity(TCredentials itw, String rootuser) throws AccumuloSecurityException {
-    IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     
     // create the root user with all system privileges, no table privileges, and no record-level authorizations
     Set<SystemPermission> rootPerms = new TreeSet<SystemPermission>();
@@ -105,7 +103,7 @@ public class ZKAuthorizor implements Authorizor {
    * @throws AccumuloSecurityException
    */
   public void initUser(String user) throws AccumuloSecurityException {
-    IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     try {
       zoo.putPersistentData(ZKUserPath + "/" + user, new byte[0], NodeExistsPolicy.SKIP);
     } catch (KeeperException e) {
@@ -121,8 +119,8 @@ public class ZKAuthorizor implements Authorizor {
   public void dropUser(String user) throws AccumuloSecurityException {
     try {
       synchronized (zooCache) {
-        IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
-        zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserAuths, NodeMissingPolicy.SKIP);
+        CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
+        zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserAuths);
         zooCache.clear(ZKUserPath + "/" + user);
       }
     } catch (InterruptedException e) {
@@ -142,7 +140,7 @@ public class ZKAuthorizor implements Authorizor {
     try {
       synchronized (zooCache) {
         zooCache.clear();
-        ZooReaderWriter.getRetryingInstance().putPersistentData(ZKUserPath + "/" + user + ZKUserAuths, ZKSecurityTool.convertAuthorizations(authorizations),
+        CuratorReaderWriter.getInstance().putPersistentData(ZKUserPath + "/" + user + ZKUserAuths, ZKSecurityTool.convertAuthorizations(authorizations),
             NodeExistsPolicy.OVERWRITE);
       }
     } catch (KeeperException e) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java b/server/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
index 398d023..7a934a0 100644
--- a/server/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
+++ b/server/src/main/java/org/apache/accumulo/server/security/handler/ZKPermHandler.java
@@ -31,11 +31,9 @@ import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.security.thrift.TCredentials;
 import org.apache.accumulo.core.util.MetadataTable;
 import org.apache.accumulo.core.util.RootTable;
-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.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.zookeeper.ZooCache;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.curator.framework.recipes.cache.ChildData;
 import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
@@ -75,14 +73,14 @@ public class ZKPermHandler implements PermissionHandler {
     byte[] serializedPerms;
     try {
       String path = ZKUserPath + "/" + user + ZKUserTablePerms + "/" + table;
-      ZooReaderWriter.getRetryingInstance().sync(path);
-      serializedPerms = ZooReaderWriter.getRetryingInstance().getData(path, null);
+      CuratorReaderWriter.getInstance().sync(path);
+      serializedPerms = CuratorReaderWriter.getInstance().getData(path, null);
     } catch (KeeperException e) {
       if (e.code() == Code.NONODE) {
         // maybe the table was just deleted?
         try {
           // check for existence:
-          ZooReaderWriter.getRetryingInstance().getData(ZKTablePath + "/" + table, null);
+          CuratorReaderWriter.getInstance().getData(ZKTablePath + "/" + table, null);
           // it's there, you don't have permission
           return false;
         } catch (InterruptedException ex) {
@@ -132,7 +130,7 @@ public class ZKPermHandler implements PermissionHandler {
       if (perms.add(permission)) {
         synchronized (zooCache) {
           zooCache.clear();
-          ZooReaderWriter.getRetryingInstance().putPersistentData(ZKUserPath + "/" + user + ZKUserSysPerms, ZKSecurityTool.convertSystemPermissions(perms),
+          CuratorReaderWriter.getInstance().putPersistentData(ZKUserPath + "/" + user + ZKUserSysPerms, ZKSecurityTool.convertSystemPermissions(perms),
               NodeExistsPolicy.OVERWRITE);
         }
       }
@@ -158,7 +156,7 @@ public class ZKPermHandler implements PermissionHandler {
       if (tablePerms.add(permission)) {
         synchronized (zooCache) {
           zooCache.clear(ZKUserPath + "/" + user + ZKUserTablePerms + "/" + table);
-          IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
+          CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
           zoo.putPersistentData(ZKUserPath + "/" + user + ZKUserTablePerms + "/" + table, ZKSecurityTool.convertTablePermissions(tablePerms),
               NodeExistsPolicy.OVERWRITE);
         }
@@ -186,7 +184,7 @@ public class ZKPermHandler implements PermissionHandler {
       if (sysPerms.remove(permission)) {
         synchronized (zooCache) {
           zooCache.clear();
-          ZooReaderWriter.getRetryingInstance().putPersistentData(ZKUserPath + "/" + user + ZKUserSysPerms, ZKSecurityTool.convertSystemPermissions(sysPerms),
+          CuratorReaderWriter.getInstance().putPersistentData(ZKUserPath + "/" + user + ZKUserSysPerms, ZKSecurityTool.convertSystemPermissions(sysPerms),
               NodeExistsPolicy.OVERWRITE);
         }
       }
@@ -211,9 +209,9 @@ public class ZKPermHandler implements PermissionHandler {
     try {
       if (tablePerms.remove(permission)) {
         zooCache.clear();
-        IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
+        CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
         if (tablePerms.size() == 0)
-          zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserTablePerms + "/" + table, NodeMissingPolicy.SKIP);
+          zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserTablePerms + "/" + table);
         else
           zoo.putPersistentData(ZKUserPath + "/" + user + ZKUserTablePerms + "/" + table, ZKSecurityTool.convertTablePermissions(tablePerms),
               NodeExistsPolicy.OVERWRITE);
@@ -232,9 +230,9 @@ public class ZKPermHandler implements PermissionHandler {
     try {
       synchronized (zooCache) {
         zooCache.clear();
-        IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
+        CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
         for (String user : zooCache.getChildKeys(ZKUserPath))
-          zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserTablePerms + "/" + table, NodeMissingPolicy.SKIP);
+          zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserTablePerms + "/" + table);
       }
     } catch (KeeperException e) {
       log.error(e, e);
@@ -247,7 +245,7 @@ public class ZKPermHandler implements PermissionHandler {
   
   @Override
   public void initializeSecurity(TCredentials itw, String rootuser) throws AccumuloSecurityException {
-    IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     
     // create the root user with all system privileges, no table privileges, and no record-level authorizations
     Set<SystemPermission> rootPerms = new TreeSet<SystemPermission>();
@@ -282,7 +280,7 @@ public class ZKPermHandler implements PermissionHandler {
    */
   @Override
   public void initUser(String user) throws AccumuloSecurityException {
-    IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     try {
       zoo.putPersistentData(ZKUserPath + "/" + user, new byte[0], NodeExistsPolicy.SKIP);
       zoo.putPersistentData(ZKUserPath + "/" + user + ZKUserTablePerms, new byte[0], NodeExistsPolicy.SKIP);
@@ -301,7 +299,7 @@ public class ZKPermHandler implements PermissionHandler {
   private void createTablePerm(String user, String table, Set<TablePermission> perms) throws KeeperException, InterruptedException {
     synchronized (zooCache) {
       zooCache.clear();
-      ZooReaderWriter.getRetryingInstance().putPersistentData(ZKUserPath + "/" + user + ZKUserTablePerms + "/" + table,
+      CuratorReaderWriter.getInstance().putPersistentData(ZKUserPath + "/" + user + ZKUserTablePerms + "/" + table,
           ZKSecurityTool.convertTablePermissions(perms), NodeExistsPolicy.FAIL);
     }
   }
@@ -310,9 +308,9 @@ public class ZKPermHandler implements PermissionHandler {
   public void cleanUser(String user) throws AccumuloSecurityException {
     try {
       synchronized (zooCache) {
-        IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
-        zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserSysPerms, NodeMissingPolicy.SKIP);
-        zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserTablePerms, NodeMissingPolicy.SKIP);
+        CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
+        zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserSysPerms);
+        zoo.recursiveDelete(ZKUserPath + "/" + user + ZKUserTablePerms);
         zooCache.clear(ZKUserPath + "/" + user);
       }
     } catch (InterruptedException e) {
@@ -332,8 +330,8 @@ public class ZKPermHandler implements PermissionHandler {
     byte[] perms;
     try {
       String path = ZKUserPath + "/" + user + ZKUserSysPerms;
-      ZooReaderWriter.getRetryingInstance().sync(path);
-      perms = ZooReaderWriter.getRetryingInstance().getData(path, null);
+      CuratorReaderWriter.getInstance().sync(path);
+      perms = CuratorReaderWriter.getInstance().getData(path, null);
     } catch (KeeperException e) {
       if (e.code() == Code.NONODE) {
         return false;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/tabletserver/MinorCompactor.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/tabletserver/MinorCompactor.java b/server/src/main/java/org/apache/accumulo/server/tabletserver/MinorCompactor.java
index 4f8f398..1d54ba7 100644
--- a/server/src/main/java/org/apache/accumulo/server/tabletserver/MinorCompactor.java
+++ b/server/src/main/java/org/apache/accumulo/server/tabletserver/MinorCompactor.java
@@ -29,13 +29,13 @@ import org.apache.accumulo.core.util.MetadataTable.DataFileValue;
 import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.conf.TableConfiguration;
+import org.apache.accumulo.server.fs.FileRef;
+import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.accumulo.server.problems.ProblemReport;
 import org.apache.accumulo.server.problems.ProblemReports;
 import org.apache.accumulo.server.problems.ProblemType;
 import org.apache.accumulo.server.tabletserver.Tablet.MinorCompactionReason;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.accumulo.server.fs.FileRef;
-import org.apache.accumulo.server.fs.VolumeManager;
 import org.apache.hadoop.fs.Path;
 import org.apache.log4j.Logger;
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java b/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
index 1f6f38b..d082a3e 100644
--- a/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
+++ b/server/src/main/java/org/apache/accumulo/server/tabletserver/Tablet.java
@@ -88,11 +88,11 @@ import org.apache.accumulo.core.util.MetadataTable.DataFileValue;
 import org.apache.accumulo.core.util.Pair;
 import org.apache.accumulo.core.util.RootTable;
 import org.apache.accumulo.core.util.UtilWaitThread;
-import org.apache.accumulo.fate.zookeeper.IZooReaderWriter;
 import org.apache.accumulo.server.ServerConstants;
 import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.conf.TableConfiguration;
 import org.apache.accumulo.server.constraints.ConstraintChecker;
+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;
@@ -118,7 +118,6 @@ import org.apache.accumulo.server.util.MapCounter;
 import org.apache.accumulo.server.util.MetadataTable;
 import org.apache.accumulo.server.util.MetadataTable.LogEntry;
 import org.apache.accumulo.server.util.TabletOperations;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader;
 import org.apache.accumulo.trace.instrument.Span;
 import org.apache.accumulo.trace.instrument.Trace;
@@ -781,7 +780,7 @@ public class Tablet {
     void bringMinorCompactionOnline(FileRef tmpDatafile, FileRef newDatafile, FileRef absMergeFile, DataFileValue dfv, CommitSession commitSession, long flushId)
         throws IOException {
       
-      IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
+      CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
       if (extent.isRootTablet()) {
         try {
           if (!zoo.isLockHeld(tabletServer.getLock().getLockID())) {
@@ -951,7 +950,7 @@ public class Tablet {
         
         t1 = System.currentTimeMillis();
         
-        IZooReaderWriter zoo = ZooReaderWriter.getRetryingInstance();
+        CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
         
         dataSourceDeletions.incrementAndGet();
         
@@ -2318,7 +2317,7 @@ public class Tablet {
     try {
       String zTablePath = Constants.ZROOT + "/" + HdfsZooInstance.getInstance().getInstanceID() + Constants.ZTABLES + "/" + extent.getTableId()
           + Constants.ZTABLE_FLUSH_ID;
-      return Long.parseLong(new String(ZooReaderWriter.getRetryingInstance().getData(zTablePath, null)));
+      return Long.parseLong(new String(CuratorReaderWriter.getInstance().getData(zTablePath, null)));
     } catch (InterruptedException e) {
       throw new RuntimeException(e);
     } catch (NumberFormatException nfe) {
@@ -2337,7 +2336,7 @@ public class Tablet {
         + Constants.ZTABLE_COMPACT_CANCEL_ID;
     
     try {
-      return Long.parseLong(new String(ZooReaderWriter.getRetryingInstance().getData(zTablePath, null)));
+      return Long.parseLong(new String(CuratorReaderWriter.getInstance().getData(zTablePath, null)));
     } catch (KeeperException e) {
       throw new RuntimeException(e);
     } catch (InterruptedException e) {
@@ -2350,7 +2349,7 @@ public class Tablet {
       String zTablePath = Constants.ZROOT + "/" + HdfsZooInstance.getInstance().getInstanceID() + Constants.ZTABLES + "/" + extent.getTableId()
           + Constants.ZTABLE_COMPACT_ID;
       
-      String[] tokens = new String(ZooReaderWriter.getRetryingInstance().getData(zTablePath, null)).split(",");
+      String[] tokens = new String(CuratorReaderWriter.getInstance().getData(zTablePath, null)).split(",");
       long compactID = Long.parseLong(tokens[0]);
       
       CompactionIterators iters = new CompactionIterators();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletIteratorEnvironment.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletIteratorEnvironment.java b/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletIteratorEnvironment.java
index 809ef4e..84fb087 100644
--- a/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletIteratorEnvironment.java
+++ b/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletIteratorEnvironment.java
@@ -25,8 +25,8 @@ import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.iterators.IteratorEnvironment;
-import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
 import org.apache.accumulo.core.iterators.IteratorUtil.IteratorScope;
+import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
 import org.apache.accumulo.core.iterators.system.MultiIterator;
 import org.apache.accumulo.core.util.MetadataTable.DataFileValue;
 import org.apache.accumulo.server.fs.FileRef;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java b/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
index 31bc0b9..211925b 100644
--- a/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
+++ b/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
@@ -129,16 +129,17 @@ import org.apache.accumulo.core.util.Stat;
 import org.apache.accumulo.core.util.ThriftUtil;
 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.curator.CuratorReaderWriter.NodeExistsPolicy;
+import org.apache.accumulo.fate.curator.CuratorUtil;
 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.Accumulo;
 import org.apache.accumulo.server.ServerConstants;
 import org.apache.accumulo.server.client.ClientServiceHandler;
 import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.conf.ServerConfiguration;
 import org.apache.accumulo.server.conf.TableConfiguration;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.accumulo.server.data.ServerMutation;
 import org.apache.accumulo.server.fs.FileRef;
 import org.apache.accumulo.server.fs.VolumeManager;
@@ -193,7 +194,6 @@ import org.apache.accumulo.server.zookeeper.DistributedWorkQueue;
 import org.apache.accumulo.server.zookeeper.TransactionWatcher;
 import org.apache.accumulo.server.zookeeper.ZooCache;
 import org.apache.accumulo.server.zookeeper.ZooLock;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.accumulo.start.Platform;
 import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader;
 import org.apache.accumulo.start.classloader.vfs.ContextManager;
@@ -1795,7 +1795,7 @@ public class TabletServer extends AbstractMetricsImpl implements org.apache.accu
       }
       
       if (lock != null) {
-        ZooUtil.LockID lid = new ZooUtil.LockID(ZooUtil.getRoot(instance) + Constants.ZMASTER_LOCK, lock);
+        CuratorUtil.LockID lid = new CuratorUtil.LockID(ZooUtil.getRoot(instance) + Constants.ZMASTER_LOCK, lock);
         
         try {
           if (!ZooLock.isLockHeld(masterLockCache, lid)) {
@@ -2661,7 +2661,7 @@ public class TabletServer extends AbstractMetricsImpl implements org.apache.accu
   }
   
   private void announceExistence() {
-    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     try {
       String zPath = ZooUtil.getRoot(instance) + Constants.ZTSERVERS + "/" + getClientAddressString();
       

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java b/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java
index 2fdc4cc..fd05cf9 100644
--- a/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java
+++ b/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServerResourceManager.java
@@ -35,7 +35,6 @@ import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicLong;
 
-import org.apache.accumulo.trace.instrument.TraceExecutorService;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
@@ -55,6 +54,7 @@ import org.apache.accumulo.server.tabletserver.Tablet.MajorCompactionReason;
 import org.apache.accumulo.server.tabletserver.Tablet.MinorCompactionReason;
 import org.apache.accumulo.server.util.time.SimpleTimer;
 import org.apache.accumulo.start.classloader.vfs.AccumuloVFSClassLoader;
+import org.apache.accumulo.trace.instrument.TraceExecutorService;
 import org.apache.log4j.Logger;
 
 /**

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/tabletserver/UniqueNameAllocator.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/tabletserver/UniqueNameAllocator.java b/server/src/main/java/org/apache/accumulo/server/tabletserver/UniqueNameAllocator.java
index 9629948..89239d3 100644
--- a/server/src/main/java/org/apache/accumulo/server/tabletserver/UniqueNameAllocator.java
+++ b/server/src/main/java/org/apache/accumulo/server/tabletserver/UniqueNameAllocator.java
@@ -20,9 +20,8 @@ import java.util.Random;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.util.FastFormat;
-import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.server.client.HdfsZooInstance;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 
 /**
  * Allocates unique names for an accumulo instance. The names are unique for the lifetime of the instance.
@@ -48,7 +47,7 @@ public class UniqueNameAllocator {
       final int allocate = 100 + rand.nextInt(100);
       
       try {
-        byte[] max = ZooReaderWriter.getRetryingInstance().mutate(nextNamePath, null, ZooUtil.PRIVATE, new ZooReaderWriter.Mutator() {
+        byte[] max = CuratorReaderWriter.getInstance().mutate(nextNamePath, null, true, new CuratorReaderWriter.Mutator() {
           public byte[] mutate(byte[] currentValue) throws Exception {
             long l = Long.parseLong(new String(currentValue), Character.MAX_RADIX);
             l += allocate;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/tabletserver/mastermessage/SplitReportMessage.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/tabletserver/mastermessage/SplitReportMessage.java b/server/src/main/java/org/apache/accumulo/server/tabletserver/mastermessage/SplitReportMessage.java
index 7b83576..e68a865 100644
--- a/server/src/main/java/org/apache/accumulo/server/tabletserver/mastermessage/SplitReportMessage.java
+++ b/server/src/main/java/org/apache/accumulo/server/tabletserver/mastermessage/SplitReportMessage.java
@@ -19,13 +19,13 @@ package org.apache.accumulo.server.tabletserver.mastermessage;
 import java.util.Map;
 import java.util.TreeMap;
 
-import org.apache.accumulo.trace.instrument.Tracer;
 import org.apache.accumulo.core.client.impl.Translator;
 import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
 import org.apache.accumulo.core.data.KeyExtent;
 import org.apache.accumulo.core.master.thrift.MasterClientService;
 import org.apache.accumulo.core.master.thrift.TabletSplit;
 import org.apache.accumulo.core.security.thrift.TCredentials;
+import org.apache.accumulo.trace.instrument.Tracer;
 import org.apache.hadoop.io.Text;
 import org.apache.thrift.TException;
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/tabletserver/mastermessage/TabletStatusMessage.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/tabletserver/mastermessage/TabletStatusMessage.java b/server/src/main/java/org/apache/accumulo/server/tabletserver/mastermessage/TabletStatusMessage.java
index 69dedbf..bddbb12 100644
--- a/server/src/main/java/org/apache/accumulo/server/tabletserver/mastermessage/TabletStatusMessage.java
+++ b/server/src/main/java/org/apache/accumulo/server/tabletserver/mastermessage/TabletStatusMessage.java
@@ -16,12 +16,12 @@
  */
 package org.apache.accumulo.server.tabletserver.mastermessage;
 
-import org.apache.accumulo.trace.instrument.Tracer;
 import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
 import org.apache.accumulo.core.data.KeyExtent;
-import org.apache.accumulo.core.master.thrift.TabletLoadState;
 import org.apache.accumulo.core.master.thrift.MasterClientService.Iface;
+import org.apache.accumulo.core.master.thrift.TabletLoadState;
 import org.apache.accumulo.core.security.thrift.TCredentials;
+import org.apache.accumulo.trace.instrument.Tracer;
 import org.apache.thrift.TException;
 
 public class TabletStatusMessage implements MasterMessage {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java b/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
index 67a55fa..4b5ad8e 100644
--- a/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
+++ b/server/src/main/java/org/apache/accumulo/server/trace/TraceServer.java
@@ -43,14 +43,13 @@ import org.apache.accumulo.core.trace.TraceFormatter;
 import org.apache.accumulo.core.util.AddressUtil;
 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.server.Accumulo;
 import org.apache.accumulo.server.client.HdfsZooInstance;
 import org.apache.accumulo.server.conf.ServerConfiguration;
+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.util.time.SimpleTimer;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
 import org.apache.accumulo.start.classloader.AccumuloClassLoader;
 import org.apache.accumulo.trace.instrument.Span;
 import org.apache.accumulo.trace.thrift.RemoteSpan;
@@ -249,7 +248,7 @@ public class TraceServer implements Watcher {
   
   private void registerInZooKeeper(String name) throws Exception {
     String root = ZooUtil.getRoot(serverConfiguration.getInstance()) + Constants.ZTRACERS;
-    IZooReaderWriter zoo = ZooReaderWriter.getInstance();
+    CuratorReaderWriter zoo = CuratorReaderWriter.getInstance();
     String path = zoo.putEphemeralSequential(root + "/trace-", name.getBytes());
     zoo.exists(path, this);
   }
@@ -279,7 +278,7 @@ public class TraceServer implements Watcher {
     }
     if (event.getPath() != null) {
       try {
-        if (ZooReaderWriter.getInstance().exists(event.getPath(), this))
+        if (CuratorReaderWriter.getInstance().exists(event.getPath(), this))
           return;
       } catch (Exception ex) {
         log.error(ex, ex);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java b/server/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java
index 0fd1c78..5e447c1 100644
--- a/server/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java
+++ b/server/src/main/java/org/apache/accumulo/server/util/ChangeSecret.java
@@ -25,13 +25,11 @@ import java.util.UUID;
 import org.apache.accumulo.core.client.Instance;
 import org.apache.accumulo.core.util.CachedConfiguration;
 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.ServerConstants;
 import org.apache.accumulo.server.cli.ClientOpts;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.zookeeper.ZooDefs.Ids;
@@ -70,10 +68,10 @@ public class ChangeSecret {
   }
   
   interface Visitor {
-    void visit(ZooReader zoo, String path) throws Exception;
+    void visit(CuratorReader zoo, String path) throws Exception;
   }
   
-  private static void recurse(ZooReader zoo, String root, Visitor v) {
+  private static void recurse(CuratorReader zoo, String root, Visitor v) {
     try {
       v.visit(zoo, root);
       for (String child : zoo.getChildren(root)) {
@@ -85,11 +83,11 @@ public class ChangeSecret {
   }
   
   private static boolean verifyAccumuloIsDown(Instance inst, String oldPassword) {
-    ZooReader zooReader = new ZooReaderWriter(inst.getZooKeepers(), inst.getZooKeepersSessionTimeOut(), oldPassword);
+    CuratorReader zooReader = CuratorReaderWriter.getInstance(inst.getZooKeepers(), inst.getZooKeepersSessionTimeOut(), oldPassword);
     String root = ZooUtil.getRoot(inst);
     final List<String> ephemerals = new ArrayList<String>();
     recurse(zooReader, root, new Visitor() {
-      public void visit(ZooReader zoo, String path) throws Exception {
+      public void visit(CuratorReader zoo, String path) throws Exception {
         Stat stat = zoo.getStatus(path);
         if (stat.getEphemeralOwner() != 0)
           ephemerals.add(path);
@@ -107,15 +105,15 @@ public class ChangeSecret {
   }
   
   private static String rewriteZooKeeperInstance(final Instance inst, String oldPass, String newPass) throws Exception {
-    final ZooReaderWriter orig = new ZooReaderWriter(inst.getZooKeepers(), inst.getZooKeepersSessionTimeOut(), oldPass);
-    final IZooReaderWriter new_ = new ZooReaderWriter(inst.getZooKeepers(), inst.getZooKeepersSessionTimeOut(), newPass);
+    final CuratorReaderWriter orig = CuratorReaderWriter.getInstance(inst.getZooKeepers(), inst.getZooKeepersSessionTimeOut(), oldPass);
+    final CuratorReaderWriter new_ = CuratorReaderWriter.getInstance(inst.getZooKeepers(), inst.getZooKeepersSessionTimeOut(), newPass);
     final String newInstanceId = UUID.randomUUID().toString();
     String root = ZooUtil.getRoot(inst);
     recurse(orig, root, new Visitor() {
-      public void visit(ZooReader zoo, String path) throws Exception {
+      public void visit(CuratorReader zoo, String path) throws Exception {
         String newPath = path.replace(inst.getInstanceID(), newInstanceId);
         byte[] data = zoo.getData(path, null);
-        List<ACL> acls = orig.getZooKeeper().getACL(path, new Stat());
+        List<ACL> acls = orig.getACL(path);
         if (acls.containsAll(Ids.READ_ACL_UNSAFE)) {
           new_.putPersistentData(newPath, data, NodeExistsPolicy.FAIL);
         } else {
@@ -136,7 +134,7 @@ public class ChangeSecret {
       }
     });
     String path = "/accumulo/instances/" + inst.getInstanceName();
-    orig.recursiveDelete(path, NodeMissingPolicy.SKIP);
+    orig.recursiveDelete(path);
     new_.putPersistentData(path, newInstanceId.getBytes(), NodeExistsPolicy.OVERWRITE);
     return newInstanceId;
   }
@@ -148,7 +146,7 @@ public class ChangeSecret {
   }
   
   private static void deleteInstance(Instance origInstance, String oldPass) throws Exception {
-    IZooReaderWriter orig = new ZooReaderWriter(origInstance.getZooKeepers(), origInstance.getZooKeepersSessionTimeOut(), oldPass);
-    orig.recursiveDelete("/accumulo/" + origInstance.getInstanceID(), NodeMissingPolicy.SKIP);
+    CuratorReaderWriter orig = CuratorReaderWriter.getInstance(origInstance.getZooKeepers(), origInstance.getZooKeepersSessionTimeOut(), oldPass);
+    orig.recursiveDelete("/accumulo/" + origInstance.getInstanceID());
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/e261f8f4/server/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java b/server/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java
index b7a90d3..a832313 100644
--- a/server/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java
+++ b/server/src/main/java/org/apache/accumulo/server/util/CleanZookeeper.java
@@ -20,10 +20,8 @@ import java.io.IOException;
 
 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.client.HdfsZooInstance;
-import org.apache.accumulo.server.zookeeper.ZooReaderWriter;
+import org.apache.accumulo.server.curator.CuratorReaderWriter;
 import org.apache.log4j.Logger;
 import org.apache.zookeeper.KeeperException;
 
@@ -34,9 +32,9 @@ public class CleanZookeeper {
   private static final Logger log = Logger.getLogger(CleanZookeeper.class);
   
   static class Opts extends Help {
-    @Parameter(names={"-z", "--keepers"}, description="comma separated list of zookeeper hosts")
+    @Parameter(names = {"-z", "--keepers"}, description = "comma separated list of zookeeper hosts")
     String keepers = "localhost:2181";
-    @Parameter(names={"--password"}, description="the system secret", password=true)
+    @Parameter(names = {"--password"}, description = "the system secret", password = true)
     String auth;
   }
   
@@ -51,10 +49,11 @@ public class CleanZookeeper {
     opts.parseArgs(CleanZookeeper.class.getName(), args);
     
     String root = Constants.ZROOT;
-    IZooReaderWriter zk = ZooReaderWriter.getInstance();
-    if (opts.auth != null) {
-      zk.getZooKeeper().addAuthInfo("digest", ("accumulo:"+opts.auth).getBytes());
-    }
+    CuratorReaderWriter zk;
+    if (opts.auth == null)
+      zk = CuratorReaderWriter.getInstance();
+    else
+      zk = CuratorReaderWriter.getInstance(opts.auth);
     
     try {
       for (String child : zk.getChildren(root)) {
@@ -64,7 +63,7 @@ public class CleanZookeeper {
             byte[] id = zk.getData(instanceNamePath, null);
             if (id != null && !new String(id).equals(HdfsZooInstance.getInstance().getInstanceID())) {
               try {
-                zk.recursiveDelete(instanceNamePath, NodeMissingPolicy.SKIP);
+                zk.recursiveDelete(instanceNamePath);
               } catch (KeeperException.NoAuthException ex) {
                 log.warn("Unable to delete " + instanceNamePath);
               }
@@ -73,7 +72,7 @@ public class CleanZookeeper {
         } else if (!child.equals(HdfsZooInstance.getInstance().getInstanceID())) {
           String path = root + "/" + child;
           try {
-            zk.recursiveDelete(path, NodeMissingPolicy.SKIP);
+            zk.recursiveDelete(path);
           } catch (KeeperException.NoAuthException ex) {
             log.warn("Unable to delete " + path);
           }


Mime
View raw message