zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r838787 [29/42] - in /websites/staging/zookeeper/trunk/content: ./ bookkeeper/docs/trunk/ doc/r3.4.5/ doc/r3.4.5/api/ doc/r3.4.5/api/org/ doc/r3.4.5/api/org/apache/ doc/r3.4.5/api/org/apache/zookeeper/ doc/r3.4.5/api/org/apache/zookeeper/cl...
Date Mon, 19 Nov 2012 00:36:48 GMT
Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/bookkeeperProgrammer.html
==============================================================================
--- websites/staging/zookeeper/trunk/content/doc/r3.4.5/bookkeeperProgrammer.html (added)
+++ websites/staging/zookeeper/trunk/content/doc/r3.4.5/bookkeeperProgrammer.html Mon Nov 19 00:36:21 2012
@@ -0,0 +1,1083 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="Apache Forrest" name="Generator">
+<meta name="Forrest-version" content="0.9">
+<meta name="Forrest-skin-name" content="pelt">
+<title>BookKeeper Getting Started Guide</title>
+<link type="text/css" href="skin/basic.css" rel="stylesheet">
+<link media="screen" type="text/css" href="skin/screen.css" rel="stylesheet">
+<link media="print" type="text/css" href="skin/print.css" rel="stylesheet">
+<link type="text/css" href="skin/profile.css" rel="stylesheet">
+<script src="skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="skin/fontsize.js" language="javascript" type="text/javascript"></script>
+<link rel="shortcut icon" href="images/favicon.ico">
+</head>
+<body onload="init()">
+<script type="text/javascript">ndeSetTextSize();</script>
+<div id="top">
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://zookeeper.apache.org/">ZooKeeper</a> &gt; <a href="http://zookeeper.apache.org/">ZooKeeper</a><script src="skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
+</div>
+<!--+
+    |header
+    +-->
+<div class="header">
+<!--+
+    |start group logo
+    +-->
+<div class="grouplogo">
+<a href="http://hadoop.apache.org/"><img class="logoImage" alt="Hadoop" src="images/hadoop-logo.jpg" title="Apache Hadoop"></a>
+</div>
+<!--+
+    |end group logo
+    +-->
+<!--+
+    |start Project Logo
+    +-->
+<div class="projectlogo">
+<a href="http://zookeeper.apache.org/"><img class="logoImage" alt="ZooKeeper" src="images/zookeeper_small.gif" title="ZooKeeper: distributed coordination"></a>
+</div>
+<!--+
+    |end Project Logo
+    +-->
+<!--+
+    |start Search
+    +-->
+<div class="searchbox">
+<form action="http://www.google.com/search" method="get" class="roundtopsmall">
+<input value="zookeeper.apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google">&nbsp; 
+                    <input name="Search" value="Search" type="submit">
+</form>
+</div>
+<!--+
+    |end search
+    +-->
+<!--+
+    |start Tabs
+    +-->
+<ul id="tabs">
+<li>
+<a class="unselected" href="http://zookeeper.apache.org/">Project</a>
+</li>
+<li>
+<a class="unselected" href="https://cwiki.apache.org/confluence/display/ZOOKEEPER/">Wiki</a>
+</li>
+<li class="current">
+<a class="selected" href="index.html">ZooKeeper 3.4 Documentation</a>
+</li>
+</ul>
+<!--+
+    |end Tabs
+    +-->
+</div>
+</div>
+<div id="main">
+<div id="publishedStrip">
+<!--+
+    |start Subtabs
+    +-->
+<div id="level2tabs"></div>
+<!--+
+    |end Endtabs
+    +-->
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+
+             &nbsp;
+           </div>
+<!--+
+    |start Menu, mainarea
+    +-->
+<!--+
+    |start Menu
+    +-->
+<div id="menu">
+<div onclick="SwitchMenu('menu_1.1', 'skin/')" id="menu_1.1Title" class="menutitle">Overview</div>
+<div id="menu_1.1" class="menuitemgroup">
+<div class="menuitem">
+<a href="index.html">Welcome</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperOver.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperStarted.html">Getting Started</a>
+</div>
+<div class="menuitem">
+<a href="releasenotes.html">Release Notes</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.2', 'skin/')" id="menu_1.2Title" class="menutitle">Developer</div>
+<div id="menu_1.2" class="menuitemgroup">
+<div class="menuitem">
+<a href="api/index.html">API Docs</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperProgrammers.html">Programmer's Guide</a>
+</div>
+<div class="menuitem">
+<a href="javaExample.html">Java Example</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperTutorial.html">Barrier and Queue Tutorial</a>
+</div>
+<div class="menuitem">
+<a href="recipes.html">Recipes</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_selected_1.3', 'skin/')" id="menu_selected_1.3Title" class="menutitle" style="background-image: url('skin/images/chapter_open.gif');">BookKeeper</div>
+<div id="menu_selected_1.3" class="selectedmenuitemgroup" style="display: block;">
+<div class="menuitem">
+<a href="bookkeeperStarted.html">Getting started</a>
+</div>
+<div class="menuitem">
+<a href="bookkeeperOverview.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="bookkeeperConfig.html">Setup guide</a>
+</div>
+<div class="menupage">
+<div class="menupagetitle">Programmer's guide</div>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.4', 'skin/')" id="menu_1.4Title" class="menutitle">Admin &amp; Ops</div>
+<div id="menu_1.4" class="menuitemgroup">
+<div class="menuitem">
+<a href="zookeeperAdmin.html">Administrator's Guide</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperQuotas.html">Quota Guide</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperJMX.html">JMX</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperObservers.html">Observers Guide</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.5', 'skin/')" id="menu_1.5Title" class="menutitle">Contributor</div>
+<div id="menu_1.5" class="menuitemgroup">
+<div class="menuitem">
+<a href="zookeeperInternals.html">ZooKeeper Internals</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.6', 'skin/')" id="menu_1.6Title" class="menutitle">Miscellaneous</div>
+<div id="menu_1.6" class="menuitemgroup">
+<div class="menuitem">
+<a href="https://cwiki.apache.org/confluence/display/ZOOKEEPER">Wiki</a>
+</div>
+<div class="menuitem">
+<a href="https://cwiki.apache.org/confluence/display/ZOOKEEPER/FAQ">FAQ</a>
+</div>
+<div class="menuitem">
+<a href="http://zookeeper.apache.org/mailing_lists.html">Mailing Lists</a>
+</div>
+</div>
+<div id="credit"></div>
+<div id="roundbottom">
+<img style="display: none" class="corner" height="15" width="15" alt="" src="skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
+<!--+
+  |alternative credits
+  +-->
+<div id="credit2"></div>
+</div>
+<!--+
+    |end Menu
+    +-->
+<!--+
+    |start content
+    +-->
+<div id="content">
+<div title="Portable Document Format" class="pdflink">
+<a class="dida" href="bookkeeperProgrammer.pdf"><img alt="PDF -icon" src="skin/images/pdfdoc.gif" class="skin"><br>
+        PDF</a>
+</div>
+<h1>BookKeeper Getting Started Guide</h1>
+<div id="front-matter">
+<div id="minitoc-area">
+<ul class="minitoc">
+<li>
+<a href="#bk_GettingStarted">Programming with BookKeeper</a>
+<ul class="minitoc">
+<li>
+<a href="#bk_instance"> Instantiating BookKeeper.</a>
+</li>
+<li>
+<a href="#bk_createLedger"> Creating a ledger. </a>
+</li>
+<li>
+<a href="#bk_writeLedger"> Adding entries to a ledger. </a>
+</li>
+<li>
+<a href="#bk_closeLedger"> Closing a ledger. </a>
+</li>
+<li>
+<a href="#bk_openLedger"> Opening a ledger. </a>
+</li>
+<li>
+<a href="#bk_readLedger"> Reading from ledger </a>
+</li>
+<li>
+<a href="#bk_deleteLedger"> Deleting a ledger </a>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+</div>
+  
+
+  
+  
+<a name="bk_GettingStarted"></a>
+<h2 class="h3">Programming with BookKeeper</h2>
+<div class="section">
+<ul>
+      
+<li>
+        
+<p>
+<a href="#bk_instance"> Instantiating BookKeeper.</a>
+</p>
+      
+</li>
+
+      
+<li>
+        
+<p>
+<a href="#bk_createLedger"> Creating a ledger. </a>
+</p>
+      
+</li>
+
+      
+<li>
+        
+<p>
+<a href="#bk_writeLedger"> Adding entries to a ledger. </a>
+</p>
+      
+</li>
+
+      
+<li>
+        
+<p>
+<a href="#bk_closeLedger"> Closing a ledger. </a>
+</p>
+      
+</li>
+      
+	  
+<li>
+        
+<p>
+<a href="#bk_openLedger"> Opening a ledger. </a>
+</p>
+      
+</li>
+      
+      
+<li>
+        
+<p>
+<a href="#bk_readLedger"> Reading from ledger </a>
+</p>
+      
+</li>
+      
+      
+<li>
+        
+<p>
+<a href="#bk_deleteLedger"> Deleting a ledger </a>
+</p>
+      
+</li>
+      
+    
+</ul>
+<a name="bk_instance"></a>
+<h3 class="h4"> Instantiating BookKeeper.</h3>
+<p>
+    The first step to use BookKeeper is to instantiate a BookKeeper object:
+    </p>
+<p>
+    
+<span class="codefrag computeroutput">
+    org.apache.bookkeeper.BookKeeper
+    </span>
+    
+</p>
+<p>
+    There are three BookKeeper constructors:
+    </p>
+<p>
+    
+<span class="codefrag computeroutput">
+	public BookKeeper(String servers) 
+    	throws KeeperException, IOException    
+    </span>
+	
+</p>
+<p>
+    where:
+    </p>
+<ul>
+    	
+<li>
+    	
+<p> 
+        
+<span class="codefrag computeroutput">servers</span> is a comma-separated list of ZooKeeper servers.
+    	</p>
+    	
+</li>
+    
+</ul>
+<p>
+    
+<span class="codefrag computeroutput">
+	public BookKeeper(ZooKeeper zk) 
+    	throws InterruptedException, KeeperException    
+    </span>
+	
+</p>
+<p>
+    where:
+    </p>
+<ul>
+    	
+<li>
+    	
+<p> 
+        
+<span class="codefrag computeroutput">zk</span> is a ZooKeeper object. This constructor is useful when
+        the application also using ZooKeeper and wants to have a single instance of ZooKeeper.  
+    	</p>
+    	
+</li>
+    
+</ul>
+<p>
+    
+<span class="codefrag computeroutput">
+	public BookKeeper(ZooKeeper zk, ClientSocketChannelFactory channelFactory) 
+    	throws InterruptedException, KeeperException    
+    </span>
+	
+</p>
+<p>
+    where:
+    </p>
+<ul>
+    	
+<li>
+    	
+<p> 
+        
+<span class="codefrag computeroutput">zk</span> is a ZooKeeper object. This constructor is useful when
+        the application also using ZooKeeper and wants to have a single instance of ZooKeeper.  
+    	</p>
+    	
+</li>
+    	
+    	
+<li>
+    	
+<p> 
+        
+<span class="codefrag computeroutput">channelFactory</span> is a netty channel object 
+        (<span class="codefrag computeroutput">org.jboss.netty.channel.socket</span>).  
+    	</p>
+    	
+</li>
+    
+</ul>
+<a name="bk_createLedger"></a>
+<h3 class="h4"> Creating a ledger. </h3>
+<p> Before writing entries to BookKeeper, it is necessary to create a ledger. 
+    With the current BookKeeper API, it is possible to create a ledger both synchronously
+    or asynchronously. The following methods belong
+    to <span class="codefrag computeroutput">org.apache.bookkeeper.client.BookKeeper</span>.
+    </p>
+<p>
+   	
+<strong>Synchronous call:</strong>
+   	
+</p>
+<p>
+    
+<span class="codefrag computeroutput">
+    public LedgerHandle createLedger(int ensSize, int qSize, DigestType type,  byte passwd[])
+        throws KeeperException, InterruptedException, 
+        IOException, BKException
+    </span>
+	
+</p>
+<p>
+    where:
+    </p>
+<ul>
+    	
+<li>
+    	
+<p> 
+    	
+<span class="codefrag computeroutput">ensSize</span> is the number of bookies (ensemble size);
+    	</p>
+    	
+</li>
+    
+    	
+<li> 
+    	
+<p>
+    	
+<span class="codefrag computeroutput">qSize</span> is the write quorum size;
+    	</p>
+    	
+</li>
+    
+    	
+<li> 
+    	
+<p>
+    	
+<span class="codefrag computeroutput">type</span> is the type of digest used with entries: either MAC or CRC32.  
+    	</p>
+    	
+</li>
+    	
+    	
+<li>
+    	
+<p>
+    	
+<span class="codefrag computeroutput">passwd</span> is a password that authorizes the client to write to the
+    	ledger being created.
+    	</p>
+    	
+</li>
+    
+</ul>
+<p>
+    All further operations on a ledger are invoked through the <span class="codefrag computeroutput">LedgerHandle</span>
+    object returned.
+    </p>
+<p>
+    As a convenience, we provide a <span class="codefrag computeroutput">createLedger</span> with default parameters (3,2,VERIFIABLE), 
+    and the only two input parameters it requires are a digest type and a password.
+    </p>
+<p>
+   	
+<strong>Asynchronous call:</strong>
+   	
+</p>
+<p>
+    
+<span class="codefrag computeroutput">
+    public void asyncCreateLedger(int ensSize, 
+            int qSize, 
+            DigestType type,  
+            byte passwd[],
+            CreateCallback cb,
+            Object ctx
+            )
+    </span>
+	
+</p>
+<p>
+	The parameters are the same of the synchronous version, with the
+	exception of <span class="codefrag computeroutput">cb</span> and <span class="codefrag computeroutput">ctx</span>. <span class="codefrag computeroutput">CreateCallback</span>
+	is an interface in <span class="codefrag computeroutput">org.apache.bookkeeper.client.AsyncCallback</span>, and
+	a class implementing it has to implement a method called <span class="codefrag computeroutput">createComplete</span>
+	that has the following signature: 
+    </p>
+<p>
+	
+<span class="codefrag computeroutput">
+	void createComplete(int rc, LedgerHandle lh, Object ctx);
+	</span>    
+	
+</p>
+<p>
+	where:
+	</p>
+<ul>
+		
+<li>
+		
+<p>
+		
+<span class="codefrag computeroutput">rc</span> is a return code (please refer to <span class="codefrag computeroutput">org.apache.bookeeper.client.BKException</span> for a list);
+		</p>
+		
+</li>
+	
+		
+<li>
+		
+<p>
+		
+<span class="codefrag computeroutput">lh</span> is a <span class="codefrag computeroutput">LedgerHandle</span> object to manipulate a ledger;
+		</p>
+		
+</li>
+		
+		
+<li>
+		
+<p>
+		
+<span class="codefrag computeroutput">ctx</span> is a control object for accountability purposes. It can be essentially any object the application is happy with.
+		</p>
+		
+</li>
+	
+</ul>
+<p>
+	The <span class="codefrag computeroutput">ctx</span> object passed as a parameter to the call to create a ledger
+	is the one same returned in the callback.
+    </p>
+<a name="bk_writeLedger"></a>
+<h3 class="h4"> Adding entries to a ledger. </h3>
+<p>
+    Once we have a ledger handle <span class="codefrag computeroutput">lh</span> obtained through a call to create a ledger, we
+    can start writing entries. As with creating ledgers, we can write both synchronously and 
+    asynchronously. The following methods belong
+    to <span class="codefrag computeroutput">org.apache.bookkeeper.client.LedgerHandle</span>.
+    </p>
+<p>
+   	
+<strong>Synchronous call:</strong>
+   	
+</p>
+<p>
+    
+<span class="codefrag computeroutput">
+	public long addEntry(byte[] data)
+    	throws InterruptedException
+    </span>
+	
+</p>
+<p>
+    where:
+    </p>
+<ul>
+    	
+<li>
+    	
+<p> 
+    	
+<span class="codefrag computeroutput">data</span> is a byte array;
+    	</p>
+    	
+</li>
+    
+</ul>
+<p>
+	A call to <span class="codefrag computeroutput">addEntry</span> returns the status of the operation (please refer to <span class="codefrag computeroutput">org.apache.bookeeper.client.BKDefs</span> for a list);
+    </p>
+<p>
+   	
+<strong>Asynchronous call:</strong>
+   	
+</p>
+<p>
+    
+<span class="codefrag computeroutput">
+	public void asyncAddEntry(byte[] data, AddCallback cb, Object ctx)
+    </span>
+	
+</p>
+<p>
+    It also takes a byte array as the sequence of bytes to be stored as an entry. Additionaly, it takes
+    a callback object <span class="codefrag computeroutput">cb</span> and a control object <span class="codefrag computeroutput">ctx</span>. The callback object must implement
+    the <span class="codefrag computeroutput">AddCallback</span> interface in <span class="codefrag computeroutput">org.apache.bookkeeper.client.AsyncCallback</span>, and
+	a class implementing it has to implement a method called <span class="codefrag computeroutput">addComplete</span>
+	that has the following signature: 
+    </p>
+<p>
+	
+<span class="codefrag computeroutput">
+	void addComplete(int rc, LedgerHandle lh, long entryId, Object ctx);
+	</span>    
+	
+</p>
+<p>
+	where:
+	</p>
+<ul>
+		
+<li>
+		
+<p>
+		
+<span class="codefrag computeroutput">rc</span> is a return code (please refer to <span class="codefrag computeroutput">org.apache.bookeeper.client.BKDefs</span> for a list);
+		</p>
+		
+</li>
+	
+		
+<li>
+		
+<p>
+		
+<span class="codefrag computeroutput">lh</span> is a <span class="codefrag computeroutput">LedgerHandle</span> object to manipulate a ledger;
+		</p>
+		
+</li>
+		
+		
+<li>
+		
+<p>
+		
+<span class="codefrag computeroutput">entryId</span> is the identifier of entry associated with this request;
+		</p>
+		
+</li>
+		
+		
+<li>
+		
+<p>
+		
+<span class="codefrag computeroutput">ctx</span> is control object used for accountability purposes. It can be any object the application is happy with.
+		</p>
+		
+</li>
+	
+</ul>
+<a name="bk_closeLedger"></a>
+<h3 class="h4"> Closing a ledger. </h3>
+<p>
+    Once a client is done writing, it closes the ledger. The following methods belong
+    to <span class="codefrag computeroutput">org.apache.bookkeeper.client.LedgerHandle</span>.
+    </p>
+<p>
+   	
+<strong>Synchronous close:</strong>
+   	
+</p>
+<p>
+    
+<span class="codefrag computeroutput">
+	public void close() 
+    throws InterruptedException
+    </span>
+	
+</p>
+<p>
+    It takes no input parameters.
+    </p>
+<p>
+   	
+<strong>Asynchronous close:</strong>
+   	
+</p>
+<p>
+    
+<span class="codefrag computeroutput">
+	public void asyncClose(CloseCallback cb, Object ctx)
+    throws InterruptedException
+    </span>
+	
+</p>
+<p>
+    It takes a callback object <span class="codefrag computeroutput">cb</span> and a control object <span class="codefrag computeroutput">ctx</span>. The callback object must implement
+    the <span class="codefrag computeroutput">CloseCallback</span> interface in <span class="codefrag computeroutput">org.apache.bookkeeper.client.AsyncCallback</span>, and
+	a class implementing it has to implement a method called <span class="codefrag computeroutput">closeComplete</span>
+	that has the following signature: 
+    </p>
+<p>
+	
+<span class="codefrag computeroutput">
+	void closeComplete(int rc, LedgerHandle lh, Object ctx)
+	</span>    
+	
+</p>
+<p>
+	where:
+	</p>
+<ul>
+		
+<li>
+		
+<p>
+		
+<span class="codefrag computeroutput">rc</span> is a return code (please refer to <span class="codefrag computeroutput">org.apache.bookeeper.client.BKDefs</span> for a list);
+		</p>
+		
+</li>
+	
+		
+<li>
+		
+<p>
+		
+<span class="codefrag computeroutput">lh</span> is a <span class="codefrag computeroutput">LedgerHandle</span> object to manipulate a ledger;
+		</p>
+		
+</li>
+		
+		
+<li>
+		
+<p>
+		
+<span class="codefrag computeroutput">ctx</span> is control object used for accountability purposes. 
+		</p>
+		
+</li>
+	
+</ul>
+<a name="bk_openLedger"></a>
+<h3 class="h4"> Opening a ledger. </h3>
+<p>
+    To read from a ledger, a client must open it first. The following methods belong
+    to <span class="codefrag computeroutput">org.apache.bookkeeper.client.BookKeeper</span>.
+    </p>
+<p>
+   	
+<strong>Synchronous open:</strong>
+   	
+</p>
+<p>
+    
+<span class="codefrag computeroutput">
+	public LedgerHandle openLedger(long lId, DigestType type, byte passwd[])
+    throws InterruptedException, BKException
+    </span>
+	
+</p>
+<ul>
+	
+<li>
+	
+<p>
+	
+<span class="codefrag computeroutput">ledgerId</span> is the ledger identifier;
+	</p>
+	
+</li>
+	
+	
+<li> 
+    
+<p>
+    
+<span class="codefrag computeroutput">type</span> is the type of digest used with entries: either MAC or CRC32.  
+    </p>
+    
+</li>
+	
+	
+<li>
+	
+<p>
+	
+<span class="codefrag computeroutput">passwd</span> is a password to access the ledger (used only in the case of <span class="codefrag computeroutput">VERIFIABLE</span> ledgers);
+	</p>
+	
+</li>
+	
+</ul>
+<p>
+   	
+<strong>Asynchronous open:</strong>
+   	
+</p>
+<p>
+    
+<span class="codefrag computeroutput">
+	public void asyncOpenLedger(long lId, DigestType type, byte passwd[], OpenCallback cb, Object ctx)
+    </span>
+	
+</p>
+<p>
+    It also takes a a ledger identifier and a password. Additionaly, it takes a callback object 
+    <span class="codefrag computeroutput">cb</span> and a control object <span class="codefrag computeroutput">ctx</span>. The callback object must implement
+    the <span class="codefrag computeroutput">OpenCallback</span> interface in <span class="codefrag computeroutput">org.apache.bookkeeper.client.AsyncCallback</span>, and
+	a class implementing it has to implement a method called <span class="codefrag computeroutput">openComplete</span>
+	that has the following signature: 
+    </p>
+<p>
+	
+<span class="codefrag computeroutput">
+	public void openComplete(int rc, LedgerHandle lh, Object ctx)
+	</span>    
+	
+</p>
+<p>
+	where:
+	</p>
+<ul>
+		
+<li>
+		
+<p>
+		
+<span class="codefrag computeroutput">rc</span> is a return code (please refer to <span class="codefrag computeroutput">org.apache.bookeeper.client.BKDefs</span> for a list);
+		</p>
+		
+</li>
+	
+		
+<li>
+		
+<p>
+		
+<span class="codefrag computeroutput">lh</span> is a <span class="codefrag computeroutput">LedgerHandle</span> object to manipulate a ledger;
+		</p>
+		
+</li>
+		
+		
+<li>
+		
+<p>
+		
+<span class="codefrag computeroutput">ctx</span> is control object used for accountability purposes. 
+		</p>
+		
+</li>
+	
+</ul>
+<a name="bk_readLedger"></a>
+<h3 class="h4"> Reading from ledger </h3>
+<p>
+    Read calls may request one or more consecutive entries. The following methods belong
+    to <span class="codefrag computeroutput">org.apache.bookkeeper.client.LedgerHandle</span>.
+    </p>
+<p>
+   	
+<strong>Synchronous read:</strong>
+   	
+</p>
+<p>
+    
+<span class="codefrag computeroutput">
+	public Enumeration&lt;LedgerEntry&gt; readEntries(long firstEntry, long lastEntry) 
+    throws InterruptedException, BKException
+    </span>
+	
+</p>
+<ul>
+	
+<li>
+	
+<p>
+	
+<span class="codefrag computeroutput">firstEntry</span> is the identifier of the first entry in the sequence of entries to read;
+	</p>
+	
+</li>
+	
+	
+<li>
+	
+<p>
+	
+<span class="codefrag computeroutput">lastEntry</span> is the identifier of the last entry in the sequence of entries to read.
+	</p>
+	
+</li>
+	
+</ul>
+<p>
+   	
+<strong>Asynchronous read:</strong>
+   	
+</p>
+<p>
+    
+<span class="codefrag computeroutput">
+	public void asyncReadEntries(long firstEntry, 
+            long lastEntry, ReadCallback cb, Object ctx)
+    throws BKException, InterruptedException
+    </span>
+	
+</p>
+<p>
+    It also takes a first and a last entry identifiers. Additionaly, it takes a callback object 
+    <span class="codefrag computeroutput">cb</span> and a control object <span class="codefrag computeroutput">ctx</span>. The callback object must implement
+    the <span class="codefrag computeroutput">ReadCallback</span> interface in <span class="codefrag computeroutput">org.apache.bookkeeper.client.AsyncCallback</span>, and
+	a class implementing it has to implement a method called <span class="codefrag computeroutput">readComplete</span>
+	that has the following signature: 
+    </p>
+<p>
+	
+<span class="codefrag computeroutput">
+	void readComplete(int rc, LedgerHandle lh, Enumeration&lt;LedgerEntry&gt; seq, Object ctx)
+	</span>    
+	
+</p>
+<p>
+	where:
+	</p>
+<ul>
+		
+<li>
+		
+<p>
+		
+<span class="codefrag computeroutput">rc</span> is a return code (please refer to <span class="codefrag computeroutput">org.apache.bookeeper.client.BKDefs</span> for a list);
+		</p>
+		
+</li>
+	
+		
+<li>
+		
+<p>
+		
+<span class="codefrag computeroutput">lh</span> is a <span class="codefrag computeroutput">LedgerHandle</span> object to manipulate a ledger;
+		</p>
+		
+</li>
+		
+		
+<li>
+		
+<p>
+		
+<span class="codefrag computeroutput">seq</span> is a <span class="codefrag computeroutput">Enumeration&lt;LedgerEntry&gt; </span> object to containing the list of entries requested;
+		</p>
+		
+</li>
+
+		
+<li>
+		
+<p>
+		
+<span class="codefrag computeroutput">ctx</span> is control object used for accountability purposes. 
+		</p>
+		
+</li>
+	
+</ul>
+<a name="bk_deleteLedger"></a>
+<h3 class="h4"> Deleting a ledger </h3>
+<p>
+    Once a client is done with a ledger and is sure that nobody will ever need to read from it again, they can delete the ledger.
+    The following methods belong to <span class="codefrag computeroutput">org.apache.bookkeeper.client.BookKeeper</span>.
+    </p>
+<p>
+   	
+<strong>Synchronous delete:</strong>
+   	
+</p>
+<p>
+    
+<span class="codefrag computeroutput">
+        public void deleteLedger(long lId) throws InterruptedException, BKException
+    </span>
+    
+</p>
+<ul>
+	
+<li>
+	
+<p>
+	
+<span class="codefrag computeroutput">lId</span> is the ledger identifier;
+	</p>
+	
+</li>
+	
+</ul>
+<p>
+   	
+<strong>Asynchronous delete:</strong>
+    
+</p>
+<p>
+      
+<span class="codefrag computeroutput">
+	 public void asyncDeleteLedger(long lId, DeleteCallback cb, Object ctx) 
+      </span>
+    
+</p>
+<p>
+    It takes a ledger identifier. Additionally, it takes a callback object 
+    <span class="codefrag computeroutput">cb</span> and a control object <span class="codefrag computeroutput">ctx</span>. The callback object must implement
+    the <span class="codefrag computeroutput">DeleteCallback</span> interface in <span class="codefrag computeroutput">org.apache.bookkeeper.client.AsyncCallback</span>, and
+	a class implementing it has to implement a method called <span class="codefrag computeroutput">deleteComplete</span>
+	that has the following signature: 
+    </p>
+<p>
+	
+<span class="codefrag computeroutput">
+	void deleteComplete(int rc, Object ctx)
+	</span>    
+	
+</p>
+<p>
+	where:
+	</p>
+<ul>
+		
+<li>
+		
+<p>
+		
+<span class="codefrag computeroutput">rc</span> is a return code (please refer to <span class="codefrag computeroutput">org.apache.bookeeper.client.BKDefs</span> for a list);
+		</p>
+		
+</li>
+	
+		
+<li>
+		
+<p>
+		
+<span class="codefrag computeroutput">ctx</span> is control object used for accountability purposes. 
+		</p>
+		
+</li>
+	
+</ul>
+</div>
+
+<p align="right">
+<font size="-2"></font>
+</p>
+</div>
+<!--+
+    |end content
+    +-->
+<div class="clearboth">&nbsp;</div>
+</div>
+<div id="footer">
+<!--+
+    |start bottomstrip
+    +-->
+<div class="lastmodified">
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<div class="copyright">
+        Copyright &copy;
+         2008 <a href="http://www.apache.org/licenses/">The Apache Software Foundation.</a>
+</div>
+<!--+
+    |end bottomstrip
+    +-->
+</div>
+</body>
+</html>

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/bookkeeperProgrammer.pdf
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/zookeeper/trunk/content/doc/r3.4.5/bookkeeperProgrammer.pdf
------------------------------------------------------------------------------
    svn:mime-type = application/pdf

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/bookkeeperStarted.html
==============================================================================
--- websites/staging/zookeeper/trunk/content/doc/r3.4.5/bookkeeperStarted.html (added)
+++ websites/staging/zookeeper/trunk/content/doc/r3.4.5/bookkeeperStarted.html Mon Nov 19 00:36:21 2012
@@ -0,0 +1,448 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="Apache Forrest" name="Generator">
+<meta name="Forrest-version" content="0.9">
+<meta name="Forrest-skin-name" content="pelt">
+<title>BookKeeper Getting Started Guide</title>
+<link type="text/css" href="skin/basic.css" rel="stylesheet">
+<link media="screen" type="text/css" href="skin/screen.css" rel="stylesheet">
+<link media="print" type="text/css" href="skin/print.css" rel="stylesheet">
+<link type="text/css" href="skin/profile.css" rel="stylesheet">
+<script src="skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="skin/fontsize.js" language="javascript" type="text/javascript"></script>
+<link rel="shortcut icon" href="images/favicon.ico">
+</head>
+<body onload="init()">
+<script type="text/javascript">ndeSetTextSize();</script>
+<div id="top">
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://zookeeper.apache.org/">ZooKeeper</a> &gt; <a href="http://zookeeper.apache.org/">ZooKeeper</a><script src="skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
+</div>
+<!--+
+    |header
+    +-->
+<div class="header">
+<!--+
+    |start group logo
+    +-->
+<div class="grouplogo">
+<a href="http://hadoop.apache.org/"><img class="logoImage" alt="Hadoop" src="images/hadoop-logo.jpg" title="Apache Hadoop"></a>
+</div>
+<!--+
+    |end group logo
+    +-->
+<!--+
+    |start Project Logo
+    +-->
+<div class="projectlogo">
+<a href="http://zookeeper.apache.org/"><img class="logoImage" alt="ZooKeeper" src="images/zookeeper_small.gif" title="ZooKeeper: distributed coordination"></a>
+</div>
+<!--+
+    |end Project Logo
+    +-->
+<!--+
+    |start Search
+    +-->
+<div class="searchbox">
+<form action="http://www.google.com/search" method="get" class="roundtopsmall">
+<input value="zookeeper.apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google">&nbsp; 
+                    <input name="Search" value="Search" type="submit">
+</form>
+</div>
+<!--+
+    |end search
+    +-->
+<!--+
+    |start Tabs
+    +-->
+<ul id="tabs">
+<li>
+<a class="unselected" href="http://zookeeper.apache.org/">Project</a>
+</li>
+<li>
+<a class="unselected" href="https://cwiki.apache.org/confluence/display/ZOOKEEPER/">Wiki</a>
+</li>
+<li class="current">
+<a class="selected" href="index.html">ZooKeeper 3.4 Documentation</a>
+</li>
+</ul>
+<!--+
+    |end Tabs
+    +-->
+</div>
+</div>
+<div id="main">
+<div id="publishedStrip">
+<!--+
+    |start Subtabs
+    +-->
+<div id="level2tabs"></div>
+<!--+
+    |end Endtabs
+    +-->
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+
+             &nbsp;
+           </div>
+<!--+
+    |start Menu, mainarea
+    +-->
+<!--+
+    |start Menu
+    +-->
+<div id="menu">
+<div onclick="SwitchMenu('menu_1.1', 'skin/')" id="menu_1.1Title" class="menutitle">Overview</div>
+<div id="menu_1.1" class="menuitemgroup">
+<div class="menuitem">
+<a href="index.html">Welcome</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperOver.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperStarted.html">Getting Started</a>
+</div>
+<div class="menuitem">
+<a href="releasenotes.html">Release Notes</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.2', 'skin/')" id="menu_1.2Title" class="menutitle">Developer</div>
+<div id="menu_1.2" class="menuitemgroup">
+<div class="menuitem">
+<a href="api/index.html">API Docs</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperProgrammers.html">Programmer's Guide</a>
+</div>
+<div class="menuitem">
+<a href="javaExample.html">Java Example</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperTutorial.html">Barrier and Queue Tutorial</a>
+</div>
+<div class="menuitem">
+<a href="recipes.html">Recipes</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_selected_1.3', 'skin/')" id="menu_selected_1.3Title" class="menutitle" style="background-image: url('skin/images/chapter_open.gif');">BookKeeper</div>
+<div id="menu_selected_1.3" class="selectedmenuitemgroup" style="display: block;">
+<div class="menupage">
+<div class="menupagetitle">Getting started</div>
+</div>
+<div class="menuitem">
+<a href="bookkeeperOverview.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="bookkeeperConfig.html">Setup guide</a>
+</div>
+<div class="menuitem">
+<a href="bookkeeperProgrammer.html">Programmer's guide</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.4', 'skin/')" id="menu_1.4Title" class="menutitle">Admin &amp; Ops</div>
+<div id="menu_1.4" class="menuitemgroup">
+<div class="menuitem">
+<a href="zookeeperAdmin.html">Administrator's Guide</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperQuotas.html">Quota Guide</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperJMX.html">JMX</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperObservers.html">Observers Guide</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.5', 'skin/')" id="menu_1.5Title" class="menutitle">Contributor</div>
+<div id="menu_1.5" class="menuitemgroup">
+<div class="menuitem">
+<a href="zookeeperInternals.html">ZooKeeper Internals</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.6', 'skin/')" id="menu_1.6Title" class="menutitle">Miscellaneous</div>
+<div id="menu_1.6" class="menuitemgroup">
+<div class="menuitem">
+<a href="https://cwiki.apache.org/confluence/display/ZOOKEEPER">Wiki</a>
+</div>
+<div class="menuitem">
+<a href="https://cwiki.apache.org/confluence/display/ZOOKEEPER/FAQ">FAQ</a>
+</div>
+<div class="menuitem">
+<a href="http://zookeeper.apache.org/mailing_lists.html">Mailing Lists</a>
+</div>
+</div>
+<div id="credit"></div>
+<div id="roundbottom">
+<img style="display: none" class="corner" height="15" width="15" alt="" src="skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
+<!--+
+  |alternative credits
+  +-->
+<div id="credit2"></div>
+</div>
+<!--+
+    |end Menu
+    +-->
+<!--+
+    |start content
+    +-->
+<div id="content">
+<div title="Portable Document Format" class="pdflink">
+<a class="dida" href="bookkeeperStarted.pdf"><img alt="PDF -icon" src="skin/images/pdfdoc.gif" class="skin"><br>
+        PDF</a>
+</div>
+<h1>BookKeeper Getting Started Guide</h1>
+<div id="front-matter">
+<div id="minitoc-area">
+<ul class="minitoc">
+<li>
+<a href="#bk_GettingStarted">Getting Started: Setting up BookKeeper to write logs.</a>
+<ul class="minitoc">
+<li>
+<a href="#bk_Prerequisites">Pre-requisites</a>
+</li>
+<li>
+<a href="#bk_Download">Download</a>
+</li>
+<li>
+<a href="#bk_localBK">LocalBookKeeper</a>
+</li>
+<li>
+<a href="#bk_setupBookies">Setting up bookies</a>
+</li>
+<li>
+<a href="#bk_setupZK">Setting up ZooKeeper</a>
+</li>
+<li>
+<a href="#bk_example">Example</a>
+</li>
+</ul>
+</li>
+</ul>
+</div>
+</div>
+  
+
+  
+  
+<a name="bk_GettingStarted"></a>
+<h2 class="h3">Getting Started: Setting up BookKeeper to write logs.</h2>
+<div class="section">
+<p>This document contains information to get you started quickly with
+    BookKeeper. It is aimed primarily at developers willing to try it out, and
+    contains simple installation instructions for a simple BookKeeper installation
+    and a simple programming example. For further programming detail, please refer to 
+    <a href="bookkeeperProgrammer.html">BookKeeper Programmer's Guide</a>.
+    </p>
+<a name="bk_Prerequisites"></a>
+<h3 class="h4">Pre-requisites</h3>
+<p>See <a href="bookkeeperConfig.html#bk_sysReq">
+    	      System Requirements</a> in the Admin guide.</p>
+<a name="bk_Download"></a>
+<h3 class="h4">Download</h3>
+<p> BookKeeper is distributed along with ZooKeeper. To get a ZooKeeper distribution, 
+			   download a recent
+    	    <a href="http://zookeeper.apache.org/releases.html">
+        	  stable</a> release from one of the Apache Download
+       	 Mirrors.</p>
+<a name="bk_localBK"></a>
+<h3 class="h4">LocalBookKeeper</h3>
+<p> Under org.apache.bookkeeper.util, you'll find a java program
+		called LocalBookKeeper.java that sets you up to run BookKeeper on a 
+		single machine. This is far from ideal from a performance perspective,
+		but the program is useful for both test and educational purposes.
+		</p>
+<a name="bk_setupBookies"></a>
+<h3 class="h4">Setting up bookies</h3>
+<p> If you're bold and you want more than just running things locally, then
+		you'll need to run bookies in different servers. You'll need at least three bookies
+		to start with.  
+		</p>
+<p>
+		For each bookie, we need to execute a command like the following:
+		</p>
+<p>
+<span class="codefrag computeroutput">
+		java -cp .:./zookeeper-&lt;version&gt;-bookkeeper.jar:./zookeeper-&lt;version&gt;.jar\
+		:lib/slf4j-api-1.6.1.jar:lib/slf4j-log4j12-1.6.1.jar:lib/log4j-1.2.15.jar -Dlog4j.configuration=log4j.properties\ 
+		org.apache.bookkeeper.proto.BookieServer 3181 127.0.0.1:2181 /path_to_log_device/\
+		/path_to_ledger_device/
+		</span>
+</p>
+<p> "/path_to_log_device/" and "/path_to_ledger_device/" are different paths. Also, port 3181
+		is the port that a bookie listens on for connection requests from clients. 127.0.0.1:2181 is the hostname:port 
+		for the ZooKeeper server. In this example, the standalone ZooKeeper server is running locally on port 2181.
+		If we had multiple ZooKeeper servers, this parameter would be a comma separated list of all the hostname:port
+		values corresponding to them.
+		</p>
+<a name="bk_setupZK"></a>
+<h3 class="h4">Setting up ZooKeeper</h3>
+<p> ZooKeeper stores metadata on behalf of BookKeeper clients and bookies. To get a minimal 
+	  	ZooKeeper installation to work with BookKeeper, we can set up one server running in
+	  	standalone mode. Once we have the server running, we need to create a few znodes:
+	  	</p>
+<ol>
+	  	
+<li>
+	  	
+<p>
+<span class="codefrag computeroutput">
+	  	/ledgers	
+	  	</span>
+</p>
+	  	
+</li>
+	  	
+	  	
+<li>
+	  	
+<p>
+<span class="codefrag computeroutput">
+	  	/ledgers/available
+	  	</span>
+</p>
+	  	
+</li>
+	  	
+	  	
+<li>
+	  	
+<p> For each bookie, we add one znode such that the name of the znode is the
+	  	concatenation of the machine name and the port number that the bookie is 
+	  	listening on. For example, if a bookie is running on bookie.foo.com an is listening 
+	  	on port 3181, we add a znode 
+	  	<span class="codefrag computeroutput">/ledgers/available/bookie.foo.com:3181</span>.  
+	  	</p>
+	  	
+</li>
+	  	
+</ol>
+<a name="bk_example"></a>
+<h3 class="h4">Example</h3>
+<p>
+	    In the following excerpt of code, we:
+	    </p>
+<ol>
+	    	
+<li>
+	    	
+<p>
+	    	Create a ledger;
+	    	</p>
+	    	
+</li>
+	    	
+	    	
+<li>
+	    	
+<p>
+	    	Write to the ledger;
+	    	</p>
+	    	
+</li>
+	    	
+	    	
+<li>
+	    	
+<p>
+	    	Close the ledger;
+	    	</p>
+	    	
+</li>
+	    	
+	    	
+<li>
+	    	
+<p>
+	    	Open the same ledger for reading;
+	    	</p>
+	    	
+</li>
+	    	
+	    	
+<li>
+	    	
+<p>
+	    	Read from the ledger;
+	    	</p>
+	    	
+</li>
+	    	
+	    	
+<li>
+	    	
+<p>
+	    	Close the ledger again;
+	    	</p>
+	    	
+</li>
+	    
+</ol>
+<pre class="code">
+LedgerHandle lh = bkc.createLedger(ledgerPassword);
+ledgerId = lh.getId();
+ByteBuffer entry = ByteBuffer.allocate(4);
+
+for(int i = 0; i &lt; 10; i++){
+	entry.putInt(i);
+	entry.position(0);
+	entries.add(entry.array());				
+	lh.addEntry(entry.array());
+}
+lh.close();
+lh = bkc.openLedger(ledgerId, ledgerPassword);		
+			
+Enumeration&lt;LedgerEntry&gt; ls = lh.readEntries(0, 9);
+int i = 0;
+while(ls.hasMoreElements()){
+	ByteBuffer origbb = ByteBuffer.wrap(
+				entries.get(i++));
+	Integer origEntry = origbb.getInt();
+	ByteBuffer result = ByteBuffer.wrap(
+				ls.nextElement().getEntry());
+
+	Integer retrEntry = result.getInt();
+}
+lh.close();
+	    </pre>
+</div>
+
+<p align="right">
+<font size="-2"></font>
+</p>
+</div>
+<!--+
+    |end content
+    +-->
+<div class="clearboth">&nbsp;</div>
+</div>
+<div id="footer">
+<!--+
+    |start bottomstrip
+    +-->
+<div class="lastmodified">
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<div class="copyright">
+        Copyright &copy;
+         2008 <a href="http://www.apache.org/licenses/">The Apache Software Foundation.</a>
+</div>
+<!--+
+    |end bottomstrip
+    +-->
+</div>
+</body>
+</html>

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/bookkeeperStarted.pdf
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/zookeeper/trunk/content/doc/r3.4.5/bookkeeperStarted.pdf
------------------------------------------------------------------------------
    svn:mime-type = application/pdf

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/bookkeeperStream.html
==============================================================================
--- websites/staging/zookeeper/trunk/content/doc/r3.4.5/bookkeeperStream.html (added)
+++ websites/staging/zookeeper/trunk/content/doc/r3.4.5/bookkeeperStream.html Mon Nov 19 00:36:21 2012
@@ -0,0 +1,612 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="Apache Forrest" name="Generator">
+<meta name="Forrest-version" content="0.9">
+<meta name="Forrest-skin-name" content="pelt">
+<title>Streaming with BookKeeper</title>
+<link type="text/css" href="skin/basic.css" rel="stylesheet">
+<link media="screen" type="text/css" href="skin/screen.css" rel="stylesheet">
+<link media="print" type="text/css" href="skin/print.css" rel="stylesheet">
+<link type="text/css" href="skin/profile.css" rel="stylesheet">
+<script src="skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="skin/fontsize.js" language="javascript" type="text/javascript"></script>
+<link rel="shortcut icon" href="images/favicon.ico">
+</head>
+<body onload="init()">
+<script type="text/javascript">ndeSetTextSize();</script>
+<div id="top">
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://zookeeper.apache.org/">ZooKeeper</a> &gt; <a href="http://zookeeper.apache.org/">ZooKeeper</a><script src="skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
+</div>
+<!--+
+    |header
+    +-->
+<div class="header">
+<!--+
+    |start group logo
+    +-->
+<div class="grouplogo">
+<a href="http://hadoop.apache.org/"><img class="logoImage" alt="Hadoop" src="images/hadoop-logo.jpg" title="Apache Hadoop"></a>
+</div>
+<!--+
+    |end group logo
+    +-->
+<!--+
+    |start Project Logo
+    +-->
+<div class="projectlogo">
+<a href="http://zookeeper.apache.org/"><img class="logoImage" alt="ZooKeeper" src="images/zookeeper_small.gif" title="ZooKeeper: distributed coordination"></a>
+</div>
+<!--+
+    |end Project Logo
+    +-->
+<!--+
+    |start Search
+    +-->
+<div class="searchbox">
+<form action="http://www.google.com/search" method="get" class="roundtopsmall">
+<input value="zookeeper.apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google">&nbsp; 
+                    <input name="Search" value="Search" type="submit">
+</form>
+</div>
+<!--+
+    |end search
+    +-->
+<!--+
+    |start Tabs
+    +-->
+<ul id="tabs">
+<li>
+<a class="unselected" href="http://zookeeper.apache.org/">Project</a>
+</li>
+<li>
+<a class="unselected" href="https://cwiki.apache.org/confluence/display/ZOOKEEPER/">Wiki</a>
+</li>
+<li class="current">
+<a class="selected" href="index.html">ZooKeeper 3.4 Documentation</a>
+</li>
+</ul>
+<!--+
+    |end Tabs
+    +-->
+</div>
+</div>
+<div id="main">
+<div id="publishedStrip">
+<!--+
+    |start Subtabs
+    +-->
+<div id="level2tabs"></div>
+<!--+
+    |end Endtabs
+    +-->
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+
+             &nbsp;
+           </div>
+<!--+
+    |start Menu, mainarea
+    +-->
+<!--+
+    |start Menu
+    +-->
+<div id="menu">
+<div onclick="SwitchMenu('menu_1.1', 'skin/')" id="menu_1.1Title" class="menutitle">Overview</div>
+<div id="menu_1.1" class="menuitemgroup">
+<div class="menuitem">
+<a href="index.html">Welcome</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperOver.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperStarted.html">Getting Started</a>
+</div>
+<div class="menuitem">
+<a href="releasenotes.html">Release Notes</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.2', 'skin/')" id="menu_1.2Title" class="menutitle">Developer</div>
+<div id="menu_1.2" class="menuitemgroup">
+<div class="menuitem">
+<a href="api/index.html">API Docs</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperProgrammers.html">Programmer's Guide</a>
+</div>
+<div class="menuitem">
+<a href="javaExample.html">Java Example</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperTutorial.html">Barrier and Queue Tutorial</a>
+</div>
+<div class="menuitem">
+<a href="recipes.html">Recipes</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.3', 'skin/')" id="menu_1.3Title" class="menutitle">BookKeeper</div>
+<div id="menu_1.3" class="menuitemgroup">
+<div class="menuitem">
+<a href="bookkeeperStarted.html">Getting started</a>
+</div>
+<div class="menuitem">
+<a href="bookkeeperOverview.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="bookkeeperConfig.html">Setup guide</a>
+</div>
+<div class="menuitem">
+<a href="bookkeeperProgrammer.html">Programmer's guide</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.4', 'skin/')" id="menu_1.4Title" class="menutitle">Admin &amp; Ops</div>
+<div id="menu_1.4" class="menuitemgroup">
+<div class="menuitem">
+<a href="zookeeperAdmin.html">Administrator's Guide</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperQuotas.html">Quota Guide</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperJMX.html">JMX</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperObservers.html">Observers Guide</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.5', 'skin/')" id="menu_1.5Title" class="menutitle">Contributor</div>
+<div id="menu_1.5" class="menuitemgroup">
+<div class="menuitem">
+<a href="zookeeperInternals.html">ZooKeeper Internals</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.6', 'skin/')" id="menu_1.6Title" class="menutitle">Miscellaneous</div>
+<div id="menu_1.6" class="menuitemgroup">
+<div class="menuitem">
+<a href="https://cwiki.apache.org/confluence/display/ZOOKEEPER">Wiki</a>
+</div>
+<div class="menuitem">
+<a href="https://cwiki.apache.org/confluence/display/ZOOKEEPER/FAQ">FAQ</a>
+</div>
+<div class="menuitem">
+<a href="http://zookeeper.apache.org/mailing_lists.html">Mailing Lists</a>
+</div>
+</div>
+<div id="credit"></div>
+<div id="roundbottom">
+<img style="display: none" class="corner" height="15" width="15" alt="" src="skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
+<!--+
+  |alternative credits
+  +-->
+<div id="credit2"></div>
+</div>
+<!--+
+    |end Menu
+    +-->
+<!--+
+    |start content
+    +-->
+<div id="content">
+<div title="Portable Document Format" class="pdflink">
+<a class="dida" href="bookkeeperStream.pdf"><img alt="PDF -icon" src="skin/images/pdfdoc.gif" class="skin"><br>
+        PDF</a>
+</div>
+<h1>Streaming with BookKeeper</h1>
+<div id="front-matter">
+<div id="minitoc-area">
+<ul class="minitoc">
+<li>
+<a href="#bk_StreamSummary">Summary</a>
+</li>
+<li>
+<a href="#bk_LedgerOutputStream">Writing a stream of bytes</a>
+</li>
+<li>
+<a href="#bk_LedgerInputStream">Reading a stream of bytes</a>
+</li>
+</ul>
+</div>
+</div>
+  
+
+  
+	
+<a name="bk_StreamSummary"></a>
+<h2 class="h3">Summary</h2>
+<div class="section">
+<p>
+    When using the BookKeeper API, an application has to split the data to write into entries, each
+    entry being a byte array. This is natural for many applications. For example, when using BookKeeper
+    for write-ahead logging, an application typically wants to write the modifications corresponding
+    to a command or a transaction. Some other applications, however, might not have a natural boundary
+    for entries, and may prefer to write and read streams of bytes. This is exactly the purpose of the
+    stream API we have implemented on top of BookKeeper.
+    </p>
+<p>
+    The stream API is implemented in the package <span class="codefrag computeroutput">Streaming</span>, and it contains two main classes: <span class="codefrag computeroutput">LedgerOutputStream</span> and 
+    <span class="codefrag computeroutput">LedgerInputStream</span>. The class names are indicative of what they do.
+    </p>
+</div>
+    
+    
+<a name="bk_LedgerOutputStream"></a>
+<h2 class="h3">Writing a stream of bytes</h2>
+<div class="section">
+<p>
+    Class <span class="codefrag computeroutput">LedgerOutputStream</span> implements two constructors and five public methods:
+    </p>
+<p>
+    
+<span class="codefrag computeroutput">
+	public LedgerOutputStream(LedgerHandle lh) 
+    </span>
+	
+</p>
+<p>
+    where:
+    </p>
+<ul>
+    	
+<li>
+    	
+<p> 
+        
+<span class="codefrag computeroutput">lh</span> is a ledger handle for a previously created and open ledger.  
+    	</p>
+    	
+</li>
+    
+</ul>
+<p>
+    
+<span class="codefrag computeroutput">
+	public LedgerOutputStream(LedgerHandle lh, int size) 
+    </span>
+	
+</p>
+<p>
+    where:
+    </p>
+<ul>
+    	
+<li>
+    	
+<p> 
+        
+<span class="codefrag computeroutput">lh</span> is a ledger handle for a previously created and open ledger.  
+    	</p>
+    	
+</li>
+
+    	
+<li>
+    	
+<p> 
+        
+<span class="codefrag computeroutput">size</span> is the size of the byte buffer to store written bytes before flushing.  
+    	</p>
+    	
+</li>
+    
+</ul>
+<p>
+   	
+<strong>Closing a stream.</strong> This call closes the stream by flushing the write buffer.
+   	</p>
+<p>
+    
+<span class="codefrag computeroutput">
+	public void close() 
+    </span>
+	
+</p>
+<p>
+    which has no parameters.
+    </p>
+<p>
+   	
+<strong>Flushing a stream.</strong> This call essentially flushes the write buffer.
+   	</p>
+<p>
+    
+<span class="codefrag computeroutput">
+	public synchronized void flush() 
+    </span>
+	
+</p>
+<p>
+    which has no parameters.
+    </p>
+<p>
+   	
+<strong>Writing bytes.</strong> There are three calls for writing bytes to a stream.
+   	</p>
+<p>
+    
+<span class="codefrag computeroutput">
+	public synchronized void write(byte[] b) 
+    </span>
+	
+</p>
+<p>
+    where:
+    </p>
+<ul>
+    	
+<li>
+    	
+<p> 
+        
+<span class="codefrag computeroutput">b</span> is an array of bytes to write.  
+    	</p>
+    	
+</li>
+    
+</ul>
+<p>
+    
+<span class="codefrag computeroutput">
+	public synchronized void write(byte[] b, int off, int len) 
+    </span>
+	
+</p>
+<p>
+    where:
+    </p>
+<ul>
+    	
+<li>
+    	
+<p> 
+        
+<span class="codefrag computeroutput">b</span> is an array of bytes to write.  
+    	</p>
+    	
+</li>
+    	
+    	
+<li>
+    	
+<p> 
+        
+<span class="codefrag computeroutput">off</span> is a buffer offset.  
+    	</p>
+    	
+</li>
+    	
+    	
+<li>
+    	
+<p> 
+        
+<span class="codefrag computeroutput">len</span> is the length to write.  
+    	</p>
+    	
+</li>
+    
+</ul>
+<p>
+    
+<span class="codefrag computeroutput">
+	public synchronized void write(int b) 
+    </span>
+	
+</p>
+<p>
+    where:
+    </p>
+<ul>
+    	
+<li>
+    	
+<p> 
+        
+<span class="codefrag computeroutput">b</span> contains a byte to write. The method writes the least significant byte of the integer four bytes.    
+    	</p>
+    	
+</li>
+    
+</ul>
+</div>
+    
+    
+<a name="bk_LedgerInputStream"></a>
+<h2 class="h3">Reading a stream of bytes</h2>
+<div class="section">
+<p>
+    Class <span class="codefrag computeroutput">LedgerOutputStream</span> implements two constructors and four public methods:
+    </p>
+<p>
+    
+<span class="codefrag computeroutput">
+	public LedgerInputStream(LedgerHandle lh)
+	throws BKException, InterruptedException 
+    </span>
+	
+</p>
+<p>
+    where:
+    </p>
+<ul>
+    	
+<li>
+    	
+<p> 
+        
+<span class="codefrag computeroutput">lh</span> is a ledger handle for a previously created and open ledger.  
+    	</p>
+    	
+</li>
+    
+</ul>
+<p>
+    
+<span class="codefrag computeroutput">
+	public LedgerInputStream(LedgerHandle lh, int size) 
+    throws BKException, InterruptedException
+    </span>
+	
+</p>
+<p>
+    where:
+    </p>
+<ul>
+    	
+<li>
+    	
+<p> 
+        
+<span class="codefrag computeroutput">lh</span> is a ledger handle for a previously created and open ledger.  
+    	</p>
+    	
+</li>
+
+    	
+<li>
+    	
+<p> 
+        
+<span class="codefrag computeroutput">size</span> is the size of the byte buffer to store bytes that the application
+        will eventually read.  
+    	</p>
+    	
+</li>
+    
+</ul>
+<p>
+   	
+<strong>Closing.</strong> There is one call to close an input stream, but the call
+   	is currently empty and the application is responsible for closing the ledger handle. 
+   	</p>
+<p>
+    
+<span class="codefrag computeroutput">
+	public void close()
+    </span>
+	
+</p>
+<p>
+    which has no parameters.
+    </p>
+<p>
+   	
+<strong>Reading.</strong> There are three calls to read from the stream.
+   	</p>
+<p>
+    
+<span class="codefrag computeroutput">
+	public synchronized int read()
+	throws IOException 
+    </span>
+	
+</p>
+<p>
+    which has no parameters.
+    </p>
+<p>
+    
+<span class="codefrag computeroutput">
+	public synchronized int read(byte[] b)
+	throws IOException 
+    </span>
+	
+</p>
+<p>
+    where:
+    </p>
+<ul>
+    	
+<li>
+    	
+<p> 
+        
+<span class="codefrag computeroutput">b</span> is a byte array to write to.  
+    	</p>
+    	
+</li>
+    
+</ul>
+<p>
+    
+<span class="codefrag computeroutput">
+	public synchronized int read(byte[] b, int off, int len)
+	throws IOException 
+    </span>
+	
+</p>
+<p>
+    where:
+    </p>
+<ul>
+    	
+<li>
+    	
+<p> 
+        
+<span class="codefrag computeroutput">b</span> is a byte array to write to.  
+    	</p>
+    	
+</li>
+    	
+    	
+<li>
+    	
+<p> 
+        
+<span class="codefrag computeroutput">off</span> is an offset for byte array <span class="codefrag computeroutput">b</span>.  
+    	</p>
+    	
+</li>
+    	
+    	
+<li>
+    	
+<p> 
+        
+<span class="codefrag computeroutput">len</span> is the length in bytes to write to <span class="codefrag computeroutput">b</span>.  
+    	</p>
+    	
+</li>
+    
+</ul>
+</div>
+  
+<p align="right">
+<font size="-2"></font>
+</p>
+</div>
+<!--+
+    |end content
+    +-->
+<div class="clearboth">&nbsp;</div>
+</div>
+<div id="footer">
+<!--+
+    |start bottomstrip
+    +-->
+<div class="lastmodified">
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<div class="copyright">
+        Copyright &copy;
+         2008 <a href="http://www.apache.org/licenses/">The Apache Software Foundation.</a>
+</div>
+<!--+
+    |end bottomstrip
+    +-->
+</div>
+</body>
+</html>

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/bookkeeperStream.pdf
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/zookeeper/trunk/content/doc/r3.4.5/bookkeeperStream.pdf
------------------------------------------------------------------------------
    svn:mime-type = application/pdf

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/broken-links.xml
==============================================================================
--- websites/staging/zookeeper/trunk/content/doc/r3.4.5/broken-links.xml (added)
+++ websites/staging/zookeeper/trunk/content/doc/r3.4.5/broken-links.xml Mon Nov 19 00:36:21 2012
@@ -0,0 +1,2 @@
+<broken-links>
+</broken-links>

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/2pc.jpg
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/2pc.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/bk-overview.jpg
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/bk-overview.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/built-with-forrest-button.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/built-with-forrest-button.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/favicon.ico
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/favicon.ico
------------------------------------------------------------------------------
    svn:mime-type = image/x-ico

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/hadoop-logo.jpg
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/hadoop-logo.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/instruction_arrow.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/instruction_arrow.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/state_dia.jpg
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/state_dia.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/zkcomponents.jpg
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/zkcomponents.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/zknamespace.jpg
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/zknamespace.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/zkperfRW-3.2.jpg
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/zkperfRW-3.2.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/zkperfRW.jpg
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/zkperfRW.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/zkperfreliability.jpg
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/zkperfreliability.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/zkservice.jpg
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/zkservice.jpg
------------------------------------------------------------------------------
    svn:mime-type = image/jpeg

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/zookeeper_small.gif
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/zookeeper/trunk/content/doc/r3.4.5/images/zookeeper_small.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/index.html
==============================================================================
--- websites/staging/zookeeper/trunk/content/doc/r3.4.5/index.html (added)
+++ websites/staging/zookeeper/trunk/content/doc/r3.4.5/index.html Mon Nov 19 00:36:21 2012
@@ -0,0 +1,391 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<meta content="Apache Forrest" name="Generator">
+<meta name="Forrest-version" content="0.9">
+<meta name="Forrest-skin-name" content="pelt">
+<title>ZooKeeper: Because Coordinating Distributed Systems is a Zoo</title>
+<link type="text/css" href="skin/basic.css" rel="stylesheet">
+<link media="screen" type="text/css" href="skin/screen.css" rel="stylesheet">
+<link media="print" type="text/css" href="skin/print.css" rel="stylesheet">
+<link type="text/css" href="skin/profile.css" rel="stylesheet">
+<script src="skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="skin/fontsize.js" language="javascript" type="text/javascript"></script>
+<link rel="shortcut icon" href="images/favicon.ico">
+</head>
+<body onload="init()">
+<script type="text/javascript">ndeSetTextSize();</script>
+<div id="top">
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+<a href="http://www.apache.org/">Apache</a> &gt; <a href="http://zookeeper.apache.org/">ZooKeeper</a> &gt; <a href="http://zookeeper.apache.org/">ZooKeeper</a><script src="skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
+</div>
+<!--+
+    |header
+    +-->
+<div class="header">
+<!--+
+    |start group logo
+    +-->
+<div class="grouplogo">
+<a href="http://hadoop.apache.org/"><img class="logoImage" alt="Hadoop" src="images/hadoop-logo.jpg" title="Apache Hadoop"></a>
+</div>
+<!--+
+    |end group logo
+    +-->
+<!--+
+    |start Project Logo
+    +-->
+<div class="projectlogo">
+<a href="http://zookeeper.apache.org/"><img class="logoImage" alt="ZooKeeper" src="images/zookeeper_small.gif" title="ZooKeeper: distributed coordination"></a>
+</div>
+<!--+
+    |end Project Logo
+    +-->
+<!--+
+    |start Search
+    +-->
+<div class="searchbox">
+<form action="http://www.google.com/search" method="get" class="roundtopsmall">
+<input value="zookeeper.apache.org" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google');" size="25" name="q" id="query" type="text" value="Search the site with google">&nbsp; 
+                    <input name="Search" value="Search" type="submit">
+</form>
+</div>
+<!--+
+    |end search
+    +-->
+<!--+
+    |start Tabs
+    +-->
+<ul id="tabs">
+<li>
+<a class="unselected" href="http://zookeeper.apache.org/">Project</a>
+</li>
+<li>
+<a class="unselected" href="https://cwiki.apache.org/confluence/display/ZOOKEEPER/">Wiki</a>
+</li>
+<li class="current">
+<a class="selected" href="index.html">ZooKeeper 3.4 Documentation</a>
+</li>
+</ul>
+<!--+
+    |end Tabs
+    +-->
+</div>
+</div>
+<div id="main">
+<div id="publishedStrip">
+<!--+
+    |start Subtabs
+    +-->
+<div id="level2tabs"></div>
+<!--+
+    |end Endtabs
+    +-->
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<!--+
+    |breadtrail
+    +-->
+<div class="breadtrail">
+
+             &nbsp;
+           </div>
+<!--+
+    |start Menu, mainarea
+    +-->
+<!--+
+    |start Menu
+    +-->
+<div id="menu">
+<div onclick="SwitchMenu('menu_selected_1.1', 'skin/')" id="menu_selected_1.1Title" class="menutitle" style="background-image: url('skin/images/chapter_open.gif');">Overview</div>
+<div id="menu_selected_1.1" class="selectedmenuitemgroup" style="display: block;">
+<div class="menupage">
+<div class="menupagetitle">Welcome</div>
+</div>
+<div class="menuitem">
+<a href="zookeeperOver.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperStarted.html">Getting Started</a>
+</div>
+<div class="menuitem">
+<a href="releasenotes.html">Release Notes</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.2', 'skin/')" id="menu_1.2Title" class="menutitle">Developer</div>
+<div id="menu_1.2" class="menuitemgroup">
+<div class="menuitem">
+<a href="api/index.html">API Docs</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperProgrammers.html">Programmer's Guide</a>
+</div>
+<div class="menuitem">
+<a href="javaExample.html">Java Example</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperTutorial.html">Barrier and Queue Tutorial</a>
+</div>
+<div class="menuitem">
+<a href="recipes.html">Recipes</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.3', 'skin/')" id="menu_1.3Title" class="menutitle">BookKeeper</div>
+<div id="menu_1.3" class="menuitemgroup">
+<div class="menuitem">
+<a href="bookkeeperStarted.html">Getting started</a>
+</div>
+<div class="menuitem">
+<a href="bookkeeperOverview.html">Overview</a>
+</div>
+<div class="menuitem">
+<a href="bookkeeperConfig.html">Setup guide</a>
+</div>
+<div class="menuitem">
+<a href="bookkeeperProgrammer.html">Programmer's guide</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.4', 'skin/')" id="menu_1.4Title" class="menutitle">Admin &amp; Ops</div>
+<div id="menu_1.4" class="menuitemgroup">
+<div class="menuitem">
+<a href="zookeeperAdmin.html">Administrator's Guide</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperQuotas.html">Quota Guide</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperJMX.html">JMX</a>
+</div>
+<div class="menuitem">
+<a href="zookeeperObservers.html">Observers Guide</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.5', 'skin/')" id="menu_1.5Title" class="menutitle">Contributor</div>
+<div id="menu_1.5" class="menuitemgroup">
+<div class="menuitem">
+<a href="zookeeperInternals.html">ZooKeeper Internals</a>
+</div>
+</div>
+<div onclick="SwitchMenu('menu_1.6', 'skin/')" id="menu_1.6Title" class="menutitle">Miscellaneous</div>
+<div id="menu_1.6" class="menuitemgroup">
+<div class="menuitem">
+<a href="https://cwiki.apache.org/confluence/display/ZOOKEEPER">Wiki</a>
+</div>
+<div class="menuitem">
+<a href="https://cwiki.apache.org/confluence/display/ZOOKEEPER/FAQ">FAQ</a>
+</div>
+<div class="menuitem">
+<a href="http://zookeeper.apache.org/mailing_lists.html">Mailing Lists</a>
+</div>
+</div>
+<div id="credit">
+<hr>
+<a href="http://forrest.apache.org/"><img border="0" title="Built with Apache Forrest" alt="Built with Apache Forrest - logo" src="images/built-with-forrest-button.png" style="width: 88px;height: 31px;"></a>
+</div>
+<div id="roundbottom">
+<img style="display: none" class="corner" height="15" width="15" alt="" src="skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
+<!--+
+  |alternative credits
+  +-->
+<div id="credit2"></div>
+</div>
+<!--+
+    |end Menu
+    +-->
+<!--+
+    |start content
+    +-->
+<div id="content">
+<div title="Portable Document Format" class="pdflink">
+<a class="dida" href="index.pdf"><img alt="PDF -icon" src="skin/images/pdfdoc.gif" class="skin"><br>
+        PDF</a>
+</div>
+<h1>ZooKeeper: Because Coordinating Distributed Systems is a Zoo</h1>
+<div id="front-matter"></div>
+    
+<p>ZooKeeper is a high-performance coordination service for
+      distributed applications.  It exposes common services - such as
+      naming, configuration management, synchronization, and group
+      services - in a simple interface so you don't have to write them
+      from scratch.  You can use it off-the-shelf to implement
+      consensus, group management, leader election, and presence
+      protocols. And you can build on it for your own, specific needs.
+    </p>
+
+    
+<p>
+      The following documents describe concepts and procedures to get
+      you started using ZooKeeper. If you have more questions, please
+      ask the <a href="http://zookeeper.apache.org/mailing_lists.html">mailing list</a> or browse the
+      archives.
+    </p>
+    
+<ul>
+
+      
+<li>
+<strong>ZooKeeper Overview</strong>
+<p>Technical Overview Documents for Client Developers, Adminstrators, and Contributors</p>
+      
+<ul>
+<li>
+<a href="zookeeperOver.html">Overview</a> - a bird's eye view of ZooKeeper, including design concepts and architecture</li>
+      
+<li>
+<a href="zookeeperStarted.html">Getting Started</a> - a tutorial-style guide for developers to install, run, and program to ZooKeeper</li>
+      
+<li>
+<a href="releasenotes.html">Release Notes</a> - new developer and user facing features, improvements, and incompatibilities</li>
+      
+</ul>
+      
+</li>
+      
+      
+<li>
+<strong>Developers</strong>
+<p> Documents for Developers using the ZooKeeper Client API</p>
+      
+<ul>
+            
+<li>
+<a href="api/index.html">API Docs</a> - the technical reference to ZooKeeper Client APIs</li>
+      
+<li>
+<a href="zookeeperProgrammers.html">Programmer's Guide</a> - a client application developer's guide to ZooKeeper</li>
+      
+<li>
+<a href="javaExample.html">ZooKeeper Java Example</a> - a simple Zookeeper client appplication, written in Java</li>
+      
+<li>
+<a href="zookeeperTutorial.html">Barrier and Queue Tutorial</a> - sample implementations of barriers and queues</li>  
+      
+<li>
+<a href="recipes.html">ZooKeeper Recipes</a> - higher level solutions to common problems in distributed applications</li>
+      
+</ul>
+      
+</li>
+      
+      
+<li>
+<strong>Administrators &amp; Operators</strong> 
+<p> Documents for Administrators and Operations Engineers of ZooKeeper Deployments</p>
+      
+<ul>
+      
+<li>
+<a href="zookeeperAdmin.html">Administrator's Guide</a> - a guide for system administrators and anyone else who might deploy ZooKeeper</li>
+      
+<li>
+<a href="zookeeperQuotas.html">Quota Guide</a> - a guide for system administrators on Quotas in ZooKeeper. </li>
+      
+<li>
+<a href="zookeeperJMX.html">JMX</a> - how to enable JMX in ZooKeeper</li>
+      
+<li>
+<a href="zookeeperHierarchicalQuorums.html">Hierarchical quorums</a>
+</li>
+      
+<li>
+<a href="zookeeperObservers.html">Observers</a> - non-voting ensemble members that easily improve ZooKeeper's scalability</li>
+      
+</ul>
+      
+</li>
+      
+      
+<li>
+<strong>Contributors</strong>
+<p> Documents for Developers Contributing to the ZooKeeper Open Source Project</p>
+      
+<ul>
+      
+<li>
+<a href="zookeeperInternals.html">ZooKeeper Internals</a> - assorted topics on the inner workings of ZooKeeper</li>
+      
+</ul>
+      
+</li>
+      
+      
+<li>
+<strong>Miscellaneous ZooKeeper Documentation</strong>
+      
+<ul>
+      
+<li>
+<a href="https://cwiki.apache.org/confluence/display/ZOOKEEPER">Wiki</a>
+</li>
+      
+<li>
+<a href="https://cwiki.apache.org/confluence/display/ZOOKEEPER/FAQ">FAQ</a>
+</li>    
+      
+</ul>
+      
+</li>
+
+	  
+<li>
+<strong>BookKeeper Documentation</strong>
+	  
+<p> BookKeeper is a highly-available system that implements high-performance write-ahead logging. It uses ZooKeeper for metadata, 
+	  which is the main reason for being a ZooKeeper contrib.
+	  </p>
+      
+<ul>
+      
+<li>
+<a href="bookkeeperOverview.html">henn, what's it again?</a>
+</li>
+	  
+<li>
+<a href="bookkeeperStarted.html">Ok, now how do I try it out</a>
+</li>
+	  
+<li>
+<a href="bookkeeperProgrammer.html">Awesome, but how do I integrate it with my app?</a>
+</li>
+      
+<li>
+<a href="bookkeeperStream.html">Can I stream bytes instead of entries?</a>
+</li>
+      
+</ul>
+      
+</li>
+    
+</ul>
+  
+</div>
+<!--+
+    |end content
+    +-->
+<div class="clearboth">&nbsp;</div>
+</div>
+<div id="footer">
+<!--+
+    |start bottomstrip
+    +-->
+<div class="lastmodified">
+<script type="text/javascript"><!--
+document.write("Last Published: " + document.lastModified);
+//  --></script>
+</div>
+<div class="copyright">
+        Copyright &copy;
+         2008 <a href="http://www.apache.org/licenses/">The Apache Software Foundation.</a>
+</div>
+<div id="logos"></div>
+<!--+
+    |end bottomstrip
+    +-->
+</div>
+</body>
+</html>

Added: websites/staging/zookeeper/trunk/content/doc/r3.4.5/index.pdf
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/zookeeper/trunk/content/doc/r3.4.5/index.pdf
------------------------------------------------------------------------------
    svn:mime-type = application/pdf



Mime
View raw message