You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by ma...@apache.org on 2011/12/17 00:39:12 UTC
svn commit: r800375 [2/2] - in /websites/production/zookeeper: ./ content/
content/doc/r3.4.1/ content/doc/r3.4.1/api/ content/doc/r3.4.1/api/org/
content/doc/r3.4.1/api/org/apache/
content/doc/r3.4.1/api/org/apache/zookeeper/ content/doc/r3.4.1/api/or...
Modified: websites/production/zookeeper/content/doc/trunk/recipes.html
==============================================================================
--- websites/production/zookeeper/content/doc/trunk/recipes.html (original)
+++ websites/production/zookeeper/content/doc/trunk/recipes.html Fri Dec 16 23:39:04 2011
@@ -210,6 +210,9 @@ document.write("Last Published: " + docu
<a href="#ch_recipes">A Guide to Creating Higher-level Constructs with ZooKeeper</a>
<ul class="minitoc">
<li>
+<a href="#sc_recipes_errorHandlingNote">Important Note About Error Handling</a>
+</li>
+<li>
<a href="#sc_outOfTheBox">Out of the Box Applications: Name Service, Configuration, Group
Membership</a>
</li>
@@ -233,6 +236,9 @@ document.write("Last Published: " + docu
<a href="#sc_recipes_Locks">Locks</a>
<ul class="minitoc">
<li>
+<a href="#sc_recipes_GuidNote">Recoverable Errors and the GUID</a>
+</li>
+<li>
<a href="#Shared+Locks">Shared Locks</a>
</li>
<li>
@@ -281,6 +287,17 @@ document.write("Last Published: " + docu
as event handles or queues, a more practical means of performing the same
function. In general, the examples in this section are designed to
stimulate thought.</p>
+<a name="sc_recipes_errorHandlingNote"></a>
+<h3 class="h4">Important Note About Error Handling</h3>
+<p>When implementing the recipes you must handle recoverable exceptions
+ (see the <a href="http://wiki.apache.org/hadoop/ZooKeeper/FAQ">FAQ</a>). In
+ particular, several of the recipes employ sequential ephemeral
+ nodes. When creating a sequential ephemeral node there is an error case in
+ which the create() succeeds on the server but the server crashes before
+ returning the name of the node to the client. When the client reconnects its
+ session is still valid and, thus, the node is not removed. The implication is
+ that it is difficult for the client to know if its node was created or not. The
+ recipes below include measures to handle this.</p>
<a name="sc_outOfTheBox"></a>
<h3 class="h4">Out of the Box Applications: Name Service, Configuration, Group
Membership</h3>
@@ -454,7 +471,7 @@ document.write("Last Published: " + docu
<li>
<p>if <em>p</em> is the lowest process
- node in L, wait on highest process node in L</p>
+ node in L, wait on highest process node in P</p>
</li>
@@ -563,8 +580,9 @@ document.write("Last Published: " + docu
<li>
<p>Call <strong>create( )</strong> with a pathname
- of "_locknode_/lock-" and the <em>sequence</em> and
- <em>ephemeral</em> flags set.</p>
+ of "_locknode_/guid-lock-" and the <em>sequence</em> and
+ <em>ephemeral</em> flags set. The <em>guid</em>
+ is needed in case the create() result is missed. See the note below.</p>
</li>
@@ -639,6 +657,22 @@ document.write("Last Published: " + docu
</li>
</ul>
+<a name="sc_recipes_GuidNote"></a>
+<h4>Recoverable Errors and the GUID</h4>
+<ul>
+
+<li>
+
+<p>If a recoverable error occurs calling <strong>create()</strong> the
+ client should call <strong>getChildren()</strong> and check for a node
+ containing the <em>guid</em> used in the path name.
+ This handles the case (noted <a href="#sc_recipes_errorHandlingNote">above</a>) of
+ the create() succeeding on the server but the server crashing before returning the name
+ of the new node.</p>
+
+</li>
+
+</ul>
<a name="Shared+Locks"></a>
<h4>Shared Locks</h4>
<p>You can implement shared locks by with a few changes to the lock
@@ -666,7 +700,7 @@ document.write("Last Published: " + docu
<p>Call <strong>create( )</strong> to
create a node with pathname
- "<span class="codefrag filename">_locknode_/read-</span>". This is the
+ "<span class="codefrag filename">guid-/read-</span>". This is the
lock node use later in the protocol. Make sure to set both
the <em>sequence</em> and
<em>ephemeral</em> flags.</p>
@@ -731,7 +765,7 @@ document.write("Last Published: " + docu
<p>Call <strong>create( )</strong> to
create a node with pathname
- "<span class="codefrag filename">_locknode_/write-</span>". This is the
+ "<span class="codefrag filename">guid-/write-</span>". This is the
lock node spoken of later in the protocol. Make sure to
set both <em>sequence</em> and
<em>ephemeral</em> flags.</p>
@@ -784,9 +818,10 @@ document.write("Last Published: " + docu
</table>
-<div class="note">
-<div class="label">Note</div>
-<div class="content">
+<p>Notes:</p>
+<ul>
+
+<li>
<p>It might appear that this recipe creates a herd effect:
when there is a large group of clients waiting for a read
@@ -796,11 +831,20 @@ document.write("Last Published: " + docu
as all those waiting reader clients should be released since
they have the lock. The herd effect refers to releasing a
"herd" when in fact only a single or a small number of
- machines can proceed.
- </p>
+ machines can proceed.</p>
-</div>
-</div>
+</li>
+
+</ul>
+<ul>
+
+<li>
+
+<p>See the <a href="#sc_recipes_GuidNote">note for Locks</a> on how to use the guid in the node.</p>
+
+</li>
+
+</ul>
<a name="sc_recoverableSharedLocks"></a>
<h4>Recoverable Shared Locks</h4>
<p>With minor modifications to the Shared Lock protocol, you make
@@ -860,7 +904,7 @@ document.write("Last Published: " + docu
<p>A simple way of doing leader election with ZooKeeper is to use the
<strong>SEQUENCE|EPHEMERAL</strong> flags when creating
znodes that represent "proposals" of clients. The idea is to have a znode,
- say "/election", such that each znode creates a child znode "/election/n_"
+ say "/election", such that each znode creates a child znode "/election/guid-n_"
with both flags SEQUENCE|EPHEMERAL. With the sequence flag, ZooKeeper
automatically appends a sequence number that is greater that any one
previously appended to a child of "/election". The process that created
@@ -889,7 +933,7 @@ document.write("Last Published: " + docu
<li>
-<p>Create znode z with path "ELECTION/n_" with both SEQUENCE and
+<p>Create znode z with path "ELECTION/guid-n_" with both SEQUENCE and
EPHEMERAL flags;</p>
</li>
@@ -905,7 +949,7 @@ document.write("Last Published: " + docu
<li>
-<p>Watch for changes on "ELECTION/n_j", where j is the smallest
+<p>Watch for changes on "ELECTION/guid-n_j", where j is the smallest
sequence number such that j < i and n_j is a znode in C;</p>
</li>
@@ -931,17 +975,35 @@ document.write("Last Published: " + docu
<li>
-<p>Otherwise, watch for changes on "ELECTION/n_j", where j is the
+<p>Otherwise, watch for changes on "ELECTION/guid-n_j", where j is the
smallest sequence number such that j < i and n_j is a znode in C;
</p>
</li>
</ol>
+<p>Notes:</p>
+<ul>
+
+<li>
+
<p>Note that the znode having no preceding znode on the list of
- children does not imply that the creator of this znode is aware that it is
- the current leader. Applications may consider creating a separate to znode
- to acknowledge that the leader has executed the leader procedure. </p>
+ children does not imply that the creator of this znode is aware that it is
+ the current leader. Applications may consider creating a separate to znode
+ to acknowledge that the leader has executed the leader procedure. </p>
+
+</li>
+
+</ul>
+<ul>
+
+<li>
+
+<p>See the <a href="#sc_recipes_GuidNote">note for Locks</a> on how to use the guid in the node.</p>
+
+</li>
+
+</ul>
</div>
<p align="right">
Modified: websites/production/zookeeper/content/doc/trunk/recipes.pdf
==============================================================================
Files websites/production/zookeeper/content/doc/trunk/recipes.pdf (original) and websites/production/zookeeper/content/doc/trunk/recipes.pdf Fri Dec 16 23:39:04 2011 differ
Modified: websites/production/zookeeper/content/doc/trunk/releasenotes.pdf
==============================================================================
Files websites/production/zookeeper/content/doc/trunk/releasenotes.pdf (original) and websites/production/zookeeper/content/doc/trunk/releasenotes.pdf Fri Dec 16 23:39:04 2011 differ
Modified: websites/production/zookeeper/content/doc/trunk/zookeeperAdmin.html
==============================================================================
--- websites/production/zookeeper/content/doc/trunk/zookeeperAdmin.html (original)
+++ websites/production/zookeeper/content/doc/trunk/zookeeperAdmin.html Fri Dec 16 23:39:04 2011
@@ -291,6 +291,9 @@ document.write("Last Published: " + docu
<a href="#sc_authOptions">Authentication & Authorization Options</a>
</li>
<li>
+<a href="#Experimental+Options%2FFeatures">Experimental Options/Features</a>
+</li>
+<li>
<a href="#Unsafe+Options">Unsafe Options</a>
</li>
<li>
@@ -1155,6 +1158,21 @@ server.3=zoo3:2888:3888</pre>
the <strong>tickTime</strong>.</p>
</dd>
+
+<dt>
+<term>fsync.warningthresholdms</term>
+</dt>
+<dd>
+<p>(Java system property: <strong>fsync.warningthresholdms</strong>)</p>
+<p>
+<strong>New in 3.3.4:</strong> A
+ warning message will be output to the log whenever an
+ fsync in the Transactional Log (WAL) takes longer than
+ this value. The values is specified in milliseconds and
+ defaults to 1000. This value can only be set as a
+ system property.</p>
+</dd>
+
<dt>
<term>autopurge.snapRetainCount</term>
@@ -1372,6 +1390,31 @@ server.3=zoo3:2888:3888</pre>
</dd>
</dl>
+<a name="Experimental+Options%2FFeatures"></a>
+<h4>Experimental Options/Features</h4>
+<p>New features that are currently considered experimental.</p>
+<dl>
+
+<dt>
+<term>Read Only Mode Server</term>
+</dt>
+<dd>
+<p>(Java system property: <strong>readonlymode.enabled</strong>)</p>
+<p>
+<strong>New in 3.4.0:</strong>
+ Setting this value to true enables Read Only Mode server
+ support (disabled by default). ROM allows clients
+ sessions which requested ROM support to connect to the
+ server even when the server might be partitioned from
+ the quorum. In this mode ROM clients can still read
+ values from the ZK service, but will be unable to write
+ values and see changes from other clients. See
+ ZOOKEEPER-784 for more details.
+ </p>
+</dd>
+
+
+</dl>
<a name="Unsafe+Options"></a>
<h4>Unsafe Options</h4>
<p>The following options can be useful, but be careful when you use
Modified: websites/production/zookeeper/content/doc/trunk/zookeeperAdmin.pdf
==============================================================================
Files websites/production/zookeeper/content/doc/trunk/zookeeperAdmin.pdf (original) and websites/production/zookeeper/content/doc/trunk/zookeeperAdmin.pdf Fri Dec 16 23:39:04 2011 differ
Modified: websites/production/zookeeper/content/doc/trunk/zookeeperHierarchicalQuorums.pdf
==============================================================================
Files websites/production/zookeeper/content/doc/trunk/zookeeperHierarchicalQuorums.pdf (original) and websites/production/zookeeper/content/doc/trunk/zookeeperHierarchicalQuorums.pdf Fri Dec 16 23:39:04 2011 differ
Modified: websites/production/zookeeper/content/doc/trunk/zookeeperInternals.pdf
==============================================================================
Files websites/production/zookeeper/content/doc/trunk/zookeeperInternals.pdf (original) and websites/production/zookeeper/content/doc/trunk/zookeeperInternals.pdf Fri Dec 16 23:39:04 2011 differ
Modified: websites/production/zookeeper/content/doc/trunk/zookeeperJMX.pdf
==============================================================================
Files websites/production/zookeeper/content/doc/trunk/zookeeperJMX.pdf (original) and websites/production/zookeeper/content/doc/trunk/zookeeperJMX.pdf Fri Dec 16 23:39:04 2011 differ
Modified: websites/production/zookeeper/content/doc/trunk/zookeeperObservers.pdf
==============================================================================
Files websites/production/zookeeper/content/doc/trunk/zookeeperObservers.pdf (original) and websites/production/zookeeper/content/doc/trunk/zookeeperObservers.pdf Fri Dec 16 23:39:04 2011 differ
Modified: websites/production/zookeeper/content/doc/trunk/zookeeperOver.pdf
==============================================================================
Files websites/production/zookeeper/content/doc/trunk/zookeeperOver.pdf (original) and websites/production/zookeeper/content/doc/trunk/zookeeperOver.pdf Fri Dec 16 23:39:04 2011 differ
Modified: websites/production/zookeeper/content/doc/trunk/zookeeperProgrammers.pdf
==============================================================================
Files websites/production/zookeeper/content/doc/trunk/zookeeperProgrammers.pdf (original) and websites/production/zookeeper/content/doc/trunk/zookeeperProgrammers.pdf Fri Dec 16 23:39:04 2011 differ
Modified: websites/production/zookeeper/content/doc/trunk/zookeeperQuotas.pdf
==============================================================================
Files websites/production/zookeeper/content/doc/trunk/zookeeperQuotas.pdf (original) and websites/production/zookeeper/content/doc/trunk/zookeeperQuotas.pdf Fri Dec 16 23:39:04 2011 differ
Modified: websites/production/zookeeper/content/doc/trunk/zookeeperStarted.pdf
==============================================================================
Files websites/production/zookeeper/content/doc/trunk/zookeeperStarted.pdf (original) and websites/production/zookeeper/content/doc/trunk/zookeeperStarted.pdf Fri Dec 16 23:39:04 2011 differ
Modified: websites/production/zookeeper/content/doc/trunk/zookeeperTutorial.pdf
==============================================================================
Files websites/production/zookeeper/content/doc/trunk/zookeeperTutorial.pdf (original) and websites/production/zookeeper/content/doc/trunk/zookeeperTutorial.pdf Fri Dec 16 23:39:04 2011 differ
Modified: websites/production/zookeeper/content/index.html
==============================================================================
--- websites/production/zookeeper/content/index.html (original)
+++ websites/production/zookeeper/content/index.html Fri Dec 16 23:39:04 2011
@@ -120,8 +120,8 @@
<h3>Documentation</h3>
<ul>
-<li><a href="./doc/r3.4.0">Release 3.4.0</a></li>
-<li><a href="./doc/r3.3.4">Release 3.3.4(current)</a></li>
+<li><a href="./doc/r3.4.1">Release 3.4.1(current)</a></li>
+<li><a href="./doc/r3.3.4">Release 3.3.4(stable)</a></li>
<li><a href="./doc/r3.3.3">Release 3.3.3</a></li>
<li><a href="./doc/r3.3.2">Release 3.3.2</a></li>
<li><a href="./doc/r3.2.2">Release 3.2.2</a></li>
Modified: websites/production/zookeeper/content/irc.html
==============================================================================
--- websites/production/zookeeper/content/irc.html (original)
+++ websites/production/zookeeper/content/irc.html Fri Dec 16 23:39:04 2011
@@ -96,8 +96,8 @@
<h3>Documentation</h3>
<ul>
-<li><a href="./doc/r3.4.0">Release 3.4.0</a></li>
-<li><a href="./doc/r3.3.4">Release 3.3.4(current)</a></li>
+<li><a href="./doc/r3.4.1">Release 3.4.1(current)</a></li>
+<li><a href="./doc/r3.3.4">Release 3.3.4(stable)</a></li>
<li><a href="./doc/r3.3.3">Release 3.3.3</a></li>
<li><a href="./doc/r3.3.2">Release 3.3.2</a></li>
<li><a href="./doc/r3.2.2">Release 3.2.2</a></li>
Modified: websites/production/zookeeper/content/lists.html
==============================================================================
--- websites/production/zookeeper/content/lists.html (original)
+++ websites/production/zookeeper/content/lists.html Fri Dec 16 23:39:04 2011
@@ -136,8 +136,8 @@ In order to post to the list, it is nece
<h3>Documentation</h3>
<ul>
-<li><a href="./doc/r3.4.0">Release 3.4.0</a></li>
-<li><a href="./doc/r3.3.4">Release 3.3.4(current)</a></li>
+<li><a href="./doc/r3.4.1">Release 3.4.1(current)</a></li>
+<li><a href="./doc/r3.3.4">Release 3.3.4(stable)</a></li>
<li><a href="./doc/r3.3.3">Release 3.3.3</a></li>
<li><a href="./doc/r3.3.2">Release 3.3.2</a></li>
<li><a href="./doc/r3.2.2">Release 3.2.2</a></li>
Modified: websites/production/zookeeper/content/privacy.html
==============================================================================
--- websites/production/zookeeper/content/privacy.html (original)
+++ websites/production/zookeeper/content/privacy.html Fri Dec 16 23:39:04 2011
@@ -108,8 +108,8 @@
<h3>Documentation</h3>
<ul>
-<li><a href="./doc/r3.4.0">Release 3.4.0</a></li>
-<li><a href="./doc/r3.3.4">Release 3.3.4(current)</a></li>
+<li><a href="./doc/r3.4.1">Release 3.4.1(current)</a></li>
+<li><a href="./doc/r3.3.4">Release 3.3.4(stable)</a></li>
<li><a href="./doc/r3.3.3">Release 3.3.3</a></li>
<li><a href="./doc/r3.3.2">Release 3.3.2</a></li>
<li><a href="./doc/r3.2.2">Release 3.2.2</a></li>
Modified: websites/production/zookeeper/content/releases.html
==============================================================================
--- websites/production/zookeeper/content/releases.html (original)
+++ websites/production/zookeeper/content/releases.html Fri Dec 16 23:39:04 2011
@@ -73,6 +73,14 @@
<h2 id="news">News</h2>
+<h3>16 Dec, 2011: release 3.4.1 available</h3>
+
+<p>This release fixes a critical bug with data loss in 3.4.0. See<br />
+<a href="http://zookeeper.apache.org/doc/r3.4.1/releasenotes.html">ZooKeeper 3.4.1 Release Notes</a> for details.<br />
+In case you are already using 3.4.0 release please upgrade <span class="caps">ASAP.</span></p>
+
+<p>Please note that this is an alpha release and not ready for production as of now.</p>
+
<h3>26 Nov, 2011: release 3.3.4 available</h3>
<p>The release fixes a number of critical bugs that could cause data corruption. See<br />
@@ -80,8 +88,7 @@
<h3>22 Nov, 2011: release 3.4.0 available</h3>
-<p>This a major release coming after a long time. This has many features including security, multi update api's, rpm/deb support, C native windows support. See <br />
-<a href="http://zookeeper.apache.org/doc/r3.4.0/releasenotes.html">ZooKeeper 3.4.0 Release Notes</a> for details. Please note that this is beta release. The current stable release is 3.3.3.</p>
+<p>Due to data loss issues, this release has been removed from the downloads page. Release 3.4.1 is now available. </p>
<h3>27 Feb, 2011: release 3.3.3 available</h3>
@@ -191,8 +198,8 @@
<h3>Documentation</h3>
<ul>
-<li><a href="./doc/r3.4.0">Release 3.4.0</a></li>
-<li><a href="./doc/r3.3.4">Release 3.3.4(current)</a></li>
+<li><a href="./doc/r3.4.1">Release 3.4.1(current)</a></li>
+<li><a href="./doc/r3.3.4">Release 3.3.4(stable)</a></li>
<li><a href="./doc/r3.3.3">Release 3.3.3</a></li>
<li><a href="./doc/r3.3.2">Release 3.3.2</a></li>
<li><a href="./doc/r3.2.2">Release 3.2.2</a></li>
Modified: websites/production/zookeeper/content/svn.html
==============================================================================
--- websites/production/zookeeper/content/svn.html (original)
+++ websites/production/zookeeper/content/svn.html Fri Dec 16 23:39:04 2011
@@ -106,8 +106,8 @@
<h3>Documentation</h3>
<ul>
-<li><a href="./doc/r3.4.0">Release 3.4.0</a></li>
-<li><a href="./doc/r3.3.4">Release 3.3.4(current)</a></li>
+<li><a href="./doc/r3.4.1">Release 3.4.1(current)</a></li>
+<li><a href="./doc/r3.3.4">Release 3.3.4(stable)</a></li>
<li><a href="./doc/r3.3.3">Release 3.3.3</a></li>
<li><a href="./doc/r3.3.2">Release 3.3.2</a></li>
<li><a href="./doc/r3.2.2">Release 3.2.2</a></li>