You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by bu...@apache.org on 2010/12/16 00:20:41 UTC

svn commit: r780749 [3/17] - in /websites/staging/zookeeper/trunk/content/doc/trunk: ./ images/ skin/ skin/images/

Added: websites/staging/zookeeper/trunk/content/doc/trunk/bookkeeperProgrammer.html
==============================================================================
--- websites/staging/zookeeper/trunk/content/doc/trunk/bookkeeperProgrammer.html (added)
+++ websites/staging/zookeeper/trunk/content/doc/trunk/bookkeeperProgrammer.html Wed Dec 15 23:20:39 2010
@@ -0,0 +1,1081 @@
+<!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.8">
+<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://hadoop.apache.org/">Hadoop</a> &gt; <a href="http://hadoop.apache.org/zookeeper/">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://hadoop.apache.org/zookeeper/"><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="hadoop.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://hadoop.apache.org/zookeeper/">Project</a>
+</li>
+<li>
+<a class="unselected" href="http://wiki.apache.org/hadoop/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="http://wiki.apache.org/hadoop/ZooKeeper">Wiki</a>
+</div>
+<div class="menuitem">
+<a href="http://wiki.apache.org/hadoop/ZooKeeper/FAQ">FAQ</a>
+</div>
+<div class="menuitem">
+<a href="http://hadoop.apache.org/zookeeper/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="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>
+  
+
+  
+  
+<a name="N10009"></a><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="N1004A"></a><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="N100B1"></a><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="N10166"></a><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="N10201"></a><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="N10276"></a><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="N1030D"></a><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="N103A4"></a><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/trunk/bookkeeperProgrammer.pdf
==============================================================================
--- websites/staging/zookeeper/trunk/content/doc/trunk/bookkeeperProgrammer.pdf (added)
+++ websites/staging/zookeeper/trunk/content/doc/trunk/bookkeeperProgrammer.pdf Wed Dec 15 23:20:39 2010
@@ -0,0 +1,548 @@
+%PDF-1.3
+%ª«¬­
+4 0 obj
+<< /Type /Info
+/Producer (FOP 0.20.5) >>
+endobj
+5 0 obj
+<< /Length 676 /Filter [ /ASCII85Decode /FlateDecode ]
+ >>
+stream
+Gb!$E966RV&BF6e$6>[)[sB.ta#IosD%D&J>M906!].g:'hU:Xp>o^-ajZ)eE>(=!?$<XT...@757Q>Q#EKV0)*?)[;T#U*X_:ZY17r%%\FurJWnZnesL4HN\,UWs2YhSoY7'2'^5~>
+endstream
+endobj
+6 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 5 0 R
+/Annots 7 0 R
+>>
+endobj
+7 0 obj
+[
+8 0 R
+10 0 R
+12 0 R
+14 0 R
+16 0 R
+18 0 R
+20 0 R
+22 0 R
+]
+endobj
+8 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 102.0 529.541 263.984 517.541 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 9 0 R
+/H /I
+>>
+endobj
+10 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 108.0 511.341 250.148 499.341 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 11 0 R
+/H /I
+>>
+endobj
+12 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 108.0 493.141 209.144 481.141 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 13 0 R
+/H /I
+>>
+endobj
+14 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 108.0 474.941 251.144 462.941 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 15 0 R
+/H /I
+>>
+endobj
+16 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 108.0 456.741 205.16 444.741 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 17 0 R
+/H /I
+>>
+endobj
+18 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 108.0 438.541 209.144 426.541 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 19 0 R
+/H /I
+>>
+endobj
+20 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 108.0 420.341 222.812 408.341 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 21 0 R
+/H /I
+>>
+endobj
+22 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 108.0 402.141 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j
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 24 0 R
+/Annots 26 0 R
+>>
+endobj
+26 0 obj
+[
+27 0 R
+28 0 R
+29 0 R
+30 0 R
+31 0 R
+32 0 R
+33 0 R
+]
+endobj
+27 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 108.0 633.666 234.648 621.666 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 11 0 R
+/H /I
+>>
+endobj
+28 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 108.0 616.466 193.644 604.466 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 13 0 R
+/H /I
+>>
+endobj
+29 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 108.0 599.266 235.644 587.266 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 15 0 R
+/H /I
+>>
+endobj
+30 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 108.0 582.066 189.66 570.066 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 17 0 R
+/H /I
+>>
+endobj
+31 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 108.0 564.866 193.644 552.866 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 19 0 R
+/H /I
+>>
+endobj
+32 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 108.0 547.666 207.312 535.666 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 21 0 R
+/H /I
+>>
+endobj
+33 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 108.0 530.466 190.644 518.466 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 23 0 R
+/H /I
+>>
+endobj
+34 0 obj
+<< /Length 1941 /Filter [ /ASCII85Decode /FlateDecode ]
+ >>
+stream
+Gau0D968iG&AJ$Cn7^--#QYKaUaKBS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Box [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 42 0 R
+>>
+endobj
+44 0 obj
+<< /Length 605 /Filter [ /ASCII85Decode /FlateDecode ]
+ >>
+stream
+Gat$t9okbt&A@ZcHqY%9g'2&^Sso)&e@i4mDOV[Q)$hgP=_$1R^TT?p6WT)O66JKKcgs8;AsW^GC%*$;<8....@Z>cKr$4k;;g:RaE3]6h)m\=H(on@;c'M1FQeB;c\RJ6+L`h<jgg]LL6,^O8BEI*k;X%k2s5>)j;;B\h\2Q^[60E3p?&aM]lfHA>(KI`9Iq*ck'-AN4O2`V+51IE0dmg&MZYB#;E#ib15@4ag;q>q7+-W3m+:@dk_Da.ki7N$U0Q1:!AC7.K&73LuVN8-ps6O((c\<mo]stCiXMU8uB_JP)4uJk)XPCPF*R4fk]%+W3<4LdoC[672F<o5NC6<Am<r`oE64_EW,7oP:Ff69J:SWXX2$3<3!bB>$ZL5Ed%m"*U#_,`4gEp!MS0Z0`~>
+endstream
+endobj
+45 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 44 0 R
+>>
+endobj
+47 0 obj
+<<
+ /Title (\376\377\0\61\0\40\0\120\0\162\0\157\0\147\0\162\0\141\0\155\0\155\0\151\0\156\0\147\0\40\0\167\0\151\0\164\0\150\0\40\0\102\0\157\0\157\0\153\0\113\0\145\0\145\0\160\0\145\0\162)
+ /Parent 46 0 R
+ /First 48 0 R
+ /Last 54 0 R
+ /Count -7
+ /A 9 0 R
+>> endobj
+48 0 obj
+<<
+ /Title (\376\377\0\61\0\56\0\61\0\40\0\111\0\156\0\163\0\164\0\141\0\156\0\164\0\151\0\141\0\164\0\151\0\156\0\147\0\40\0\102\0\157\0\157\0\153\0\113\0\145\0\145\0\160\0\145\0\162\0\56)
+ /Parent 47 0 R
+ /Next 49 0 R
+ /A 11 0 R
+>> endobj
+49 0 obj
+<<
+ /Title (\376\377\0\61\0\56\0\62\0\40\0\103\0\162\0\145\0\141\0\164\0\151\0\156\0\147\0\40\0\141\0\40\0\154\0\145\0\144\0\147\0\145\0\162\0\56)
+ /Parent 47 0 R
+ /Prev 48 0 R
+ /Next 50 0 R
+ /A 13 0 R
+>> endobj
+50 0 obj
+<<
+ /Title (\376\377\0\61\0\56\0\63\0\40\0\101\0\144\0\144\0\151\0\156\0\147\0\40\0\145\0\156\0\164\0\162\0\151\0\145\0\163\0\40\0\164\0\157\0\40\0\141\0\40\0\154\0\145\0\144\0\147\0\145\0\162\0\56)
+ /Parent 47 0 R
+ /Prev 49 0 R
+ /Next 51 0 R
+ /A 15 0 R
+>> endobj
+51 0 obj
+<<
+ /Title (\376\377\0\61\0\56\0\64\0\40\0\103\0\154\0\157\0\163\0\151\0\156\0\147\0\40\0\141\0\40\0\154\0\145\0\144\0\147\0\145\0\162\0\56)
+ /Parent 47 0 R
+ /Prev 50 0 R
+ /Next 52 0 R
+ /A 17 0 R
+>> endobj
+52 0 obj
+<<
+ /Title (\376\377\0\61\0\56\0\65\0\40\0\117\0\160\0\145\0\156\0\151\0\156\0\147\0\40\0\141\0\40\0\154\0\145\0\144\0\147\0\145\0\162\0\56)
+ /Parent 47 0 R
+ /Prev 51 0 R
+ /Next 53 0 R
+ /A 19 0 R
+>> endobj
+53 0 obj
+<<
+ /Title (\376\377\0\61\0\56\0\66\0\40\0\122\0\145\0\141\0\144\0\151\0\156\0\147\0\40\0\146\0\162\0\157\0\155\0\40\0\154\0\145\0\144\0\147\0\145\0\162)
+ /Parent 47 0 R
+ /Prev 52 0 R
+ /Next 54 0 R
+ /A 21 0 R
+>> endobj
+54 0 obj
+<<
+ /Title (\376\377\0\61\0\56\0\67\0\40\0\104\0\145\0\154\0\145\0\164\0\151\0\156\0\147\0\40\0\141\0\40\0\154\0\145\0\144\0\147\0\145\0\162)
+ /Parent 47 0 R
+ /Prev 53 0 R
+ /A 23 0 R
+>> endobj
+55 0 obj
+<< /Type /Font
+/Subtype /Type1
+/Name /F3
+/BaseFont /Helvetica-Bold
+/Encoding /WinAnsiEncoding >>
+endobj
+56 0 obj
+<< /Type /Font
+/Subtype /Type1
+/Name /F5
+/BaseFont /Times-Roman
+/Encoding /WinAnsiEncoding >>
+endobj
+57 0 obj
+<< /Type /Font
+/Subtype /Type1
+/Name /F1
+/BaseFont /Helvetica
+/Encoding /WinAnsiEncoding >>
+endobj
+58 0 obj
+<< /Type /Font
+/Subtype /Type1
+/Name /F9
+/BaseFont /Courier
+/Encoding /WinAnsiEncoding >>
+endobj
+59 0 obj
+<< /Type /Font
+/Subtype /Type1
+/Name /F2
+/BaseFont /Helvetica-Oblique
+/Encoding /WinAnsiEncoding >>
+endobj
+60 0 obj
+<< /Type /Font
+/Subtype /Type1
+/Name /F7
+/BaseFont /Times-Bold
+/Encoding /WinAnsiEncoding >>
+endobj
+1 0 obj
+<< /Type /Pages
+/Count 8
+/Kids [6 0 R 25 0 R 35 0 R 37 0 R 39 0 R 41 0 R 43 0 R 45 0 R ] >>
+endobj
+2 0 obj
+<< /Type /Catalog
+/Pages 1 0 R
+ /Outlines 46 0 R
+ /PageMode /UseOutlines
+ >>
+endobj
+3 0 obj
+<< 
+/Font << /F3 55 0 R /F5 56 0 R /F1 57 0 R /F9 58 0 R /F2 59 0 R /F7 60 0 R >> 
+/ProcSet [ /PDF /ImageC /Text ] >> 
+endobj
+9 0 obj
+<<
+/S /GoTo
+/D [25 0 R /XYZ 85.0 659.0 null]
+>>
+endobj
+11 0 obj
+<<
+/S /GoTo
+/D [25 0 R /XYZ 85.0 501.466 null]
+>>
+endobj
+13 0 obj
+<<
+/S /GoTo
+/D [35 0 R /XYZ 85.0 653.0 null]
+>>
+endobj
+15 0 obj
+<<
+/S /GoTo
+/D [37 0 R /XYZ 85.0 588.2 null]
+>>
+endobj
+17 0 obj
+<<
+/S /GoTo
+/D [39 0 R /XYZ 85.0 622.6 null]
+>>
+endobj
+19 0 obj
+<<
+/S /GoTo
+/D [39 0 R /XYZ 85.0 264.947 null]
+>>
+endobj
+21 0 obj
+<<
+/S /GoTo
+/D [41 0 R /XYZ 85.0 362.6 null]
+>>
+endobj
+23 0 obj
+<<
+/S /GoTo
+/D [43 0 R /XYZ 85.0 441.4 null]
+>>
+endobj
+46 0 obj
+<<
+ /First 47 0 R
+ /Last 47 0 R
+>> endobj
+xref
+0 61
+0000000000 65535 f 
+0000018899 00000 n 
+0000019006 00000 n 
+0000019098 00000 n 
+0000000015 00000 n 
+0000000071 00000 n 
+0000000838 00000 n 
+0000000958 00000 n 
+0000001032 00000 n 
+0000019232 00000 n 
+0000001167 00000 n 
+0000019295 00000 n 
+0000001304 00000 n 
+0000019361 00000 n 
+0000001441 00000 n 
+0000019425 00000 n 
+0000001578 00000 n 
+0000019489 00000 n 
+0000001714 00000 n 
+0000019553 00000 n 
+0000001851 00000 n 
+0000019619 00000 n 
+0000001988 00000 n 
+0000019683 00000 n 
+0000002125 00000 n 
+0000004120 00000 n 
+0000004243 00000 n 
+0000004312 00000 n 
+0000004449 00000 n 
+0000004586 00000 n 
+0000004723 00000 n 
+0000004859 00000 n 
+0000004996 00000 n 
+0000005133 00000 n 
+0000005270 00000 n 
+0000007304 00000 n 
+0000007412 00000 n 
+0000009427 00000 n 
+0000009535 00000 n 
+0000011319 00000 n 
+0000011427 00000 n 
+0000013417 00000 n 
+0000013525 00000 n 
+0000015443 00000 n 
+0000015551 00000 n 
+0000016248 00000 n 
+0000019747 00000 n 
+0000016356 00000 n 
+0000016633 00000 n 
+0000016883 00000 n 
+0000017104 00000 n 
+0000017377 00000 n 
+0000017592 00000 n 
+0000017807 00000 n 
+0000018035 00000 n 
+0000018237 00000 n 
+0000018350 00000 n 
+0000018460 00000 n 
+0000018568 00000 n 
+0000018674 00000 n 
+0000018790 00000 n 
+trailer
+<<
+/Size 61
+/Root 2 0 R
+/Info 4 0 R
+>>
+startxref
+19798
+%%EOF

Added: websites/staging/zookeeper/trunk/content/doc/trunk/bookkeeperStarted.html
==============================================================================
--- websites/staging/zookeeper/trunk/content/doc/trunk/bookkeeperStarted.html (added)
+++ websites/staging/zookeeper/trunk/content/doc/trunk/bookkeeperStarted.html Wed Dec 15 23:20:39 2010
@@ -0,0 +1,446 @@
+<!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.8">
+<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://hadoop.apache.org/">Hadoop</a> &gt; <a href="http://hadoop.apache.org/zookeeper/">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://hadoop.apache.org/zookeeper/"><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="hadoop.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://hadoop.apache.org/zookeeper/">Project</a>
+</li>
+<li>
+<a class="unselected" href="http://wiki.apache.org/hadoop/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="http://wiki.apache.org/hadoop/ZooKeeper">Wiki</a>
+</div>
+<div class="menuitem">
+<a href="http://wiki.apache.org/hadoop/ZooKeeper/FAQ">FAQ</a>
+</div>
+<div class="menuitem">
+<a href="http://hadoop.apache.org/zookeeper/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="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>
+  
+
+  
+  
+<a name="N10009"></a><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="N10016"></a><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="N10024"></a><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://hadoop.apache.org/zookeeper/releases.html">
+        	  stable</a> release from one of the Apache Download
+       	 Mirrors.</p>
+<a name="N10032"></a><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="N1003C"></a><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\
+		:../log4j/apache-log4j-1.2.15/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="N10051"></a><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="N10078"></a><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/trunk/bookkeeperStarted.pdf
==============================================================================
--- websites/staging/zookeeper/trunk/content/doc/trunk/bookkeeperStarted.pdf (added)
+++ websites/staging/zookeeper/trunk/content/doc/trunk/bookkeeperStarted.pdf Wed Dec 15 23:20:39 2010
@@ -0,0 +1,407 @@
+%PDF-1.3
+%ª«¬­
+4 0 obj
+<< /Type /Info
+/Producer (FOP 0.20.5) >>
+endobj
+5 0 obj
+<< /Length 651 /Filter [ /ASCII85Decode /FlateDecode ]
+ >>
+stream
+Gaua=9lldX&;KZO$6AM$[e^2KX4sF+D%H#e;qi:r/NZW4+s>L^^TRbp&t+c"Ri+^9d#),2SsL1$O[X2k)58*)au0iT[oJ+/2BiF]MkJRZ8WJAD"D.>kqeVu!cVI0`WgTUi)CP7Sm"7'jW4%05`oN+VlbI"3XOS<HU?lBV1@6lXdKmr[ZDTP&a2'i,K`B;f$c%GfmTI7TPtNL[URC!6r^p6]<Mgf!'8YT:Hj!A,+XOq6kU.XL4+68J`K/dV"o>;r$=!c[cWt_%muLK9a,K`jI8cM`YLM;Bk,@U`Il0/d!mEN^B(W#]mL9NIJ.1GQ;0aPl0b4!,W/F,.m#'A'ZnGVX$^tWRK#,RQ4Q2BJAie$r$@&cK<N5T_CXF2b.?jd^/1&4UR8"o]!MB$70>g[O1V'?A8RL!<,[-din?dS32@MRVTpJf6ir#Y@(4bFOJs-mV3;DWeQrY=<33'bQXj:;XXoRsBSk[[<`o*U=Vs2*LX5E`$m7s3Rgtt89)@o8dJA01#L[HGVc:VP],.>\`h@'T<:nuAaqALs@*rm>B_2qL&S,Eit&HYiZ:hoO\T)5(]+.H_dBDh<!K*pTiMK.XXlqVidD4RjsqaPMJ5&Z%8CV?e"\LDV(6!.99UW_Ht[VAh69<H%*rrEsqf?=~>
+endstream
+endobj
+6 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 5 0 R
+/Annots 7 0 R
+>>
+endobj
+7 0 obj
+[
+8 0 R
+10 0 R
+12 0 R
+14 0 R
+16 0 R
+18 0 R
+20 0 R
+]
+endobj
+8 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 102.0 529.541 367.988 517.541 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 9 0 R
+/H /I
+>>
+endobj
+10 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 108.0 511.341 189.488 499.341 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 11 0 R
+/H /I
+>>
+endobj
+12 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 108.0 493.141 173.492 481.141 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 13 0 R
+/H /I
+>>
+endobj
+14 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 108.0 474.941 211.472 462.941 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 15 0 R
+/H /I
+>>
+endobj
+16 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 108.0 456.741 212.84 444.741 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A 17 0 R
+/H /I
+>>
+endobj
+18 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 108.0 438.541 229.484 426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*oO$WWVIO/Al0t,\Ek0R4=tS2)BfJ.K>LZ<42!2V6X3A7hheqDP*01?H5dJ9p9DgHI4E6tHH'WQ72hbX/nTo,G-*MWessYI73;cK%`4EE2cM`J_b=Pg$Y/R#dDjjcLO8p(/XkI>8t4A+^6l7X5(V:B2u(
 N][(%]tZ[:=p\b`fk@.oJ/0iBJ<,Ej6E'3n]MVp.Kj0e$:278k?UYP4d6k20Ni][RB2F.e!?4QKG-0Gn7CB_3]Wfd>l1K%Vef`oI'*GH2geof;[(1sD`L^;6R^7&")QmsoDN]"?5>h9f`k!YEM44U9DG*"B3%9X`a7`fP5jmB\?;Zn1bM1m:h9C9'%-@NX)>Re<;kr^l8,?"`(D<n@,k!if>GF^r*gpC?I)H4oVs[pmf+L6UH]]GE0<S]XM,?0aZ1007rI>4W6:)>]E6s#kZO$N~>
+endstream
+endobj
+23 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 22 0 R
+/Annots 24 0 R
+>>
+endobj
+24 0 obj
+[
+25 0 R
+26 0 R
+27 0 R
+]
+endobj
+25 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 261.96 590.066 424.752 578.066 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (bookkeeperProgrammer.html)
+/S /URI >>
+/H /I
+>>
+endobj
+26 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 110.328 538.813 215.328 526.813 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (bookkeeperConfig.html#bk_sysReq)
+/S /URI >>
+/H /I
+>>
+endobj
+27 0 obj
+<< /Type /Annot
+/Subtype /Link
+/Rect [ 180.972 474.36 208.968 462.36 ]
+/C [ 0 0 0 ]
+/Border [ 0 0 0 ]
+/A << /URI (http://hadoop.apache.org/zookeeper/releases.html)
+/S /URI >>
+/H /I
+>>
+endobj
+28 0 obj
+<< /Length 1782 /Filter [ /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Ec:s#+"1;F</X+YFK$e.OK_?ie\<,X*b&cQLOY0bmOG9i-]6hLJ5FA=P">[%gSds\14naL&:u>ii9tdT%p'7#HHT@?I,i$\#>jG%U_Hs1kY7YIs\*OM%17!1o@1\W#_.6B5j0ATG^sS[UU.AT;UB9=Lk)Fd0kD&kf4?cUnefOq-sFa.+Brh%e$HqV((0p;LlbDCuF\el;o0s!l%Xo@d&9t1d<XM%c%+O.5WLf&?j0cI9iG_DI$ZkD,0DWq[F!t]rcb>?%\Xr<,us!$d7JSp<=]YYrV'<8ot+]7BM=$Y)8B;eC)HXn,B$s.[:[6\Wgb_#s.`h%R,AZ%aT<*mTddK/<&1Indu2JoSE&YNSr!R\=_d8B'Xm^FqRq9a*L[oI8f1e>#gQTdr$P#>-a3r_/X\&VQe6b~>
+endstream
+endobj
+31 0 obj
+<< /Type /Page
+/Parent 1 0 R
+/MediaBox [ 0 0 612 792 ]
+/Resources 3 0 R
+/Contents 30 0 R
+>>
+endobj
+33 0 obj
+<<
+ /Title (\376\377\0\61\0\40\0\107\0\145\0\164\0\164\0\151\0\156\0\147\0\40\0\123\0\164\0\141\0\162\0\164\0\145\0\144\0\72\0\40\0\123\0\145\0\164\0\164\0\151\0\156\0\147\0\40\0\165\0\160\0\40\0\102\0\157\0\157\0\153\0\113\0\145\0\145\0\160\0\145\0\162\0\40\0\164\0\157\0\40\0\167\0\162\0\151\0\164\0\145\0\40\0\154\0\157\0\147\0\163\0\56)
+ /Parent 32 0 R
+ /First 34 0 R
+ /Last 39 0 R
+ /Count -6
+ /A 9 0 R
+>> endobj
+34 0 obj
+<<
+ /Title (\376\377\0\61\0\56\0\61\0\40\0\120\0\162\0\145\0\55\0\162\0\145\0\161\0\165\0\151\0\163\0\151\0\164\0\145\0\163)
+ /Parent 33 0 R
+ /Next 35 0 R
+ /A 11 0 R
+>> endobj
+35 0 obj
+<<
+ /Title (\376\377\0\61\0\56\0\62\0\40\0\104\0\157\0\167\0\156\0\154\0\157\0\141\0\144)
+ /Parent 33 0 R
+ /Prev 34 0 R
+ /Next 36 0 R
+ /A 13 0 R
+>> endobj
+36 0 obj
+<<
+ /Title (\376\377\0\61\0\56\0\63\0\40\0\114\0\157\0\143\0\141\0\154\0\102\0\157\0\157\0\153\0\113\0\145\0\145\0\160\0\145\0\162)
+ /Parent 33 0 R
+ /Prev 35 0 R
+ /Next 37 0 R
+ /A 15 0 R
+>> endobj
+37 0 obj
+<<
+ /Title (\376\377\0\61\0\56\0\64\0\40\0\123\0\145\0\164\0\164\0\151\0\156\0\147\0\40\0\165\0\160\0\40\0\142\0\157\0\157\0\153\0\151\0\145\0\163)
+ /Parent 33 0 R
+ /Prev 36 0 R
+ /Next 38 0 R
+ /A 17 0 R
+>> endobj
+38 0 obj
+<<
+ /Title (\376\377\0\61\0\56\0\65\0\40\0\123\0\145\0\164\0\164\0\151\0\156\0\147\0\40\0\165\0\160\0\40\0\132\0\157\0\157\0\113\0\145\0\145\0\160\0\145\0\162)
+ /Parent 33 0 R
+ /Prev 37 0 R
+ /Next 39 0 R
+ /A 19 0 R
+>> endobj
+39 0 obj
+<<
+ /Title (\376\377\0\61\0\56\0\66\0\40\0\105\0\170\0\141\0\155\0\160\0\154\0\145)
+ /Parent 33 0 R
+ /Prev 38 0 R
+ /A 21 0 R
+>> endobj
+40 0 obj
+<< /Type /Font
+/Subtype /Type1
+/Name /F3
+/BaseFont /Helvetica-Bold
+/Encoding /WinAnsiEncoding >>
+endobj
+41 0 obj
+<< /Type /Font
+/Subtype /Type1
+/Name /F5
+/BaseFont /Times-Roman
+/Encoding /WinAnsiEncoding >>
+endobj
+42 0 obj
+<< /Type /Font
+/Subtype /Type1
+/Name /F1
+/BaseFont /Helvetica
+/Encoding /WinAnsiEncoding >>
+endobj
+43 0 obj
+<< /Type /Font
+/Subtype /Type1
+/Name /F9
+/BaseFont /Courier
+/Encoding /WinAnsiEncoding >>
+endobj
+44 0 obj
+<< /Type /Font
+/Subtype /Type1
+/Name /F2
+/BaseFont /Helvetica-Oblique
+/Encoding /WinAnsiEncoding >>
+endobj
+45 0 obj
+<< /Type /Font
+/Subtype /Type1
+/Name /F7
+/BaseFont /Times-Bold
+/Encoding /WinAnsiEncoding >>
+endobj
+1 0 obj
+<< /Type /Pages
+/Count 4
+/Kids [6 0 R 23 0 R 29 0 R 31 0 R ] >>
+endobj
+2 0 obj
+<< /Type /Catalog
+/Pages 1 0 R
+ /Outlines 32 0 R
+ /PageMode /UseOutlines
+ >>
+endobj
+3 0 obj
+<< 
+/Font << /F3 40 0 R /F5 41 0 R /F1 42 0 R /F9 43 0 R /F2 44 0 R /F7 45 0 R >> 
+/ProcSet [ /PDF /ImageC /Text ] >> 
+endobj
+9 0 obj
+<<
+/S /GoTo
+/D [23 0 R /XYZ 85.0 659.0 null]
+>>
+endobj
+11 0 obj
+<<
+/S /GoTo
+/D [23 0 R /XYZ 85.0 567.066 null]
+>>
+endobj
+13 0 obj
+<<
+/S /GoTo
+/D [23 0 R /XYZ 85.0 515.813 null]
+>>
+endobj
+15 0 obj
+<<
+/S /GoTo
+/D [23 0 R /XYZ 85.0 451.36 null]
+>>
+endobj
+17 0 obj
+<<
+/S /GoTo
+/D [23 0 R /XYZ 85.0 373.707 null]
+>>
+endobj
+19 0 obj
+<<
+/S /GoTo
+/D [29 0 R /XYZ 85.0 659.0 null]
+>>
+endobj
+21 0 obj
+<<
+/S /GoTo
+/D [29 0 R /XYZ 85.0 490.147 null]
+>>
+endobj
+32 0 obj
+<<
+ /First 33 0 R
+ /Last 33 0 R
+>> endobj
+xref
+0 46
+0000000000 65535 f 
+0000009974 00000 n 
+0000010053 00000 n 
+0000010145 00000 n 
+0000000015 00000 n 
+0000000071 00000 n 
+0000000813 00000 n 
+0000000933 00000 n 
+0000001000 00000 n 
+0000010279 00000 n 
+0000001135 00000 n 
+0000010342 00000 n 
+0000001272 00000 n 
+0000010408 00000 n 
+0000001409 00000 n 
+0000010474 00000 n 
+0000001546 00000 n 
+0000010539 00000 n 
+0000001682 00000 n 
+0000010605 00000 n 
+0000001819 00000 n 
+0000010669 00000 n 
+0000001955 00000 n 
+0000004308 00000 n 
+0000004431 00000 n 
+0000004472 00000 n 
+0000004650 00000 n 
+0000004835 00000 n 
+0000005035 00000 n 
+0000006910 00000 n 
+0000007018 00000 n 
+0000007623 00000 n 
+0000010735 00000 n 
+0000007731 00000 n 
+0000008157 00000 n 
+0000008342 00000 n 
+0000008506 00000 n 
+0000008712 00000 n 
+0000008934 00000 n 
+0000009168 00000 n 
+0000009312 00000 n 
+0000009425 00000 n 
+0000009535 00000 n 
+0000009643 00000 n 
+0000009749 00000 n 
+0000009865 00000 n 
+trailer
+<<
+/Size 46
+/Root 2 0 R
+/Info 4 0 R
+>>
+startxref
+10786
+%%EOF

Added: websites/staging/zookeeper/trunk/content/doc/trunk/bookkeeperStream.html
==============================================================================
--- websites/staging/zookeeper/trunk/content/doc/trunk/bookkeeperStream.html (added)
+++ websites/staging/zookeeper/trunk/content/doc/trunk/bookkeeperStream.html Wed Dec 15 23:20:39 2010
@@ -0,0 +1,610 @@
+<!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.8">
+<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://hadoop.apache.org/">Hadoop</a> &gt; <a href="http://hadoop.apache.org/zookeeper/">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://hadoop.apache.org/zookeeper/"><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="hadoop.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://hadoop.apache.org/zookeeper/">Project</a>
+</li>
+<li>
+<a class="unselected" href="http://wiki.apache.org/hadoop/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="http://wiki.apache.org/hadoop/ZooKeeper">Wiki</a>
+</div>
+<div class="menuitem">
+<a href="http://wiki.apache.org/hadoop/ZooKeeper/FAQ">FAQ</a>
+</div>
+<div class="menuitem">
+<a href="http://hadoop.apache.org/zookeeper/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="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>
+  
+
+  
+	
+<a name="N10009"></a><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="N10022"></a><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="N100E7"></a><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>