Return-Path: Delivered-To: apmail-hadoop-zookeeper-user-archive@minotaur.apache.org Received: (qmail 98680 invoked from network); 1 Oct 2010 06:27:18 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Oct 2010 06:27:18 -0000 Received: (qmail 37119 invoked by uid 500); 1 Oct 2010 06:27:18 -0000 Delivered-To: apmail-hadoop-zookeeper-user-archive@hadoop.apache.org Received: (qmail 36908 invoked by uid 500); 1 Oct 2010 06:27:15 -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 36894 invoked by uid 99); 1 Oct 2010 06:27:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Oct 2010 06:27:15 +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.72] (HELO web31809.mail.mud.yahoo.com) (68.142.207.72) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 01 Oct 2010 06:27:06 +0000 Received: (qmail 64587 invoked by uid 60001); 1 Oct 2010 06:26:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1285914404; bh=QWnrBvQYL3PkiATvnnMoOzvsQ03vARTTNyQ4XPtDAnk=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=hDTFlGdGOfOrN5X1qHkabVOkjQHTJcFIApjEsrBH8e0r9VfwdG207cLk+5swZ4TPcM+v33nuig7s4JVi28qToomifFQ7uGx1K1wsPByWmmC9O9bL2tb3PBr3vbRXanvY6EGVxiqj4XZeXsY0R8py2v3sGCSqLif5F7Z9uKukAhI= 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=aWtEBbWwsWbzioGiOQfH6kta3YHt83y51/m1qowEmZStkWv5aCMvlcKmGUfJerL2maKx1CDfmEBz7L6UqcpurZ01qzFeAlpDDQGp32jGQxJfTUVS+8mvh6L54YJck5hdoR93DwAPO+4wUvJNQbVZG0CRuDf4IrLFxGjKYJBUg+Y=; Message-ID: <514402.64456.qm@web31809.mail.mud.yahoo.com> X-YMail-OSG: BEF6MJ4VM1nqyv8yrYftF.pa7W7UJtl9gYU7twArWuuKWTo g.bG24YcuTYsZMVGTG4jymbkEFeDqIpTLsa29PY7queeYFK5wpL7Ibw4XVeU 1lcNOnNZSJuG2o_MnqbnaGZuZ0oLz4vsi7A8AwHsmxxtSn.L3NGFbPlsRUa6 Nhlwlz7XlZge7ud5kedUnPSuiZeSGwUEpNhYmMAW4zLpQaLNCO6MHmLxKc8j YATbdPzvLzQS.c2aaEb2.wCmGp0LPpgtqGOiU7f0QQQ6ZsVd4NKCkJOttVig KU0bx73n4DmC09li5stRUW9b_.LEnoJb8Pxe0YqchfHAicOr38KO7iqUQKb. 4KiofmuUrle8gey9nfZko6PdpWMio Received: from [147.243.216.30] by web31809.mail.mud.yahoo.com via HTTP; Thu, 30 Sep 2010 23:26:44 PDT X-Mailer: YahooMailRC/497 YahooMailWebService/0.8.107.284920 Date: Thu, 30 Sep 2010 23:26:44 -0700 (PDT) From: amit jaiswal Subject: Re: 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=0ACan somebody please answer this query. =0A=0A-regards=0AAmit=0A=0A= =0A----- Original Message ----=0AFrom: amit jaiswal =0A= To: zookeeper-user@hadoop.apache.org=0ASent: Tue, 28 September, 2010 10:07:= 33 PM=0ASubject: BookKeeper newbie question=0A=0AHi,=0A=0AI am experimentin= g with BookKeeper and have a question on LedgerHandler class. =0AThe readEn= tries(firstEntry, lastEntry) method takes the indexes of first and =0Alast = entries. Also, the LedgerSequence object returned has method =0AhasMoreElem= ents().=0A=0AQuestion:=0A1. How does a client knows the index of the last e= ntry? I was expecting clients =0Ato make a call like readEntries(0, Integer= .MAX_INT) and the hasMoreElements() to =0A=0Areturn false the moment there = are no more entries. Am I missing something in the =0A=0Away the API is sup= posed to be used?=0A=0A2. The LedgerSequence.hasMoreElements() returns true= (even if there are no more =0Aentries), and the nextEntry returns null.=0A= =0ACan someone please clarify the correct semantics of these APIs.=0A=0A-a= mit=0A