Return-Path: Delivered-To: apmail-hadoop-zookeeper-user-archive@minotaur.apache.org Received: (qmail 65701 invoked from network); 28 Sep 2010 16:38:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Sep 2010 16:38:06 -0000 Received: (qmail 188 invoked by uid 500); 28 Sep 2010 16:38:06 -0000 Delivered-To: apmail-hadoop-zookeeper-user-archive@hadoop.apache.org Received: (qmail 118 invoked by uid 500); 28 Sep 2010 16:38:05 -0000 Mailing-List: contact zookeeper-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: zookeeper-user@hadoop.apache.org Delivered-To: mailing list zookeeper-user@hadoop.apache.org Received: (qmail 110 invoked by uid 99); 28 Sep 2010 16:38:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 16:38:05 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [68.142.207.64] (HELO web31801.mail.mud.yahoo.com) (68.142.207.64) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 28 Sep 2010 16:37:55 +0000 Received: (qmail 74466 invoked by uid 60001); 28 Sep 2010 16:37:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1285691853; bh=838Cmq6W4gLexs0xd4zBJO/hv7nonsrqQDKOpQFz9yI=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=yhweEFr5CGUdvVXW2oLsDO+0SnZ5pDXtGYEYLhZgmA6Ng7/MPClG5vgAJYTEZN+tSch7GJLDczDKsVcnl4v0ekHRPDZRyYMjdUKmK38knrxOJtJ2vEK1smhc/pdsOiIWzTKB+qRRVKyr6fXVw4NVFUbtT5E21Hj1r+cE6M31FYk= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=vzjrcMYDGmsmJtByIP4uIvzG6DTrgWGF93HygK6QIpx80OK6Vtkc7ogCCZfw4F4ot6ncSU7J5BEUciXqRewKGaRmUUnHDz2bXT2vItmu+P8vyp5irlQTD8WWw10zlg2r+OWpG5dOjgz3dXTaT7m67bTXhPLKboEomRcajYgFPMw=; Message-ID: <853734.74273.qm@web31801.mail.mud.yahoo.com> X-YMail-OSG: OmpPCsIVM1n8gMTWJvV2yXtlLhswTOZJqnMJx6W4tXg8Jjt K2HHrb5oPKqW2E1XyY8cGLqzOwlQo3KhLZRm517JWf7bi8fuLBOp8SxYxgtX ncOX6PU6.aHWOCRzeJ0rm0LWOvhqPfvaJIB0Wjtxv3MyTQnYkVcpJBWxhMgZ woPw4UuHdsXkMZEusYHMn_354qUsHVT0vW4FBvPJ.Ey3CnouDiMABq9SahLF 8AIXt.DoUM7FqVOATg6Zs7Mo6okS58Jv_s6VZoyt0bwNXx_QeQr.NcvwbHID YxR7NAQB41WSzLAWEvkbtCIv3so9T40JoOKyLZKA6YkEEAsDH5P5Gsg-- Received: from [147.243.216.30] by web31801.mail.mud.yahoo.com via HTTP; Tue, 28 Sep 2010 09:37:33 PDT X-Mailer: YahooMailRC/504.5 YahooMailWebService/0.8.107.284920 Date: Tue, 28 Sep 2010 09:37:33 -0700 (PDT) From: amit jaiswal Subject: BookKeeper newbie question To: zookeeper-user@hadoop.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi,=0A=0AI am experimenting with BookKeeper and have a question on LedgerHa= ndler class. =0AThe readEntries(firstEntry, lastEntry) method takes the ind= exes of first and =0Alast entries. Also, the LedgerSequence object returned= has method =0AhasMoreElements().=0A=0AQuestion:=0A1. How does a client kno= ws the index of the last entry? I was expecting clients =0Ato make a call l= ike readEntries(0, Integer.MAX_INT) and the hasMoreElements() to =0Areturn = false the moment there are no more entries. Am I missing something in the = =0Away the API is supposed to be used?=0A=0A2. The LedgerSequence.hasMoreEl= ements() returns true (even if there are no more =0Aentries), and the nextE= ntry returns null.=0A=0ACan someone please clarify the correct semantics o= f these APIs.=0A=0A-amit