Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5E63497B8 for ; Thu, 8 Mar 2012 19:51:25 +0000 (UTC) Received: (qmail 14366 invoked by uid 500); 8 Mar 2012 19:51:23 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 14328 invoked by uid 500); 8 Mar 2012 19:51:23 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 14320 invoked by uid 99); 8 Mar 2012 19:51:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Mar 2012 19:51:23 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [130.233.222.103] (HELO mx04.aalto.fi) (130.233.222.103) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Mar 2012 19:51:15 +0000 Received: from mx04.aalto.fi (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 4A079F0289 for ; Thu, 8 Mar 2012 21:50:55 +0200 (EET) Received: from EXHUB04.org.aalto.fi (ex-hub04.org.aalto.fi [130.233.222.117]) by mx04.aalto.fi (Postfix) with ESMTP id 3AC29F0286 for ; Thu, 8 Mar 2012 21:50:55 +0200 (EET) Received: from EXMDB02.org.aalto.fi ([169.254.4.27]) by EXHUB04.org.aalto.fi ([130.233.222.117]) with mapi id 14.01.0339.001; Thu, 8 Mar 2012 21:50:55 +0200 From: de Souza Medeiros Andre To: "user@hbase.apache.org" Subject: RE: HTable.getEndKeys() returning empty results Thread-Topic: HTable.getEndKeys() returning empty results Thread-Index: Acz9SAYLFo+KE3P3RaCnK/UmIMbmXf//5RGAgABUW6M= Date: Thu, 8 Mar 2012 19:50:54 +0000 Message-ID: <460ED1013765BD4A92CDA53C2082DCC68DD8D49D@EXMDB02.org.aalto.fi> References: <460ED1013765BD4A92CDA53C2082DCC68DD8D414@EXMDB02.org.aalto.fi>, In-Reply-To: Accept-Language: en-US, fi-FI Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [82.130.17.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org Thanks for the answer.=0A= This is quite confusing though, what is the point of having a method to ret= rieve the last key if we know that anyway it will be an empty byte array?= =0A= =0A= Or does this happen only with one-region tables?=0A= =0A= Any way, is there some way of getting the last _data_ row of a table? Other= than scanning the whole thing...=0A= =0A= Thanks,=0A= - Andre Medeiros=0A= ________________________________________=0A= From: saint.ack@gmail.com [saint.ack@gmail.com] on behalf of Stack [stack@d= uboce.net]=0A= Sent: Thursday, March 08, 2012 18:48=0A= To: user@hbase.apache.org=0A= Subject: Re: HTable.getEndKeys() returning empty results=0A= =0A= On Thu, Mar 8, 2012 at 8:25 AM, de Souza Medeiros Andre=0A= wrote:=0A= > Hi all,=0A= >=0A= > Has someone had problems with HTable.getEndKeys() method? In my applicati= on it returns an array of byte[], but the first (and only) byte[] is empty,= so essentially it's telling me that the (single) region has no end key.=0A= >=0A= > The table has 3 rows and I'm running standalone HBase 0.90.4 CDH3u3 on my= local machine. Moreover, the call getEndKeys() is executed immediately aft= er I put rows in the table.=0A= >=0A= > Do I need to wait until the .META. table gets updated with the regions' e= nd row keys?=0A= > Does HTable.getEndKeys() work only in a fully distributed mode?=0A= > Is there any other way of getting the last row in a table? (this is my ob= jective after all)=0A= >=0A= =0A= An empty byte array is the last key in a table of one region only. An=0A= hbase table uses empty byte array as both the start and end row=0A= signifier as per the bigtable paper (I don't see this explicitly=0A= called out in the reference guide but I'm probably not looking in=0A= right place).=0A= =0A= St.Ack=0A=