You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by ha...@apache.org on 2018/07/16 04:30:35 UTC

[36/51] [partial] zookeeper git commit: Website update for release 3.4.13.

http://git-wip-us.apache.org/repos/asf/zookeeper/blob/c9914857/content/build/contrib/zktreeutil/src/ZkTreeUtil.cc
----------------------------------------------------------------------
diff --git a/content/build/contrib/zktreeutil/src/ZkTreeUtil.cc b/content/build/contrib/zktreeutil/src/ZkTreeUtil.cc
new file mode 100644
index 0000000..270bf31
--- /dev/null
+++ b/content/build/contrib/zktreeutil/src/ZkTreeUtil.cc
@@ -0,0 +1,705 @@
+/**
+ * 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.
+ */
+
+#include "ZkTreeUtil.h"
+
+#include <map>
+#include <iostream>
+#include <log4cxx/logger.h>
+#include <boost/algorithm/string.hpp>
+#include <boost/algorithm/string/split.hpp>
+
+namespace zktreeutil
+{
+    using std::map;
+    using std::pair;
+
+    static ZkTreeNodeSptr loadZkTree_ (ZooKeeperAdapterSptr zkHandle,
+            const string& path)
+    {
+        // Extract the node value
+        string value = zkHandle->getNodeData(path);
+
+        // Extract nodename from the path
+        string nodename = "/";
+        if (path != "/")
+        {
+            vector< string > nodes;
+            boost::split(nodes, path, boost::is_any_of ("/") );
+            nodename = nodes[nodes.size()-1];
+        }
+
+        // Create tree-node with name and value
+        ZkTreeNodeSptr nodeSptr = ZkTreeNodeSptr (new ZkTreeNode (nodename, value));
+        std::cerr << "[zktreeutil] loaded nodename: "
+            << nodename
+            << " value: "
+            << value
+            << std::endl;
+
+        // Load all the children
+        vector< string > cnodes = zkHandle->getNodeChildren (path);
+        for (unsigned i = 0; i < cnodes.size(); i++)
+            nodeSptr->addChild (loadZkTree_ (zkHandle, cnodes[i]));
+
+        // Return the constructed node
+        return nodeSptr;
+    }
+
+    static ZkTreeNodeSptr loadZkTreeXml_ (xmlNode* xmlNodePtr)
+    {
+        // Null check
+        if (xmlNodePtr == NULL)
+        {
+            std::cerr << "[zktreeutil] empty XML node encountered" << std::endl;
+            exit (-1);
+        }
+
+        // Get the node name
+        xmlChar* name = xmlGetProp (xmlNodePtr, BAD_CAST "name");
+        string nameStr = (const char*)name;
+        std::cerr << "[zktreeutil] node name: " << nameStr;
+        xmlFree (name);
+        // Get the node value
+        string valueStr;
+        xmlChar* value = xmlGetProp (xmlNodePtr, BAD_CAST "value");
+        if (value)
+        {
+            valueStr = (const char*)value;
+            std::cerr << " value: " << valueStr;
+        }
+        xmlFree (value);
+        // Get the ignore flag
+        bool doIgnore = false;
+        xmlChar* ignore = xmlGetProp (xmlNodePtr, BAD_CAST "ignore");
+        if (ignore)
+        {
+            string ignoreStr = (const char*) ignore;
+            if (ignoreStr == "true" || ignoreStr == "yes" || ignoreStr == "1")
+            {
+                doIgnore = true;
+                std::cerr << " <ignore:>";
+            }
+        }
+        xmlFree (ignore);
+        std::cerr << std::endl;
+
+        // Create the zk node
+        ZkTreeNodeSptr nodeSptr =
+            ZkTreeNodeSptr (new ZkTreeNode (nameStr,
+                        ZkNodeData (valueStr, doIgnore)));
+
+        // Load the children
+        for (xmlNode* chldNode = xmlNodePtr->children;
+                chldNode;
+                chldNode = chldNode->next)
+            if (chldNode->type == XML_ELEMENT_NODE)
+                nodeSptr->addChild (loadZkTreeXml_ (chldNode));
+
+        // Return the loaded node
+        return nodeSptr;
+    }
+
+    static void writeZkTree_ (ZooKeeperAdapterSptr zkHandle,
+            const ZkTreeNodeSptr zkNodeSptr,
+            const string& path)
+    {
+        // Create the path in zk-tree
+        zkHandle->createNode(path.c_str(), "", 0, false);
+        std::cerr << "[zktreeutil] created key: " << path << std::endl;
+        // Set value for the path
+        string value = zkNodeSptr->getData().value;
+        if (value != "")
+        {
+            zkHandle->setNodeData (path.c_str(), value.c_str());
+            std::cerr << "[zktreeutil] set value: " << std::endl;
+        }
+
+        // Go deep to write the subtree rooted in the node, if not to be ignored
+        if (!(zkNodeSptr->getData().ignoreUpdate))
+        {
+            for (unsigned i=0; i < zkNodeSptr->numChildren(); i++)
+            {
+                ZkTreeNodeSptr childNodeSptr = zkNodeSptr->getChild (i);
+                // Add the node name into the path and write in zk-tree
+                string cpath = ((path != "/")? path : "")
+                    + string("/")
+                    + childNodeSptr->getKey();
+                writeZkTree_ (zkHandle, childNodeSptr, cpath);
+            }
+        }
+
+        return;
+    }
+
+    static void addTreeZkAction_ (const ZkTreeNodeSptr zkNodeSptr,
+            const string& path,
+            vector< ZkAction >& actions)
+    {
+        // Create the key
+        actions.push_back (ZkAction (ZkAction::CREATE, path));
+
+        // Set value for the new key
+        if (zkNodeSptr->getData().value != "")
+            actions.push_back (ZkAction (ZkAction::VALUE,
+                        path,
+                        zkNodeSptr->getData().value));
+
+        // Add all the children
+        for (unsigned i=0; i < zkNodeSptr->numChildren(); i++)
+        {
+            ZkTreeNodeSptr childSptr = zkNodeSptr->getChild (i);
+            string cpath = path + string("/") + childSptr->getKey();
+            addTreeZkAction_ (childSptr, cpath, actions);
+        }
+
+        return;
+    }
+
+    static xmlNodePtr dumpZkTreeXml_ (const ZkTreeNodeSptr zkNodeSptr)
+    {
+        // Create xml node with zknode name and value
+        string nodename = zkNodeSptr->getKey ();
+        string value = zkNodeSptr->getData().value;
+        xmlNodePtr node = xmlNewNode(NULL, BAD_CAST "zknode");
+        xmlNewProp (node, BAD_CAST "name", BAD_CAST nodename.c_str());
+        if (value.length())
+            xmlNewProp (node, BAD_CAST "value", BAD_CAST value.c_str());
+
+        // Add all the children rotted at this node
+        for (unsigned i=0; i < zkNodeSptr->numChildren(); i++)
+            xmlAddChild (node, dumpZkTreeXml_ (zkNodeSptr->getChild (i)));
+
+        // Return xml node
+        return node;
+    }
+
+    static void dumpZkTree_ (const ZkTreeNodeSptr zkNodeSptr,
+            int maxLevel,
+            int level,
+            vector< bool >& masks)
+    {
+        // Check the max. dlevel to be dumped
+        if (level > maxLevel)
+            return;
+
+        
+        // Create branch
+        for (int i=0; i < level; i++) 
+        {
+            if ( i== level-1) std::cout << "|   ";
+            else if (masks[i]) std::cout << "    ";
+            else std::cout << "|   ";
+        }
+        std::cout << std::endl;
+        for (int i=0; i < level-1; i++)
+        {
+            if (masks[i]) std::cout << "    ";
+            else std::cout << "|   ";
+        }
+
+        // Dump the node name and value
+        std::cout << "|--[" << zkNodeSptr->getKey();
+        if (zkNodeSptr->getData().value != "")
+            std::cout << " => " << zkNodeSptr->getData().value;
+        std::cout << "]" << std::endl;
+
+        // Dump all the children
+        for (unsigned i=0; i < zkNodeSptr->numChildren(); i++)
+        {
+            // Add mask for last child
+            if (i == zkNodeSptr->numChildren()-1)
+                masks.push_back(true);
+            else
+                masks.push_back(false);
+            dumpZkTree_ (zkNodeSptr->getChild (i), maxLevel, level+1, masks);
+        }
+
+        masks.pop_back();
+        return;
+    }
+
+    static ZkTreeNodeSptr traverseBranch_ (const ZkTreeNodeSptr& zkRootSptr,
+            const string& path)
+    {
+        // Check if the tree is loaded into memory
+        if (zkRootSptr == NULL)
+        {
+            string errMsg = "[zktreeutil] null root passed for traversing";
+            std::cout << errMsg << std::endl;
+            throw std::logic_error (errMsg);
+        }
+
+        // Split the path and add intermediate znodes
+        vector< string > nodes;
+        boost::split(nodes, path, boost::is_any_of ("/") );
+
+        // Start traversing the tree
+        ZkTreeNodeSptr currNodeSptr = zkRootSptr;
+        for (unsigned znode_idx = 1; znode_idx < nodes.size(); znode_idx++)
+        {
+            bool found = false;
+            for (unsigned i=0; i < currNodeSptr->numChildren(); i++)
+            {
+                ZkTreeNodeSptr  childNodeSptr = currNodeSptr->getChild(i);
+                if (childNodeSptr->getKey() == nodes[znode_idx])
+                {
+                    // Found! go to the znode
+                    currNodeSptr = childNodeSptr;
+                    found = true;
+                    break;
+                }
+            }
+            if (!found) // No such znode found; return NULL node-ptr
+            {
+                string errMsg = string("[zktreeutil] unknown znode during traversal: ")
+                    + nodes[znode_idx];
+                std::cout << errMsg << std::endl;
+                throw std::logic_error (errMsg);
+            }
+        }
+
+        return currNodeSptr;
+    }
+
+    static ZkTreeNodeSptr createAncestors_ (const string& path)
+    {
+        // Create the root znode
+        ZkTreeNodeSptr zkRootSptr = ZkTreeNodeSptr (new ZkTreeNode ("/"));
+        ZkTreeNodeSptr currNodeSptr = zkRootSptr;
+        // Split the path and add intermediate znodes
+        vector< string > nodes;
+        boost::split(nodes, path, boost::is_any_of ("/") );
+        for (unsigned i=1; i < nodes.size()-1; i++)
+        {
+            ZkTreeNodeSptr childNodeSptr = ZkTreeNodeSptr (new ZkTreeNode (nodes[i]));
+            currNodeSptr->addChild (childNodeSptr);
+            currNodeSptr = childNodeSptr;
+        }
+
+        //Return the root of the branch
+        return zkRootSptr;
+    }
+
+    ZooKeeperAdapterSptr ZkTreeUtil::get_zkHandle (const string& zkHosts)
+    {
+        try
+        {
+            // Create an instance of ZK adapter.
+            ZooKeeperConfig config (zkHosts, 10000);
+            ZooKeeperAdapterSptr zkHandleSptr =
+                ZooKeeperAdapterSptr (new ZooKeeperAdapter (config));
+            return zkHandleSptr;
+        }
+        catch (const ZooKeeperException &e)
+        {
+            std::cerr << "[zktreeutil] zooKeeper exception caught: "
+                << e.what()
+                << std::endl;
+            throw;
+        }
+        catch (std::exception &stde)
+        {
+            std::cerr << "[zktreeutil] standard exception caught: "
+                << stde.what()
+                << std::endl;
+            throw;
+        }
+        catch (...)
+        {
+            std::cerr
+                << "[zktreeutil] unknown exception while connecting to zookeeper"
+                << std::endl;
+            throw;
+        }
+    }
+
+
+    void ZkTreeUtil::loadZkTree (const string& zkHosts,
+            const string& path,
+            bool force)
+    {
+        // Check if already loaded
+        if (loaded_ && !force)
+        {
+            std::cerr << "[zktreeutil] zk-tree already loaded into memory"
+                << std::endl;
+            return;
+        }
+
+        // Connect to ZK server
+        ZooKeeperAdapterSptr zkHandle = get_zkHandle (zkHosts);
+        std::cerr << "[zktreeutil] connected to ZK serverfor reading"
+            << std::endl;
+
+        // Check the existence of the path to znode
+        if (!zkHandle->nodeExists (path))
+        {
+            string errMsg = string("[zktreeutil] path does not exists : ") + path;
+            std::cout << errMsg << std::endl;
+            throw std::logic_error (errMsg);
+        }
+
+        // Load the rooted (sub)tree
+        ZkTreeNodeSptr zkSubrootSptr = loadZkTree_ (zkHandle, path);
+
+        //  Create the ancestors before loading the rooted subtree
+        if (path != "/")
+        {
+            zkRootSptr_ = createAncestors_(path);
+            string ppath = path.substr (0, path.rfind('/'));
+            ZkTreeNodeSptr parentSptr = traverseBranch_( zkRootSptr_, ppath);
+            parentSptr->addChild (zkSubrootSptr);
+        }
+        else // Loaded entire zk-tree
+        {
+            zkRootSptr_ = zkSubrootSptr;
+        }
+
+        // Set load flag
+        loaded_ = true;
+        return;
+    }
+
+    void ZkTreeUtil::loadZkTreeXml (const string& zkXmlConfig,
+            bool force)
+    {
+        // Check if already loaded
+        if (loaded_ && !force)
+        {
+            std::cerr << "[zktreeutil] zk-tree already loaded into memory"
+                << std::endl;
+            return;
+        }
+
+        // Parse the file and get the DOM
+        xmlDocPtr docPtr = xmlReadFile(zkXmlConfig.c_str(), NULL, 0);
+        if (docPtr == NULL) {
+            std::cerr << "[zktreeutil] could not parse XML file "
+                << zkXmlConfig
+                << std::endl;
+            exit (-1);
+        }
+        std::cerr << "[zktreeutil] zk-tree XML parsing successful"
+            << std::endl;
+
+        // Get the root element node
+        xmlNodePtr rootPtr = xmlDocGetRootElement(docPtr);
+        // Create the root zk node
+        zkRootSptr_ = ZkTreeNodeSptr (new ZkTreeNode ("/"));
+        // Load the rooted XML tree
+        for (xmlNode* chldNode = rootPtr->children;
+                chldNode;
+                chldNode = chldNode->next)
+        {
+            if (chldNode->type == XML_ELEMENT_NODE)
+                zkRootSptr_->addChild (loadZkTreeXml_ (chldNode));
+        }
+
+        // set oad flag
+        loaded_ = true;
+        // Cleanup stuff
+        xmlFreeDoc(docPtr);
+        xmlCleanupParser();
+        return;
+    }
+
+    void ZkTreeUtil::writeZkTree (const string& zkHosts,
+            const string& path,
+            bool force) const
+    {
+        // Connect to ZK server
+        ZooKeeperAdapterSptr zkHandle = get_zkHandle (zkHosts);
+        std::cerr << "[zktreeutil] connected to ZK server for writing"
+            << std::endl;
+
+        // Go to the rooted subtree
+        ZkTreeNodeSptr zkRootSptr = traverseBranch_ (zkRootSptr_, path);
+
+        // Cleanup before write if forceful write enabled
+        if (force)
+        {
+            if (path != "/") // remove the subtree rooted at the znode
+            {
+                // Delete the subtree rooted at the znode before write
+                if (zkHandle->nodeExists (path))
+                {
+                    std::cerr << "[zktreeutil] deleting subtree rooted at "
+                        << path
+                        << "..."
+                        << std::endl;
+                    zkHandle->deleteNode (path, true);
+                }
+            }
+            else // remove the rooted znodes
+            {
+                std::cerr << "[zktreeutil] deleting rooted zk-tree"
+                    << "..."
+                    << std::endl;
+                // Get the root's children
+                vector< string > cnodes = zkHandle->getNodeChildren ("/");
+                for (unsigned i=0; i < cnodes.size(); i++)
+                {
+                    if ( cnodes[i] != "/zookeeper") // reserved for zookeeper use
+                        zkHandle->deleteNode(cnodes[i], true);
+                }
+            }
+        }
+
+        // Start tree construction
+        writeZkTree_ (zkHandle, zkRootSptr, path);
+        return;
+    }
+
+    void ZkTreeUtil::dumpZkTree (bool xml, int depth) const
+    {
+        if (xml)
+        {
+            // Creates a new document, a node and set it as a root node
+            xmlDocPtr docPtr = xmlNewDoc(BAD_CAST "1.0");
+            xmlNodePtr rootNode = xmlNewNode(NULL, BAD_CAST "root");
+            xmlDocSetRootElement(docPtr, rootNode);
+
+            // Add all the rooted children
+            for (unsigned i=0; i < zkRootSptr_->numChildren(); i++)
+                xmlAddChild (rootNode, dumpZkTreeXml_ (zkRootSptr_->getChild (i)));
+
+            // Dumping document to stdio or file
+            xmlSaveFormatFileEnc("-", docPtr, "UTF-8", 1);
+
+            // Cleanup stuff
+            xmlFreeDoc(docPtr);
+            xmlCleanupParser();
+            return;
+        }
+
+        // Dump text
+        std::cout << "/" << std::endl;
+        vector< bool > masks;
+        for (unsigned i=0; i < zkRootSptr_->numChildren(); i++)
+        {
+            if (i == zkRootSptr_->numChildren()-1)
+                masks.push_back(true);
+            else
+                masks.push_back(false);
+            dumpZkTree_ (zkRootSptr_->getChild (i), depth, 1, masks);
+        }
+
+        return;
+    }
+
+    vector< ZkAction > ZkTreeUtil::diffZkTree (const string& zkHosts,
+            const string& path) const
+    {
+        // Action container
+        vector< ZkAction > actions;
+
+        if (!loaded_)
+        {
+            std::cout << "[zktreeutil] zk-tree not loaded for diff"
+                << std::endl;
+            exit (-1);
+        }
+
+        // Load the rooted subtree from zookeeper
+        ZooKeeperAdapterSptr zkHandle = get_zkHandle (zkHosts);
+        std::cerr << "[zktreeutil] connected to ZK server for reading"
+            << std::endl;
+        ZkTreeNodeSptr zkLiveRootSptr = loadZkTree_ (zkHandle, path);
+
+        // Go to the saved rooted subtree
+        ZkTreeNodeSptr zkLoadedRootSptr =
+            traverseBranch_ (zkRootSptr_, path);
+
+        // Check the root value first
+        if (zkLoadedRootSptr->getData().value
+                != zkLiveRootSptr->getData().value)
+        {
+            actions.push_back (ZkAction (ZkAction::VALUE,
+                        path,
+                        zkLoadedRootSptr->getData().value,
+                        zkLiveRootSptr->getData().value));
+        }
+
+        // Start traversal from root
+        vector< string > ppaths;
+        vector< pair< ZkTreeNodeSptr, ZkTreeNodeSptr > > commonNodes;
+        ppaths.push_back ((path != "/")? path : "");
+        commonNodes.push_back (pair< ZkTreeNodeSptr, ZkTreeNodeSptr >
+                (zkLoadedRootSptr, zkLiveRootSptr));
+
+        for (unsigned j=0; j < commonNodes.size(); j++)
+        {
+            // Get children of loaded tree
+            map< string, ZkTreeNodeSptr > loadedChildren;
+            for (unsigned i=0; i < commonNodes[j].first->numChildren(); i++)
+            {
+                ZkTreeNodeSptr childSptr = commonNodes[j].first->getChild (i);
+                loadedChildren[childSptr->getKey()] = childSptr;
+            }
+            // Get children of live tree
+            map< string, ZkTreeNodeSptr > liveChildren;
+            for (unsigned i=0; i < commonNodes[j].second->numChildren(); i++)
+            {
+                ZkTreeNodeSptr childSptr = commonNodes[j].second->getChild (i);
+                liveChildren[childSptr->getKey()] = childSptr;
+            }
+
+            // Start comparing the children
+            for (map< string, ZkTreeNodeSptr >::const_iterator it =
+                    loadedChildren.begin();
+                    it != loadedChildren.end();
+                    it++)
+            {
+                bool ignoreKey = it->second->getData().ignoreUpdate;
+                string loadedVal = it->second->getData().value;
+                // Path to this node
+                string path = ppaths[j] + string("/") + it->first;
+
+                map< string, ZkTreeNodeSptr >::const_iterator jt =
+                    liveChildren.find (it->first);
+                if (jt != liveChildren.end())
+                {
+                    // Key is present in live zk-tree
+                    string liveVal = jt->second->getData().value;
+                    // Check value for the key, if not ignored
+                    if (!ignoreKey)
+                    {
+                        if (loadedVal != liveVal)
+                        {
+                            // Value differs, set the new value for the key
+                            actions.push_back (ZkAction (ZkAction::VALUE,
+                                        path,
+                                        loadedVal,
+                                        liveVal));
+                        }
+
+                        // Add node to common nodes
+                        ppaths.push_back (path);
+                        commonNodes.push_back (pair< ZkTreeNodeSptr, ZkTreeNodeSptr >
+                                (it->second, jt->second));
+                    }
+
+                    // Remove the live zk node
+                    liveChildren.erase (it->first);
+                }
+                else
+                {
+                    // Add the subtree rooted to this node, if not ignored
+                    if (!ignoreKey)
+                        addTreeZkAction_ (it->second, path, actions);
+                }
+            }
+
+            // Remaining live zk nodes to be deleted
+            for (map< string, ZkTreeNodeSptr >::const_iterator it = liveChildren.begin();
+                    it != liveChildren.end(); it++)
+            {
+                string path = ppaths[j] + string("/") + it->first;
+                actions.push_back (ZkAction (ZkAction::DELETE, path));
+            }
+        }
+        // return the diff actions
+        return actions;
+    }
+
+    void ZkTreeUtil::executeZkActions (const string& zkHosts,
+            const vector< ZkAction >& zkActions,
+            int execFlags) const
+    {
+        // Execute the diff zk actions
+        if (zkActions.size())
+        {
+            // Connect to Zookeeper for writing
+            ZooKeeperAdapterSptr zkHandleSptr;
+            if ((execFlags & EXECUTE)
+                    || (execFlags & INTERACTIVE))
+            {
+                zkHandleSptr = get_zkHandle (zkHosts);
+                std::cerr << "[zktreeutil] connected to ZK server for writing"
+                    << std::endl;
+            }
+
+            for (unsigned i=0; i < zkActions.size(); i++)
+            {
+                if (zkActions[i].action == ZkAction::CREATE)
+                {
+                    if (execFlags & PRINT)
+                        std::cout << "CREAT- key:" << zkActions[i].key << std::endl;
+                    if (execFlags & EXECUTE)
+                    {
+                        if (execFlags & INTERACTIVE)
+                        {
+                            string resp;
+                            std::cout << "Execute this action?[yes/no]: ";
+                            std::getline(std::cin, resp);
+                            if (resp != "yes")
+                                continue;
+                        }
+                        zkHandleSptr->createNode(zkActions[i].key.c_str(), "", 0, false);
+                    }
+                }
+                else if (zkActions[i].action == ZkAction::DELETE)
+                {
+                    if (execFlags & PRINT)
+                        std::cout << "DELET- key:" << zkActions[i].key << std::endl;
+                    if (execFlags & EXECUTE)
+                    {
+                        if (execFlags & INTERACTIVE)
+                        {
+                            string resp;
+                            std::cout << "Execute this action?[yes/no]: ";
+                            std::getline(std::cin, resp);
+                            if (resp != "yes")
+                                continue;
+                        }
+                        zkHandleSptr->deleteNode(zkActions[i].key.c_str(), true);
+                    }
+                }
+                else if (zkActions[i].action == ZkAction::VALUE)
+                {
+                    if (execFlags & PRINT)
+                    {
+                        std::cout << "VALUE- key:"
+                            << zkActions[i].key
+                            << " value:" << zkActions[i].newval;
+                        if (zkActions[i].oldval != "")
+                            std::cout << " old_value:" << zkActions[i].oldval;
+                        std::cout << std::endl;
+                    }
+                    if (execFlags & EXECUTE)
+                    {
+                        if (execFlags & INTERACTIVE)
+                        {
+                            string resp;
+                            std::cout << "Execute this action?[yes/no]: ";
+                            std::getline(std::cin, resp);
+                            if (resp != "yes")
+                                continue;
+                        }
+                        zkHandleSptr->setNodeData (zkActions[i].key, zkActions[i].newval);
+                    }
+                }
+            }
+        }
+
+        return;
+    }
+
+}
+

http://git-wip-us.apache.org/repos/asf/zookeeper/blob/c9914857/content/build/contrib/zktreeutil/src/ZkTreeUtil.h
----------------------------------------------------------------------
diff --git a/content/build/contrib/zktreeutil/src/ZkTreeUtil.h b/content/build/contrib/zktreeutil/src/ZkTreeUtil.h
new file mode 100644
index 0000000..0a9be03
--- /dev/null
+++ b/content/build/contrib/zktreeutil/src/ZkTreeUtil.h
@@ -0,0 +1,262 @@
+/**
+ * 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.
+ */
+
+#ifndef __ZK_TREE_UTIL_H__
+#define __ZK_TREE_UTIL_H__
+
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include "SimpleTree.h"
+#include "ZkAdaptor.h"
+
+namespace zktreeutil
+{
+
+#define ZKTREEUTIL_INF 1000000000
+    /**
+     * \brief A structure containing ZK node data.
+     */
+    struct ZkNodeData
+    {
+        /**
+         * \brief The value string of the ZK node.
+         */
+        string value;
+
+        /**
+         * \brief The flag indicating whether children of the
+         * \brief node shduld be ignored during create/diff/update
+         */
+        bool ignoreUpdate;
+
+        /**
+         * \brief Constructor.
+         *
+         * @param val the value string
+         * @param ignore the flag indicating ignore any update/diff
+         */
+        ZkNodeData (const string& val, bool ignore=false)
+            : value (val), ignoreUpdate (ignore) {}
+
+        /**
+         * \brief Constructor.
+         *
+         * @param ignore the flag indicating ignore any update/diff
+         */
+        ZkNodeData (bool ignore=false)
+            : ignoreUpdate (ignore) {}
+    };
+
+    /**
+     * \brief The type representing a ZK Treenode
+     */
+    typedef SimpleTreeNode< string, ZkNodeData > ZkTreeNode;
+
+    /**
+     * \brief The type representing a ZK Treenode smart-pointer
+     */
+    typedef boost::shared_ptr< ZkTreeNode > ZkTreeNodeSptr;
+
+    /**
+     * \brief The type representing a ZK Adapter smart-pointer
+     */
+    typedef boost::shared_ptr< ZooKeeperAdapter > ZooKeeperAdapterSptr;
+
+    /**
+     * \brief A structure defining a particular action on ZK node;
+     * \brief the action can be any of -
+     * \brief        CREAT- <zknode>                : creates <zknode> recussively
+     * \brief        DELET- <zknode>              : deletes <zknode> recursively
+     * \brief        VALUE- <zknode> <value>     : sets <value> to <zknode>
+     */
+    struct ZkAction
+    {
+        /**
+         * \brief The action type; any of create/delete/setvalue.
+         */
+        enum ZkActionType
+        {
+            NONE,
+            CREATE,
+            DELETE,
+            VALUE,
+        };
+
+        /**
+         * \brief action of this instance
+         */
+        ZkActionType action;
+
+        /**
+         * \brief ZK node key
+         */
+        string key;
+
+        /**
+         * \brief value to be set, if action is setvalue
+         */
+        string newval;
+
+        /**
+         * \brief existing value of the ZK node key
+         */
+        string oldval;
+
+        /**
+         * \brief Constructor.
+         */
+        ZkAction ()
+            : action (ZkAction::NONE) {}
+
+        /**
+         * \brief Constructor.
+         *
+         * @param act the action to be taken
+         * @param k the key on which action to be taken
+         */
+        ZkAction (ZkActionType act, const string& k)
+            : action(act),
+            key(k) {}
+
+        /**
+         * \brief Constructor.
+         *
+         * @param act the action to be taken
+         * @param k the key on which action to be taken
+         * @param v the value of the ZK node key
+         */
+        ZkAction (ZkActionType act, const string& k, const string& v)
+            : action(act),
+            key(k),
+            newval(v) {}
+
+        /**
+         * \brief Constructor.
+         *
+         * @param act the action to be taken
+         * @param k the key on which action to be taken
+         * @param nv the new value of the ZK node key
+         * @param ov the old value of the ZK node key
+         */
+        ZkAction (ZkActionType act, const string& k, const string& nv, const string& ov)
+            : action (act),
+            key(k),
+            newval(nv),
+            oldval(ov) {}
+    };
+
+    /**
+     * \brief The ZK tree utility class; supports loading ZK tree from ZK server OR
+     * \brief from saved XML file, saving ZK tree into XML file, dumping the ZK tree
+     * \brief on standard output, creting a diff between saved ZK tree and live ZK
+     * \brief tree and incremental update of the live ZK tree.
+     */
+    class ZkTreeUtil
+    {
+        public:
+            /**
+             * \brief Execution flag on ZkAction
+             */
+            enum ZkActionExecuteFlag
+            {
+                NONE = 0,
+                PRINT = 1,
+                EXECUTE = 2,
+                INTERACTIVE = 5,
+            };
+
+        public:
+            /**
+             * \brief Connects to zookeeper and returns a valid ZK handle
+             *
+             * @param zkHosts comma separated list of host:port forming ZK quorum
+             * @param a valid ZK handle
+             */
+            static ZooKeeperAdapterSptr get_zkHandle (const string& zkHosts);
+
+
+        public:
+            /**
+             * \brief Constructor.
+             */
+            ZkTreeUtil () : loaded_(false) {}
+
+            /**
+             * \brief loads the ZK tree from ZK server into memory
+             *
+             * @param zkHosts comma separated list of host:port forming ZK quorum
+             * @param path path to the subtree to be loaded into memory
+             * @param force forces reloading in case tree already loaded into memory
+             */
+            void loadZkTree (const string& zkHosts, const string& path="/", bool force=false);
+
+            /**
+             * \brief loads the ZK tree from XML file into memory
+             *
+             * @param zkXmlConfig ZK tree XML file
+             * @param force forces reloading in case tree already loaded into memory
+             */
+            void loadZkTreeXml (const string& zkXmlConfig, bool force=false);
+
+            /**
+             * \brief writes the in-memory ZK tree on to ZK server
+             *
+             * @param zkHosts comma separated list of host:port forming ZK quorum
+             * @param path path to the subtree to be written to ZK tree
+             * @param force forces cleanup of the ZK tree on the ZK server before writing
+             */
+            void writeZkTree (const string& zkHosts, const string& path="/", bool force=false) const;
+
+            /**
+             * \brief dupms the in-memory ZK tree on the standard output device;
+             *
+             * @param xml flag indicates whether tree should be dumped in XML format
+             * @param depth the depth of the tree to be dumped for non-xml dump
+             */
+            void dumpZkTree (bool xml=false, int depth=ZKTREEUTIL_INF) const;
+
+            /** 
+             * \brief returns a list of actions after taking a diff of in-memory
+             * \brief ZK tree and live ZK tree.
+             *
+             * @param zkHosts comma separated list of host:port forming ZK quorum
+             * @param path path to the subtree in consideration while taking diff with ZK tree
+             * @return a list of ZKAction instances to be performed on live ZK tree
+             */
+            vector< ZkAction > diffZkTree (const string& zkHosts, const string& path="/") const;
+
+            /**
+             * \brief performs create/delete/setvalue by executing a set of
+             * ZkActions on a live ZK tree.
+             *
+             * @param zkHosts comma separated list of host:port forming ZK quorum
+             * @param zkActions set of ZkActions
+             * @param execFlags flags indicating print/execute/interactive etc
+             */
+            void executeZkActions (const string& zkHosts,
+                    const vector< ZkAction >& zkActions,
+                    int execFlags) const;
+
+        private:
+
+            ZkTreeNodeSptr zkRootSptr_;     // ZK tree root node
+            bool loaded_;                        // Falg indicating whether ZK tree loaded into memory
+    };
+}
+
+#endif // __ZK_TREE_UTIL_H__

http://git-wip-us.apache.org/repos/asf/zookeeper/blob/c9914857/content/build/contrib/zktreeutil/src/ZkTreeUtilMain.cc
----------------------------------------------------------------------
diff --git a/content/build/contrib/zktreeutil/src/ZkTreeUtilMain.cc b/content/build/contrib/zktreeutil/src/ZkTreeUtilMain.cc
new file mode 100644
index 0000000..8afebf6
--- /dev/null
+++ b/content/build/contrib/zktreeutil/src/ZkTreeUtilMain.cc
@@ -0,0 +1,247 @@
+/**
+ * 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.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <unistd.h>
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
+#include <getopt.h>
+#include <iostream>
+#include "ZkTreeUtil.h"
+
+using namespace zktreeutil;
+
+// The set of "long" options accepted by this program.
+static struct option long_options[] = {
+    {"help",         no_argument,             0, 'h'},
+    {"import",        no_argument,             0, 'I'},
+    {"export",     no_argument,             0, 'E'},
+    {"update",     no_argument,             0, 'U'},
+    {"diff",         no_argument,             0, 'F'},
+    {"dump",         no_argument,             0, 'D'},
+    {"force",         no_argument,             0, 'f'},
+    {"xmlfile",     required_argument,     0, 'x'},
+    {"path",         required_argument,     0, 'p'},
+    {"depth",         required_argument,     0, 'd'},
+    {"zookeeper", required_argument,     0, 'z'},
+    {0, 0, 0, 0}
+};
+static char *short_options = "IEUFDfx:p:d:hz:";
+
+static void usage(int argc, char *argv[])
+{
+    std::cout << "ZK-tree utility for managing ZK-tree with XML import/export," << std::endl;
+    std::cout << "viewing diff between live and saved ZK-tree and performing" << std::endl;
+    std::cout << "incremental update of the same." << std::endl;
+    std::cout << "Usage: " << argv[0] << " [args-and-values]+" << std::endl;
+    std::cout 
+        << "\t--import or -I: " 
+        << std::endl
+        << "\t  Imports the zookeeper tree from XML file. Must be specified with"
+        << std::endl
+        << "\t  --zookeeper AND --xmlfile options. Optionally takes --path for"
+        << std::endl
+        << "\t  importing subtree"
+        << std::endl;
+    std::cout 
+        << "\t--export or -E: " 
+        << std::endl
+        << "\t  Exports the zookeeper tree to XML file. Must be specified with"
+        << std::endl
+        << "\t  --zookeeper option. Optionally takes --path for exporting subtree"
+        << std::endl;
+    std::cout
+        << "\t--update or -U: "
+        << std::endl
+        << "\t  Updates zookeeper tree with changes from XML file. Update operation"
+        << std::endl
+        << "\t  is interactive unless specified with --force option. Must be speci-"
+        << std::endl
+        << "\t  fied with --zookeeper AND --xmlfile options. Optionally takes --path"
+        << std::endl
+        << "\t  for updating subtree."
+        << std::endl;
+    std::cout
+        << "\t--diff or -F: "
+        << std::endl
+        << "\t  Creates a list of diff actions on ZK tree based on XML data. Must"
+        << std::endl
+        << "\t  be specified with --zookeeper OR --xmlfile options. Optionally takes"
+        << std::endl
+        << "\t  --path for subtree diff"
+        << std::endl;
+    std::cout
+        << "\t--dump or -D: "
+        << std::endl
+        << "\t  Dumps the entire ZK (sub)tree to standard output. Must be specified"
+        << std::endl
+        << "\t  with --zookeeper OR --xmlfile options. Optionally takes --path and"
+        << std::endl
+        << "\t  --depth for dumping subtree."
+        << std::endl;
+    std::cout
+        << "\t--xmlfile=<filename> or -x <filename>: "
+        << std::endl
+        << "\t  Zookeeper tree-data XML file."
+        << std::endl;
+    std::cout
+        << "\t--path=<znodepath> or -p <znodepath>: "
+        << std::endl
+        << "\t  Path to the zookeeper subtree rootnode."
+        << std::endl;
+    std::cout
+        << "\t--depth=<tree-depth> or -d <tree-depth>: "
+        << std::endl
+        << "\t  Depth of the ZK tree to be dumped (ignored for XML dump)."
+        << std::endl;
+    std::cout
+        << "\t--force or -f: Forces cleanup before import; also used for forceful"
+        << std::endl
+        << "\t  update. Optionally be specified with --import and --update."
+        << std::endl;
+    std::cout
+        << "\t--help or -h: "
+        << std::endl
+        << "\t  prints this message"
+        << std::endl;
+    std::cout
+        << "\t--zookeeper=<zkhosts> or -z <zkhosts>: "
+        << std::endl
+        << "\t  specifies information to connect to zookeeper."
+        << std::endl;
+}
+
+int main(int argc, char **argv)
+{
+    if (argc == 1) {
+        usage(argc, argv);
+        exit(0);
+    }
+
+    // Parse the arguments.
+     int op = 0;
+     bool force = false;
+     string zkHosts;
+     string xmlFile;
+     string path = "/";
+     int depth = 0;
+     while (1)
+     {
+         int c = getopt_long(argc, argv, short_options, long_options, 0);
+         if (c == -1)
+             break;
+
+         switch (c) {
+             case 'I': op = c;
+                          break;
+             case 'E': op = c;
+                          break;
+             case 'U': op = c;
+                          break;
+             case 'F': op = c;
+                          break;
+             case 'D': op = c;
+                          break;
+             case 'f': force = true;
+                          break;
+             case 'x': xmlFile = optarg;
+                          break;
+             case 'p': path = optarg;
+                          break;
+             case 'd': depth = atoi (optarg);
+                          break;
+             case 'z': zkHosts = optarg;
+                          break;
+             case 'h': usage (argc, argv);
+                          exit(0);
+         }
+     }
+
+     ZkTreeUtil zkTreeUtil;
+     switch (op)
+     {
+         case 'I':    {
+                            if (zkHosts == "" || xmlFile == "")
+                            {
+                                std::cout << "[zktreeutil] missing params; please see usage" << std::endl;
+                                exit (-1);
+                            }
+                            zkTreeUtil.loadZkTreeXml (xmlFile);
+                            zkTreeUtil.writeZkTree (zkHosts, path, force);
+                            std::cout << "[zktreeutil] import successful!" << std::endl;
+                            break;
+                        }
+         case 'E':    {
+                            if (zkHosts == "")
+                            {
+                                std::cout << "[zktreeutil] missing params; please see usage" << std::endl;
+                                exit (-1);
+                            }
+                            zkTreeUtil.loadZkTree (zkHosts, path);
+                            zkTreeUtil.dumpZkTree (true);
+                            break;
+                        }
+         case 'U':    {
+                            if (zkHosts == "" || xmlFile == "")
+                            {
+                                std::cout << "[zktreeutil] missing params; please see usage" << std::endl;
+                                exit (-1);
+                            }
+                            zkTreeUtil.loadZkTreeXml (xmlFile);
+                            vector< ZkAction > zkActions = zkTreeUtil.diffZkTree (zkHosts, path);
+                            int flags = ZkTreeUtil::EXECUTE;
+                            if (!force) flags |= ZkTreeUtil::INTERACTIVE;
+                            zkTreeUtil.executeZkActions (zkHosts, zkActions, flags);
+                            std::cout << "[zktreeutil] update successful!" << std::endl;
+                            break;
+                        }
+         case 'F':    {
+                            if (zkHosts == "" || xmlFile == "")
+                            {
+                                std::cout << "[zktreeutil] missing params; please see usage" << std::endl;
+                                exit (-1);
+                            }
+                            zkTreeUtil.loadZkTreeXml (xmlFile);
+                            vector< ZkAction > zkActions = zkTreeUtil.diffZkTree (zkHosts, path);
+                            zkTreeUtil.executeZkActions (zkHosts, zkActions, ZkTreeUtil::PRINT);
+                            break;
+                        }
+         case 'D':    {
+                            if (zkHosts != "")
+                                zkTreeUtil.loadZkTree (zkHosts, path);
+                            else if (xmlFile != "")
+                                zkTreeUtil.loadZkTreeXml (xmlFile);
+                            else
+                            {
+                                std::cout << "[zktreeutil] missing params; please see usage" << std::endl;
+                                exit (-1);
+                            }
+                            // Dump the ZK tree
+                            if (depth) zkTreeUtil.dumpZkTree (false, depth);
+                            else zkTreeUtil.dumpZkTree (false);
+                            break;
+                        }
+     }
+
+     exit(0);
+}
+

http://git-wip-us.apache.org/repos/asf/zookeeper/blob/c9914857/content/build/contrib/zktreeutil/tests/zk_sample.xml
----------------------------------------------------------------------
diff --git a/content/build/contrib/zktreeutil/tests/zk_sample.xml b/content/build/contrib/zktreeutil/tests/zk_sample.xml
new file mode 100644
index 0000000..6e97daa
--- /dev/null
+++ b/content/build/contrib/zktreeutil/tests/zk_sample.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   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.
+-->
+
+<root>
+  <zknode name="myapp">
+    <zknode name="version-1.0">
+      <zknode name="clientConfig">
+        <zknode name="testClient" value="cluster.id=local;server.host=localhost;server.port=4080"/>
+      </zknode>
+      <zknode name="configuration" value="v4.0">
+        <zknode name="cacheControl" value="on"/>
+        <zknode name="healthCheck" value="on"/>
+      </zknode>
+      <zknode name="distributions">
+        <zknode name="http">
+          <zknode name="goldenShards" value="0,4294967296,server,localhost:8085;"/>
+          <zknode name="versionedShards" value="33;0,4294967296,server,localhost:8086;"/>
+          <zknode name="shards" value="0,4294967296,server,localhost:8086;"/>
+        </zknode>
+      </zknode>
+      <zknode name="tmp" ignore="yes">
+        <zknode name="alerts" value="test"/>
+        <zknode name="locks"/>
+        <zknode name="transactions"/>
+      </zknode>
+    </zknode>
+  </zknode>
+  <zknode name="zookeeper" ignore="true"/>
+</root>

http://git-wip-us.apache.org/repos/asf/zookeeper/blob/c9914857/content/build/docs/api/allclasses-frame.html
----------------------------------------------------------------------
diff --git a/content/build/docs/api/allclasses-frame.html b/content/build/docs/api/allclasses-frame.html
new file mode 100644
index 0000000..32229ff
--- /dev/null
+++ b/content/build/docs/api/allclasses-frame.html
@@ -0,0 +1,81 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!-- NewPage -->
+<html lang="en">
+<head>
+<!-- Generated by javadoc (1.8.0_172) on Sat Jun 30 16:51:39 PDT 2018 -->
+<title>All Classes (ZooKeeper 3.4.13 API)</title>
+<meta name="date" content="2018-06-30">
+<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
+<script type="text/javascript" src="script.js"></script>
+</head>
+<body>
+<h1 class="bar">All&nbsp;Classes</h1>
+<div class="indexContainer">
+<ul>
+<li><a href="org/apache/zookeeper/data/ACL.html" title="class in org.apache.zookeeper.data" target="classFrame">ACL</a></li>
+<li><a href="org/apache/zookeeper/AsyncCallback.html" title="interface in org.apache.zookeeper" target="classFrame"><span class="interfaceName">AsyncCallback</span></a></li>
+<li><a href="org/apache/zookeeper/AsyncCallback.ACLCallback.html" title="interface in org.apache.zookeeper" target="classFrame"><span class="interfaceName">AsyncCallback.ACLCallback</span></a></li>
+<li><a href="org/apache/zookeeper/AsyncCallback.Children2Callback.html" title="interface in org.apache.zookeeper" target="classFrame"><span class="interfaceName">AsyncCallback.Children2Callback</span></a></li>
+<li><a href="org/apache/zookeeper/AsyncCallback.ChildrenCallback.html" title="interface in org.apache.zookeeper" target="classFrame"><span class="interfaceName">AsyncCallback.ChildrenCallback</span></a></li>
+<li><a href="org/apache/zookeeper/AsyncCallback.DataCallback.html" title="interface in org.apache.zookeeper" target="classFrame"><span class="interfaceName">AsyncCallback.DataCallback</span></a></li>
+<li><a href="org/apache/zookeeper/AsyncCallback.MultiCallback.html" title="interface in org.apache.zookeeper" target="classFrame"><span class="interfaceName">AsyncCallback.MultiCallback</span></a></li>
+<li><a href="org/apache/zookeeper/AsyncCallback.StatCallback.html" title="interface in org.apache.zookeeper" target="classFrame"><span class="interfaceName">AsyncCallback.StatCallback</span></a></li>
+<li><a href="org/apache/zookeeper/AsyncCallback.StringCallback.html" title="interface in org.apache.zookeeper" target="classFrame"><span class="interfaceName">AsyncCallback.StringCallback</span></a></li>
+<li><a href="org/apache/zookeeper/AsyncCallback.VoidCallback.html" title="interface in org.apache.zookeeper" target="classFrame"><span class="interfaceName">AsyncCallback.VoidCallback</span></a></li>
+<li><a href="org/apache/zookeeper/CreateMode.html" title="enum in org.apache.zookeeper" target="classFrame">CreateMode</a></li>
+<li><a href="org/apache/zookeeper/client/FourLetterWordMain.html" title="class in org.apache.zookeeper.client" target="classFrame">FourLetterWordMain</a></li>
+<li><a href="org/apache/zookeeper/client/HostProvider.html" title="interface in org.apache.zookeeper.client" target="classFrame"><span class="interfaceName">HostProvider</span></a></li>
+<li><a href="org/apache/zookeeper/data/Id.html" title="class in org.apache.zookeeper.data" target="classFrame">Id</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.APIErrorException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException.APIErrorException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.AuthFailedException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException.AuthFailedException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.BadArgumentsException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException.BadArgumentsException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.BadVersionException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException.BadVersionException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.Code.html" title="enum in org.apache.zookeeper" target="classFrame">KeeperException.Code</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.CodeDeprecated.html" title="interface in org.apache.zookeeper" target="classFrame"><span class="interfaceName">KeeperException.CodeDeprecated</span></a></li>
+<li><a href="org/apache/zookeeper/KeeperException.ConnectionLossException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException.ConnectionLossException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.DataInconsistencyException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException.DataInconsistencyException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.InvalidACLException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException.InvalidACLException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.InvalidCallbackException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException.InvalidCallbackException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.MarshallingErrorException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException.MarshallingErrorException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.NoAuthException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException.NoAuthException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.NoChildrenForEphemeralsException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException.NoChildrenForEphemeralsException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.NodeExistsException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException.NodeExistsException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.NoNodeException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException.NoNodeException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.NotEmptyException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException.NotEmptyException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.NotReadOnlyException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException.NotReadOnlyException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.OperationTimeoutException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException.OperationTimeoutException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.RuntimeInconsistencyException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException.RuntimeInconsistencyException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.SessionExpiredException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException.SessionExpiredException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.SessionMovedException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException.SessionMovedException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.SystemErrorException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException.SystemErrorException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.UnimplementedException.html" title="class in org.apache.zookeeper" target="classFrame">KeeperException.UnimplementedException</a></li>
+<li><a href="org/apache/zookeeper/server/LogFormatter.html" title="class in org.apache.zookeeper.server" target="classFrame">LogFormatter</a></li>
+<li><a href="org/apache/zookeeper/server/PurgeTxnLog.html" title="class in org.apache.zookeeper.server" target="classFrame">PurgeTxnLog</a></li>
+<li><a href="org/apache/zookeeper/server/quorum/QuorumPeerMain.html" title="class in org.apache.zookeeper.server.quorum" target="classFrame">QuorumPeerMain</a></li>
+<li><a href="org/apache/jute/Record.html" title="interface in org.apache.jute" target="classFrame"><span class="interfaceName">Record</span></a></li>
+<li><a href="org/apache/zookeeper/ServerAdminClient.html" title="class in org.apache.zookeeper" target="classFrame">ServerAdminClient</a></li>
+<li><a href="org/apache/zookeeper/server/SnapshotFormatter.html" title="class in org.apache.zookeeper.server" target="classFrame">SnapshotFormatter</a></li>
+<li><a href="org/apache/zookeeper/data/Stat.html" title="class in org.apache.zookeeper.data" target="classFrame">Stat</a></li>
+<li><a href="org/apache/zookeeper/client/StaticHostProvider.html" title="class in org.apache.zookeeper.client" target="classFrame">StaticHostProvider</a></li>
+<li><a href="org/apache/zookeeper/data/StatPersisted.html" title="class in org.apache.zookeeper.data" target="classFrame">StatPersisted</a></li>
+<li><a href="org/apache/zookeeper/data/StatPersistedV1.html" title="class in org.apache.zookeeper.data" target="classFrame">StatPersistedV1</a></li>
+<li><a href="org/apache/zookeeper/Transaction.html" title="class in org.apache.zookeeper" target="classFrame">Transaction</a></li>
+<li><a href="org/apache/zookeeper/server/upgrade/UpgradeMain.html" title="class in org.apache.zookeeper.server.upgrade" target="classFrame">UpgradeMain</a></li>
+<li><a href="org/apache/zookeeper/WatchedEvent.html" title="class in org.apache.zookeeper" target="classFrame">WatchedEvent</a></li>
+<li><a href="org/apache/zookeeper/Watcher.html" title="interface in org.apache.zookeeper" target="classFrame"><span class="interfaceName">Watcher</span></a></li>
+<li><a href="org/apache/zookeeper/Watcher.Event.html" title="interface in org.apache.zookeeper" target="classFrame"><span class="interfaceName">Watcher.Event</span></a></li>
+<li><a href="org/apache/zookeeper/Watcher.Event.EventType.html" title="enum in org.apache.zookeeper" target="classFrame">Watcher.Event.EventType</a></li>
+<li><a href="org/apache/zookeeper/Watcher.Event.KeeperState.html" title="enum in org.apache.zookeeper" target="classFrame">Watcher.Event.KeeperState</a></li>
+<li><a href="org/apache/zookeeper/ZooDefs.html" title="class in org.apache.zookeeper" target="classFrame">ZooDefs</a></li>
+<li><a href="org/apache/zookeeper/ZooDefs.Ids.html" title="interface in org.apache.zookeeper" target="classFrame"><span class="interfaceName">ZooDefs.Ids</span></a></li>
+<li><a href="org/apache/zookeeper/ZooDefs.OpCode.html" title="interface in org.apache.zookeeper" target="classFrame"><span class="interfaceName">ZooDefs.OpCode</span></a></li>
+<li><a href="org/apache/zookeeper/ZooDefs.Perms.html" title="interface in org.apache.zookeeper" target="classFrame"><span class="interfaceName">ZooDefs.Perms</span></a></li>
+<li><a href="org/apache/zookeeper/ZooKeeper.html" title="class in org.apache.zookeeper" target="classFrame">ZooKeeper</a></li>
+<li><a href="org/apache/zookeeper/ZooKeeper.States.html" title="enum in org.apache.zookeeper" target="classFrame">ZooKeeper.States</a></li>
+<li><a href="org/apache/zookeeper/ZooKeeperMain.html" title="class in org.apache.zookeeper" target="classFrame">ZooKeeperMain</a></li>
+<li><a href="org/apache/zookeeper/server/ZooKeeperServerMain.html" title="class in org.apache.zookeeper.server" target="classFrame">ZooKeeperServerMain</a></li>
+</ul>
+</div>
+</body>
+</html>

http://git-wip-us.apache.org/repos/asf/zookeeper/blob/c9914857/content/build/docs/api/allclasses-noframe.html
----------------------------------------------------------------------
diff --git a/content/build/docs/api/allclasses-noframe.html b/content/build/docs/api/allclasses-noframe.html
new file mode 100644
index 0000000..80351cf
--- /dev/null
+++ b/content/build/docs/api/allclasses-noframe.html
@@ -0,0 +1,81 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<!-- NewPage -->
+<html lang="en">
+<head>
+<!-- Generated by javadoc (1.8.0_172) on Sat Jun 30 16:51:39 PDT 2018 -->
+<title>All Classes (ZooKeeper 3.4.13 API)</title>
+<meta name="date" content="2018-06-30">
+<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
+<script type="text/javascript" src="script.js"></script>
+</head>
+<body>
+<h1 class="bar">All&nbsp;Classes</h1>
+<div class="indexContainer">
+<ul>
+<li><a href="org/apache/zookeeper/data/ACL.html" title="class in org.apache.zookeeper.data">ACL</a></li>
+<li><a href="org/apache/zookeeper/AsyncCallback.html" title="interface in org.apache.zookeeper"><span class="interfaceName">AsyncCallback</span></a></li>
+<li><a href="org/apache/zookeeper/AsyncCallback.ACLCallback.html" title="interface in org.apache.zookeeper"><span class="interfaceName">AsyncCallback.ACLCallback</span></a></li>
+<li><a href="org/apache/zookeeper/AsyncCallback.Children2Callback.html" title="interface in org.apache.zookeeper"><span class="interfaceName">AsyncCallback.Children2Callback</span></a></li>
+<li><a href="org/apache/zookeeper/AsyncCallback.ChildrenCallback.html" title="interface in org.apache.zookeeper"><span class="interfaceName">AsyncCallback.ChildrenCallback</span></a></li>
+<li><a href="org/apache/zookeeper/AsyncCallback.DataCallback.html" title="interface in org.apache.zookeeper"><span class="interfaceName">AsyncCallback.DataCallback</span></a></li>
+<li><a href="org/apache/zookeeper/AsyncCallback.MultiCallback.html" title="interface in org.apache.zookeeper"><span class="interfaceName">AsyncCallback.MultiCallback</span></a></li>
+<li><a href="org/apache/zookeeper/AsyncCallback.StatCallback.html" title="interface in org.apache.zookeeper"><span class="interfaceName">AsyncCallback.StatCallback</span></a></li>
+<li><a href="org/apache/zookeeper/AsyncCallback.StringCallback.html" title="interface in org.apache.zookeeper"><span class="interfaceName">AsyncCallback.StringCallback</span></a></li>
+<li><a href="org/apache/zookeeper/AsyncCallback.VoidCallback.html" title="interface in org.apache.zookeeper"><span class="interfaceName">AsyncCallback.VoidCallback</span></a></li>
+<li><a href="org/apache/zookeeper/CreateMode.html" title="enum in org.apache.zookeeper">CreateMode</a></li>
+<li><a href="org/apache/zookeeper/client/FourLetterWordMain.html" title="class in org.apache.zookeeper.client">FourLetterWordMain</a></li>
+<li><a href="org/apache/zookeeper/client/HostProvider.html" title="interface in org.apache.zookeeper.client"><span class="interfaceName">HostProvider</span></a></li>
+<li><a href="org/apache/zookeeper/data/Id.html" title="class in org.apache.zookeeper.data">Id</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.html" title="class in org.apache.zookeeper">KeeperException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.APIErrorException.html" title="class in org.apache.zookeeper">KeeperException.APIErrorException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.AuthFailedException.html" title="class in org.apache.zookeeper">KeeperException.AuthFailedException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.BadArgumentsException.html" title="class in org.apache.zookeeper">KeeperException.BadArgumentsException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.BadVersionException.html" title="class in org.apache.zookeeper">KeeperException.BadVersionException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.Code.html" title="enum in org.apache.zookeeper">KeeperException.Code</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.CodeDeprecated.html" title="interface in org.apache.zookeeper"><span class="interfaceName">KeeperException.CodeDeprecated</span></a></li>
+<li><a href="org/apache/zookeeper/KeeperException.ConnectionLossException.html" title="class in org.apache.zookeeper">KeeperException.ConnectionLossException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.DataInconsistencyException.html" title="class in org.apache.zookeeper">KeeperException.DataInconsistencyException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.InvalidACLException.html" title="class in org.apache.zookeeper">KeeperException.InvalidACLException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.InvalidCallbackException.html" title="class in org.apache.zookeeper">KeeperException.InvalidCallbackException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.MarshallingErrorException.html" title="class in org.apache.zookeeper">KeeperException.MarshallingErrorException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.NoAuthException.html" title="class in org.apache.zookeeper">KeeperException.NoAuthException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.NoChildrenForEphemeralsException.html" title="class in org.apache.zookeeper">KeeperException.NoChildrenForEphemeralsException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.NodeExistsException.html" title="class in org.apache.zookeeper">KeeperException.NodeExistsException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.NoNodeException.html" title="class in org.apache.zookeeper">KeeperException.NoNodeException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.NotEmptyException.html" title="class in org.apache.zookeeper">KeeperException.NotEmptyException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.NotReadOnlyException.html" title="class in org.apache.zookeeper">KeeperException.NotReadOnlyException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.OperationTimeoutException.html" title="class in org.apache.zookeeper">KeeperException.OperationTimeoutException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.RuntimeInconsistencyException.html" title="class in org.apache.zookeeper">KeeperException.RuntimeInconsistencyException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.SessionExpiredException.html" title="class in org.apache.zookeeper">KeeperException.SessionExpiredException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.SessionMovedException.html" title="class in org.apache.zookeeper">KeeperException.SessionMovedException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.SystemErrorException.html" title="class in org.apache.zookeeper">KeeperException.SystemErrorException</a></li>
+<li><a href="org/apache/zookeeper/KeeperException.UnimplementedException.html" title="class in org.apache.zookeeper">KeeperException.UnimplementedException</a></li>
+<li><a href="org/apache/zookeeper/server/LogFormatter.html" title="class in org.apache.zookeeper.server">LogFormatter</a></li>
+<li><a href="org/apache/zookeeper/server/PurgeTxnLog.html" title="class in org.apache.zookeeper.server">PurgeTxnLog</a></li>
+<li><a href="org/apache/zookeeper/server/quorum/QuorumPeerMain.html" title="class in org.apache.zookeeper.server.quorum">QuorumPeerMain</a></li>
+<li><a href="org/apache/jute/Record.html" title="interface in org.apache.jute"><span class="interfaceName">Record</span></a></li>
+<li><a href="org/apache/zookeeper/ServerAdminClient.html" title="class in org.apache.zookeeper">ServerAdminClient</a></li>
+<li><a href="org/apache/zookeeper/server/SnapshotFormatter.html" title="class in org.apache.zookeeper.server">SnapshotFormatter</a></li>
+<li><a href="org/apache/zookeeper/data/Stat.html" title="class in org.apache.zookeeper.data">Stat</a></li>
+<li><a href="org/apache/zookeeper/client/StaticHostProvider.html" title="class in org.apache.zookeeper.client">StaticHostProvider</a></li>
+<li><a href="org/apache/zookeeper/data/StatPersisted.html" title="class in org.apache.zookeeper.data">StatPersisted</a></li>
+<li><a href="org/apache/zookeeper/data/StatPersistedV1.html" title="class in org.apache.zookeeper.data">StatPersistedV1</a></li>
+<li><a href="org/apache/zookeeper/Transaction.html" title="class in org.apache.zookeeper">Transaction</a></li>
+<li><a href="org/apache/zookeeper/server/upgrade/UpgradeMain.html" title="class in org.apache.zookeeper.server.upgrade">UpgradeMain</a></li>
+<li><a href="org/apache/zookeeper/WatchedEvent.html" title="class in org.apache.zookeeper">WatchedEvent</a></li>
+<li><a href="org/apache/zookeeper/Watcher.html" title="interface in org.apache.zookeeper"><span class="interfaceName">Watcher</span></a></li>
+<li><a href="org/apache/zookeeper/Watcher.Event.html" title="interface in org.apache.zookeeper"><span class="interfaceName">Watcher.Event</span></a></li>
+<li><a href="org/apache/zookeeper/Watcher.Event.EventType.html" title="enum in org.apache.zookeeper">Watcher.Event.EventType</a></li>
+<li><a href="org/apache/zookeeper/Watcher.Event.KeeperState.html" title="enum in org.apache.zookeeper">Watcher.Event.KeeperState</a></li>
+<li><a href="org/apache/zookeeper/ZooDefs.html" title="class in org.apache.zookeeper">ZooDefs</a></li>
+<li><a href="org/apache/zookeeper/ZooDefs.Ids.html" title="interface in org.apache.zookeeper"><span class="interfaceName">ZooDefs.Ids</span></a></li>
+<li><a href="org/apache/zookeeper/ZooDefs.OpCode.html" title="interface in org.apache.zookeeper"><span class="interfaceName">ZooDefs.OpCode</span></a></li>
+<li><a href="org/apache/zookeeper/ZooDefs.Perms.html" title="interface in org.apache.zookeeper"><span class="interfaceName">ZooDefs.Perms</span></a></li>
+<li><a href="org/apache/zookeeper/ZooKeeper.html" title="class in org.apache.zookeeper">ZooKeeper</a></li>
+<li><a href="org/apache/zookeeper/ZooKeeper.States.html" title="enum in org.apache.zookeeper">ZooKeeper.States</a></li>
+<li><a href="org/apache/zookeeper/ZooKeeperMain.html" title="class in org.apache.zookeeper">ZooKeeperMain</a></li>
+<li><a href="org/apache/zookeeper/server/ZooKeeperServerMain.html" title="class in org.apache.zookeeper.server">ZooKeeperServerMain</a></li>
+</ul>
+</div>
+</body>
+</html>