Author: buildbot
Date: Wed May 9 12:18:44 2012
New Revision: 816889
Log:
Production update by buildbot for camel
Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/zookeeper.html
Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/camel/content/zookeeper.html
==============================================================================
--- websites/production/camel/content/zookeeper.html (original)
+++ websites/production/camel/content/zookeeper.html Wed May 9 12:18:44 2012
@@ -78,7 +78,7 @@
<div class="wiki-content maincontent"><h2><a shape="rect"
name="Zookeeper-ZooKeeper"></a>ZooKeeper</h2>
<p><b>Available as of Camel 2.9</b></p>
-<p>The ZooKeeper component to allow interaction with a <a shape="rect"
class="external-link" href="http://hadoop.apache.org/zookeeper/">ZooKeeper</a>
cluster and it exposes the following features to Camel.</p>
+<p>The ZooKeeper component allows interaction with a <a shape="rect"
class="external-link" href="http://hadoop.apache.org/zookeeper/">ZooKeeper</a>
cluster and exposes the following features to Camel:</p>
<ol><li>Creation of nodes in any of the ZooKeeper create modes.</li><li>Get
and Set the data contents of arbitrary cluster nodes.</li><li>Create and
retrieve the list the child nodes attached to a particular node.</li><li>A
Distributed <a shape="rect" href="routepolicy.html"
title="RoutePolicy">RoutePolicy</a> that leverages a Leader election
coordinated by ZooKeeper to determine if exchanges should get
processed.</li></ol>
@@ -136,7 +136,7 @@ from(<span class="code-quote">"zookeeper
<h4><a shape="rect" name="Zookeeper-Writingtoaznode."></a>Writing to a
znode.</h4>
-<p>the following snippet will write the payload of the exchange into the znode
at '/somepath/somenode/' provided that it already exists </p>
+<p>The following snippet will write the payload of the exchange into the znode
at '/somepath/somenode/' provided that it already exists </p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent
panelContent">
<pre class="code-java">
from(<span class="code-quote">"direct:write-to-znode"</span>).to(<span
class="code-quote">"zookeeper:<span
class="code-comment">//localhost:39913/somepath/somenode"</span>);</span>
@@ -184,7 +184,7 @@ template.sendBodyAndHeader(<span class="
<h3><a shape="rect"
name="Zookeeper-ZooKeeperenabledRoutepolicy."></a>ZooKeeper enabled Route
policy.</h3>
-<p>ZooKeeper allows for very simple and effective leader election out of the
box; This component exploits this election capability in a <a shape="rect"
href="routepolicy.html" title="RoutePolicy">RoutePolicy</a> to control when and
how routes are enabled. This policy would typically be used in fail-over
scenarios, to control identical instances of a route across a cluster of Camel
based servers. A very common scenarion is a simple 'Master-Slave' setup where
there are multiple instances of a route distributed across a cluster but only
one of them, that of the master, should be running at a time. If the master
fails, a new master should be elected from the available slaves and the route
in this new master should be started.</p>
+<p>ZooKeeper allows for very simple and effective leader election out of the
box; This component exploits this election capability in a <a shape="rect"
href="routepolicy.html" title="RoutePolicy">RoutePolicy</a> to control when and
how routes are enabled. This policy would typically be used in fail-over
scenarios, to control identical instances of a route across a cluster of Camel
based servers. A very common scenario is a simple 'Master-Slave' setup where
there are multiple instances of a route distributed across a cluster but only
one of them, that of the master, should be running at a time. If the master
fails, a new master should be elected from the available slaves and the route
in this new master should be started.</p>
<p>The policy uses a common znode path across all instances of the RoutePolicy
that will be involved in the election. Each policy writes its id into this node
and zookeeper will order the writes in the order it received them. The policy
then reads the listing of the node to see what postion of its id; this postion
is used to determine if the route should be started or not. The policy is
configured at startup with the number of route instances that should be started
across the cluster and if its position in the list is less than this value then
its route will be started. For a Master-slave scenario, the route is configured
with 1 route instance and only the first entry in the listing will start its
route. All policies watch for updates to the listing and if the listing changes
they recalculate if their route should be started. For more info on Zookeeper's
Leader election capability <a shape="rect" class="external-link"
href="http://zookeeper.apache.org/doc/trunk/recipes.html#
sc_leaderElection">see</a> </p>