Updated Branches: refs/heads/master bd79f9f68 -> eee5bd4c7
moved some more pages to the wiki Project: http://git-wip-us.apache.org/repos/asf/incubator-curator/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-curator/commit/eee5bd4c Tree: http://git-wip-us.apache.org/repos/asf/incubator-curator/tree/eee5bd4c Diff: http://git-wip-us.apache.org/repos/asf/incubator-curator/diff/eee5bd4c Branch: refs/heads/master Commit: eee5bd4c7d81a433b1f2f0f10575c1bba7580940 Parents: bd79f9f Author: randgalt <[email protected]> Authored: Wed Apr 24 12:53:04 2013 -0700 Committer: randgalt <[email protected]> Committed: Wed Apr 24 12:53:04 2013 -0700 ---------------------------------------------------------------------- .../confluence/distributed-delay-queue.confluence | 2 +- .../confluence/distributed-id-queue.confluence | 2 +- .../distributed-priority-queue.confluence | 2 +- .../site/confluence/distributed-queue.confluence | 2 +- .../confluence/simple-distributed-queue.confluence | 2 +- src/site/confluence/articles.confluence | 15 ------ src/site/confluence/contributions.confluence | 12 ----- src/site/confluence/history.confluence | 27 ---------- src/site/confluence/patches.confluence | 38 -------------- src/site/confluence/tech-note-1.confluence | 39 --------------- src/site/confluence/tech-note-2.confluence | 19 ------- src/site/confluence/tech-note-3.confluence | 25 --------- src/site/confluence/tech-note-4.confluence | 17 ------ src/site/confluence/tech-notes.confluence | 8 --- src/site/site.xml | 10 ++-- 15 files changed, 10 insertions(+), 210 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-curator/blob/eee5bd4c/curator-recipes/src/site/confluence/distributed-delay-queue.confluence ---------------------------------------------------------------------- diff --git a/curator-recipes/src/site/confluence/distributed-delay-queue.confluence b/curator-recipes/src/site/confluence/distributed-delay-queue.confluence index 5d33c21..2755a96 100644 --- a/curator-recipes/src/site/confluence/distributed-delay-queue.confluence +++ b/curator-recipes/src/site/confluence/distributed-delay-queue.confluence @@ -1,6 +1,6 @@ h1. Distributed Delay Queue -h2. *IMPORTANT* - We recommend that you do NOT use ZooKeeper for Queues. Please see [[Tech Note 4|../tech-note-4.html]] for details. +h2. *IMPORTANT* - We recommend that you do NOT use ZooKeeper for Queues. Please see [[Tech Note 4|https://cwiki.apache.org/confluence/display/CURATOR/TN4]] for details. h2. Description An implementation of a Distributed Delay Queue. A Delay Queue is similar to a Priority Queue. When items are added to the queue, http://git-wip-us.apache.org/repos/asf/incubator-curator/blob/eee5bd4c/curator-recipes/src/site/confluence/distributed-id-queue.confluence ---------------------------------------------------------------------- diff --git a/curator-recipes/src/site/confluence/distributed-id-queue.confluence b/curator-recipes/src/site/confluence/distributed-id-queue.confluence index 8cdbea4..7afdd15 100644 --- a/curator-recipes/src/site/confluence/distributed-id-queue.confluence +++ b/curator-recipes/src/site/confluence/distributed-id-queue.confluence @@ -1,6 +1,6 @@ h1. Distributed ID Queue -h2. *IMPORTANT* - We recommend that you do NOT use ZooKeeper for Queues. Please see [[Tech Note 4|../tech-note-4.html]] for details. +h2. *IMPORTANT* - We recommend that you do NOT use ZooKeeper for Queues. Please see [[Tech Note 4|https://cwiki.apache.org/confluence/display/CURATOR/TN4]] for details. h2. Description This is an alternate version of [[Distributed Queue|distributed-queue.html]] that supports assigning IDs to the items http://git-wip-us.apache.org/repos/asf/incubator-curator/blob/eee5bd4c/curator-recipes/src/site/confluence/distributed-priority-queue.confluence ---------------------------------------------------------------------- diff --git a/curator-recipes/src/site/confluence/distributed-priority-queue.confluence b/curator-recipes/src/site/confluence/distributed-priority-queue.confluence index 9162eb9..c69234a 100644 --- a/curator-recipes/src/site/confluence/distributed-priority-queue.confluence +++ b/curator-recipes/src/site/confluence/distributed-priority-queue.confluence @@ -1,6 +1,6 @@ h1. Distributed Priority Queue -h2. *IMPORTANT* - We recommend that you do NOT use ZooKeeper for Queues. Please see [[Tech Note 4|../tech-note-4.html]] for details. +h2. *IMPORTANT* - We recommend that you do NOT use ZooKeeper for Queues. Please see [[Tech Note 4|https://cwiki.apache.org/confluence/display/CURATOR/TN4]] for details. h2. Description An implementation of the Distributed Priority Queue ZK recipe. http://git-wip-us.apache.org/repos/asf/incubator-curator/blob/eee5bd4c/curator-recipes/src/site/confluence/distributed-queue.confluence ---------------------------------------------------------------------- diff --git a/curator-recipes/src/site/confluence/distributed-queue.confluence b/curator-recipes/src/site/confluence/distributed-queue.confluence index 3adf4ec..f3102e4 100644 --- a/curator-recipes/src/site/confluence/distributed-queue.confluence +++ b/curator-recipes/src/site/confluence/distributed-queue.confluence @@ -1,6 +1,6 @@ h1. Distributed Queue -h2. *IMPORTANT* - We recommend that you do NOT use ZooKeeper for Queues. Please see [[Tech Note 4|../tech-note-4.html]] for details. +h2. *IMPORTANT* - We recommend that you do NOT use ZooKeeper for Queues. Please see [[Tech Note 4|https://cwiki.apache.org/confluence/display/CURATOR/TN4]] for details. h2. Description An implementation of the Distributed Queue ZK recipe. Items put into the queue are guaranteed to be ordered (by means of ZK's PERSISTENT_SEQUENTIAL node). If a single consumer takes items out of the queue, they will be ordered FIFO. If ordering is important, use a LeaderSelector to nominate a single consumer. http://git-wip-us.apache.org/repos/asf/incubator-curator/blob/eee5bd4c/curator-recipes/src/site/confluence/simple-distributed-queue.confluence ---------------------------------------------------------------------- diff --git a/curator-recipes/src/site/confluence/simple-distributed-queue.confluence b/curator-recipes/src/site/confluence/simple-distributed-queue.confluence index 2e78c50..eea6741 100644 --- a/curator-recipes/src/site/confluence/simple-distributed-queue.confluence +++ b/curator-recipes/src/site/confluence/simple-distributed-queue.confluence @@ -1,6 +1,6 @@ h1. Simple Distributed Queue -h2. *IMPORTANT* - We recommend that you do NOT use ZooKeeper for Queues. Please see [[Tech Note 4|../tech-note-4.html]] for details. +h2. *IMPORTANT* - We recommend that you do NOT use ZooKeeper for Queues. Please see [[Tech Note 4|https://cwiki.apache.org/confluence/display/CURATOR/TN4]] for details. h2. Description http://git-wip-us.apache.org/repos/asf/incubator-curator/blob/eee5bd4c/src/site/confluence/articles.confluence ---------------------------------------------------------------------- diff --git a/src/site/confluence/articles.confluence b/src/site/confluence/articles.confluence deleted file mode 100644 index cf256b9..0000000 --- a/src/site/confluence/articles.confluence +++ /dev/null @@ -1,15 +0,0 @@ -h1. Articles and Blogs About Curator - -|[[Adventures in Clustering - part 1|http://sourcedelica.com/blog/2013/01/adventures-in-clustering-part-1/]]| -|[[Configuring the Cluster Component|http://puniverse.github.com/galaxy/manual/config/config-cluster.html]]| -|[[Curator Framework: Reducing the Complexity of Building Distributed Systems|http://www.optify.net/marketing-technology/curator-framework-reducing-the-complexity-of-building-distributed-systems]]| -|[[Dataweek Keynote: Large Scale Search, Discovery and Analysis in Action (Slides 23/24)|http://www.slideshare.net/mumrah/introduction-to-zookeeper-trihug-may-22-2012]]| -|[[Hadoop: The Definitive Guide - 3rd Edition (page 522)|http://www.amazon.com/Hadoop-Definitive-Guide-Tom-White/dp/1449311520/ref=pd%5Fsim%5Fb%5F1]]| -|[[Introduction to ZooKeeper - TriHUG May 22, 2012|http://www.slideshare.net/mumrah/introduction-to-zookeeper-trihug-may-22-2012]]| -|[[Leader Electon, Curator and Embedded ZK|https://dl.dropbox.com/u/7540961/zk%5Fleader%5Felection.pdf]]| -|[[Lesson in Distributed Computing with Apache ZooKeeper (German)|http://www.java-forum-stuttgart.de/jfs/2012/folien/A6.pdf]]| -|[[Netflix Curator for Zookeeper|http://www.youtube.com/watch?v=8e9bnaPw5RI]]| -|[[Software Developer's Journal - Hadoop Issue|http://sdjournal.org/apache-hadoop-ecosystem/]]| -|[[Stay in sync with Apache Zookeeper|http://funnel.hasgeek.com/rootconf/338-stay-in-sync-with-apache-zookeeper]]| -|[[Using Netflix Curator for Service Discovery|http://blog.palominolabs.com/2012/08/14/using-netflix-curator-for-service-discovery/]]| -|[[Zookeeper, Netflix Curator and ACLs|http://michaelmorello.blogspot.com/2012/12/zookeeper-netflix-curator-and-acls.html]]| http://git-wip-us.apache.org/repos/asf/incubator-curator/blob/eee5bd4c/src/site/confluence/contributions.confluence ---------------------------------------------------------------------- diff --git a/src/site/confluence/contributions.confluence b/src/site/confluence/contributions.confluence deleted file mode 100644 index 362ebf7..0000000 --- a/src/site/confluence/contributions.confluence +++ /dev/null @@ -1,12 +0,0 @@ -h1. Contributions - -Curator is being extended by third parties. Here are some of the extensions: - -||Netflix|| -|Netflix (the original creator of Curator) maintains some Curator extensions at: [[https://github.com/Netflix/curator]]| - -||Bazaarvoice|| -|Helpers that extend the functionality of Curator: [[https://github.com/bazaarvoice/curator-extensions]]| - -||Rackspace|| -|Service Registry Bindings for Netflix Curator: [[http://devops.rackspace.com/service-registry-curator-bindings.html]]| http://git-wip-us.apache.org/repos/asf/incubator-curator/blob/eee5bd4c/src/site/confluence/history.confluence ---------------------------------------------------------------------- diff --git a/src/site/confluence/history.confluence b/src/site/confluence/history.confluence deleted file mode 100644 index 8ac3ed4..0000000 --- a/src/site/confluence/history.confluence +++ /dev/null @@ -1,27 +0,0 @@ -h1. Curator's History - -Curator was initially developed by [[Jordan Zimmerman|https://people.apache.org/~randgalt]] at [[Netflix|http://netflix.github.com]] to -make writing ZooKeeper-based applications easier and more reliable. Curator was open-sourced by Netflix on GitHub as an Apache 2.0 licensed project in -July 2011. During this time Curator has been formally released many times and has gained widespread adoption. - -The [[Curator Incubator Proposal|http://wiki.apache.org/incubator/CuratorProposal]] was presented in February 2013 and was formally accepted into the Incubator -in March 2013. - -h2. Rationale - -New users of ZooKeeper are surprised to learn that a significant amount of connection management must -be done manually. For example, when the ZooKeeper client connects to the ensemble it must negotiate a new session, -etc. This takes some time. If you use a ZooKeeper client API before the connection process has completed, ZooKeeper -will throw an exception. These types of exceptions are referred to as "recoverable" errors. Curator automatically -handles connection management, greatly simplifying client code. Instead of directly using the ZooKeeper APIs you -use Curator APIs that internally check for connection completion and wrap each ZooKeeper API in a retry loop. -Curator uses a retry mechanism to handle recoverable errors and automatically retry operations. The method of retry -is customizable. Curator comes bundled with several implementations (ExponentialBackoffRetry, etc.) or custom implementations can be written. - -The ZooKeeper documentation describes many possible uses for ZooKeeper calling each a "recipe". While the distribution -comes bundled with a few implementations of these recipes, most ZooKeeper users will need to manually implement one -or more of the recipes. Implementing a ZooKeeper recipe is not trivial. Besides the connection handling issues, there -are numerous edge cases that are not well documented that must be considered. For example, many recipes require that an -ephemeral-sequential node be created. New users of ZooKeeper will not know that there is an edge case in ephemeral-sequential -node creation that requires you to put a special "marker" in the nodeâs name so that you can search for the created node if an -I/O failure occurs. This is but one of many edge cases that are not well documented but are handled by Curator. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-curator/blob/eee5bd4c/src/site/confluence/patches.confluence ---------------------------------------------------------------------- diff --git a/src/site/confluence/patches.confluence b/src/site/confluence/patches.confluence deleted file mode 100644 index 72f1fbf..0000000 --- a/src/site/confluence/patches.confluence +++ /dev/null @@ -1,38 +0,0 @@ -h1. Submitting Patches - -h2. Apache Contribution Guide -Please read the [[Apache Contribution Guide|http://www.apache.org/foundation/getinvolved.html]]. - -h2. Tools/Libraries -Curator uses: - -* Java 6 -* Maven -* Jira -* TestNG -* SLF4J -* Google Guava - -h2. Style/Development Guide -* Use spaces not tabs. -* Match the style of the Curator files. Any patches will be re-formatted to match Curator style. -* All submissions must have TestNG tests. -* All submissions must have proper Apache license headers. -* The simpler and smaller the change the more likely it is to be accepted. - -h2. Creating A Patch -The Apache Curator source code repository holds the current source. A link to information about using the -Apache Curator source code repository is available on the main Apache Curator page. Apache Curator -uses the Git version control system. - -You must create an issue in the [[Curator's Issue Tracker|https://issues.apache.org/jira/browse/CURATOR]]. -Create your patch against the latest revision of the files in the source code repository. Use Git to create the patch: - -{noformat} -git diff [options] > [filename] -{noformat} - -The patch filename should match the Issue Number. i.e. if the Issue Number is _CURATOR-101_ the patch filename should be -_CURATOR-101.patch_. Attach the patch file to the Issue. - -All discussion, comments, etc. regarding the patch should be in the Issue Tracker and not by email. http://git-wip-us.apache.org/repos/asf/incubator-curator/blob/eee5bd4c/src/site/confluence/tech-note-1.confluence ---------------------------------------------------------------------- diff --git a/src/site/confluence/tech-note-1.confluence b/src/site/confluence/tech-note-1.confluence deleted file mode 100644 index 663c070..0000000 --- a/src/site/confluence/tech-note-1.confluence +++ /dev/null @@ -1,39 +0,0 @@ -h1. Tech Note 1 - -ZooKeeper watches are single threaded. - -h2. Details - -When your watcher is called, it should return as quickly as possible. All ZooKeeper watchers are serialized - -processed by a single thread. Thus, *no other watchers can be processed while your watcher is running*. For example, a -Curator user had a watcher handler something like this: - -{code} -... -InterProcessMutex lock = ... - -public void process(WatchedEvent event) -{ - lock.acquire(); - ... -} -{code} - -This *cannot work*. Curator's InterProcessMutex relies on ZooKeeper watchers getting notified. The code above, however, -is holding on to the ZooKeeper watcher processing thread. The way to fix this is to run the code that needs a lock in a separate thread. e.g. - -{code} -... -InterProcessMutex lock = ... -ExecutorService service = ... - -public void process(WatchedEvent event) -{ - service.submit(new Callable<Void>(){ - Void call() { - lock.acquire(); - ... - } - }); -} -{code} http://git-wip-us.apache.org/repos/asf/incubator-curator/blob/eee5bd4c/src/site/confluence/tech-note-2.confluence ---------------------------------------------------------------------- diff --git a/src/site/confluence/tech-note-2.confluence b/src/site/confluence/tech-note-2.confluence deleted file mode 100644 index 78e1414..0000000 --- a/src/site/confluence/tech-note-2.confluence +++ /dev/null @@ -1,19 +0,0 @@ -h1. Tech Note 2 - -InterProcessMutex acquire() can be used to return immediately if lock can't be acquired. - -h2. Details - -It's not obvious from the docs, but calling InterProcessMutex.acquire(0, unit) will return immediately (i.e. without any -waiting) if the lock cannot be acquired. - -e.g. - -{code} -InterProcessMutex lock = ... -boolean didLock = lock.acquire(0, TimeUnit.any); -if ( !didLock ) -{ - // comes back immediately -} -{code} http://git-wip-us.apache.org/repos/asf/incubator-curator/blob/eee5bd4c/src/site/confluence/tech-note-3.confluence ---------------------------------------------------------------------- diff --git a/src/site/confluence/tech-note-3.confluence b/src/site/confluence/tech-note-3.confluence deleted file mode 100644 index 8326256..0000000 --- a/src/site/confluence/tech-note-3.confluence +++ /dev/null @@ -1,25 +0,0 @@ -h1. Tech Note 3 - -Dealing with session failure. - -h2. Details - -ZooKeeper clients maintain a session with the server ensemble. Ephemeral nodes are tied to this session. -When writing ZooKeeper-based applications you must deal with session expirations (due to network partitions, -server crashes, etc.). This ZooKeeper FAQ discusses it: -[[http://wiki.apache.org/hadoop/ZooKeeper/FAQ#A3]] - -For the most part, Curator shields you from the details of session management. However, Curator's -behavior can be modified. By default, Curator treats session failures the same way that it treats connection -failures: i.e. the current retry policy is checked and, if permitted, operations are retried. - -There are use-cases, though, where a series of operations must be tied to the ZooKeeper session. For example, -an ephemeral node is created as a kind of marker then several other ZooKeeper operations are performed. If -the session were to fail at any point, the entire operation should fail. Curator's default behavior doesn't do this. -When you need this behavior, use: - -{code} -SessionFailRetryLoop -{code} - -This is similar to the standard retry loop but if a session fails, any future Curator methods (in the same thread) will also fail. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-curator/blob/eee5bd4c/src/site/confluence/tech-note-4.confluence ---------------------------------------------------------------------- diff --git a/src/site/confluence/tech-note-4.confluence b/src/site/confluence/tech-note-4.confluence deleted file mode 100644 index c61bc0a..0000000 --- a/src/site/confluence/tech-note-4.confluence +++ /dev/null @@ -1,17 +0,0 @@ -h1. Tech Note 4 - -ZooKeeper makes a very bad Queue source. - -The ZooKeeper recipes page lists Queues as a possible use-case for ZooKeeper. Curator includes -several Queue recipes. In our experience, however, it is a bad idea to use ZooKeeper as a Queue: - -* ZooKeeper has a 1MB transport limitation. In practice this means that ZNodes must be relatively small. -Typically, queues can contain many thousands of messages. - -* ZooKeeper can slow down considerably on startup if there are many large ZNodes. This will be common if -you are using ZooKeeper for queues. You will need to significantly increase initLimit and syncLimit. - -* If a ZNode gets too big it can be extremely difficult to clean. getChildren() will fail on the node. At -Netflix we had to create a special-purpose program that had a huge value for {{jute.maxbuffer}} in order to get the nodes and delete them. - -* ZooKeeper can start to perform badly if there are many nodes with thousands of children. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-curator/blob/eee5bd4c/src/site/confluence/tech-notes.confluence ---------------------------------------------------------------------- diff --git a/src/site/confluence/tech-notes.confluence b/src/site/confluence/tech-notes.confluence deleted file mode 100644 index c4d8928..0000000 --- a/src/site/confluence/tech-notes.confluence +++ /dev/null @@ -1,8 +0,0 @@ -h1. Tech Notes - -Various questions, issues, etc. come up from time to time. Answers and workarounds will be collected here as Tech Notes. - -|[[TN1|tech-note-1.html]]|[[ZooKeeper watches are single threaded|tech-note-1.html]]| -|[[TN2|tech-note-2.html]]|[[How do I try to lock with InterProcessMutex but return immediately if lock can't be acquired?|tech-note-2.html]]| -|[[TN3|tech-note-3.html]]|[[Dealing with session failure|tech-note-3.html]]| -|[[TN4|tech-note-4.html]]|[[ZooKeeper is not a good system to use as a distributed queue|tech-note-4.html]]| http://git-wip-us.apache.org/repos/asf/incubator-curator/blob/eee5bd4c/src/site/site.xml ---------------------------------------------------------------------- diff --git a/src/site/site.xml b/src/site/site.xml index d96ab70..007747e 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -76,7 +76,7 @@ <menu name="Details" inherit="top"> <item name="Error Handling" href="errors.html"/> <item name="Logging and Tracing" href="logging.html"/> - <item name="Tech Notes" href="tech-notes.html"/> + <item name="Tech Notes" href="https://cwiki.apache.org/confluence/display/CURATOR/Tech+Notes"/> <item name="Exhibitor Integration" href="exhibitor.html"/> <item name="Project Information" href="project-info.html"/> <item name="Javadoc" href="apidocs/index.html"/> @@ -89,10 +89,10 @@ </menu> <menu name="Community" inherit="top"> - <item name="Submitting Patches" href="patches.html"/> - <item name="History" href="history.html"/> - <item name="Third Party Articles" href="articles.html"/> - <item name="Third Party Contributions" href="contributions.html"/> + <item name="Submitting Patches" href="https://cwiki.apache.org/confluence/display/CURATOR/Submitting+Patches"/> + <item name="History" href="https://cwiki.apache.org/confluence/display/CURATOR/Curator's+History"/> + <item name="Third Party Articles" href="https://cwiki.apache.org/confluence/display/CURATOR/Third+Party+Articles"/> + <item name="Third Party Contributions" href="https://cwiki.apache.org/confluence/display/CURATOR/Contributions+to+Curator"/> <item name="For Committers" href="https://cwiki.apache.org/confluence/display/CURATOR/For+Curator+Committers"/> </menu>
