Permalink
Browse files

First attempt.

  • Loading branch information...
1 parent 628ffdb commit ce139d981311c4b4e38c1b2e1e083345237e53e1 @dybdahl committed Dec 13, 2011
@@ -0,0 +1,11 @@
+package org.cloudname;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: dybdahl
+ * Date: 12/12/11
+ * Time: 12:10 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class StatusListener {
+}
@@ -1,55 +0,0 @@
-package org.cloudname.zk;
-
-import org.cloudname.CloudnameException;
-
-import org.apache.zookeeper.WatchedEvent;
-import org.apache.zookeeper.Watcher;
-import org.apache.zookeeper.Watcher.Event.EventType;
-import org.apache.zookeeper.ZooKeeper;
-import org.apache.zookeeper.CreateMode;
-import org.apache.zookeeper.ZooDefs.Ids;
-import org.apache.zookeeper.data.ACL;
-import org.apache.zookeeper.KeeperException;
-import org.apache.zookeeper.data.Stat;
-
-import java.util.List;
-import java.util.logging.Logger;
-
-/**
- * Various ZooKeeper utilities.
- *
- * @author borud
- */
-public class Util {
- private static final Logger log = Logger.getLogger(Util.class.getName());
- /**
- * Create a path in ZooKeeper. We just start at the top and work
- * our way down. Nodes that exist will throw an exception but we
- * will just ignore those. The result should be a path consisting
- * of ZooKeeper nodes with the names specified by the path and
- * with their data element set to null.
- */
- public static void mkdir(ZooKeeper zk, String path, List<ACL> acl)
- throws KeeperException
- {
- if (path.startsWith("/")) {
- path = path.substring(1);
- }
-
- String[] parts = path.split("/");
-
- String createPath = "";
- for (String p : parts) {
- createPath += "/" + p;
- try {
- zk.create(createPath, null, acl, CreateMode.PERSISTENT);
- } catch (KeeperException.NodeExistsException e) {
- // This is okay. Ignore.
- } catch (InterruptedException e) {
- // This may indicate a problem.
- throw new CloudnameException(e);
- }
- }
-
- }
-}
@@ -0,0 +1,11 @@
+package org.cloudname.zk;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: dybdahl
+ * Date: 12/12/11
+ * Time: 8:45 AM
+ * To change this template use File | Settings | File Templates.
+ */
+public class ZooKeeperWrapper {
+}

0 comments on commit ce139d9

Please sign in to comment.