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 D29CB767B for ; Tue, 13 Dec 2011 23:56:56 +0000 (UTC) Received: (qmail 66553 invoked by uid 500); 13 Dec 2011 23:56:54 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 66528 invoked by uid 500); 13 Dec 2011 23:56:54 -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 66520 invoked by uid 99); 13 Dec 2011 23:56:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Dec 2011 23:56:54 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [98.138.91.129] (HELO nm29-vm2.bullet.mail.ne1.yahoo.com) (98.138.91.129) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 13 Dec 2011 23:56:43 +0000 Received: from [98.138.90.50] by nm29.bullet.mail.ne1.yahoo.com with NNFMP; 13 Dec 2011 23:56:20 -0000 Received: from [98.138.89.171] by tm3.bullet.mail.ne1.yahoo.com with NNFMP; 13 Dec 2011 23:56:20 -0000 Received: from [127.0.0.1] by omp1027.mail.ne1.yahoo.com with NNFMP; 13 Dec 2011 23:56:20 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 942255.86235.bm@omp1027.mail.ne1.yahoo.com Received: (qmail 11687 invoked by uid 60001); 13 Dec 2011 23:56:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1323820580; bh=QaUlxWCkJJbDU+Qh5NyaGRfV83JW79wigjMHwlhvIbY=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=3UNxAzRBipgVrdx7fY2KG5sbWIwa2sipyL/lp03caSFGg5V8MbJ1xN3srPel5ZtaRsNIVeO2S5Nn4/n4qVI91uIEuvYUCb8fjMNhQoJSMhoaagoW3DTpEX4kXR2cAf0KZqZNdLfP1c/Qb13tiIHR1g414aOoyFTBY1tp4XDlzXw= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=wKn3FI9JO/cokhQoKcdT+MfFtJUKjCyych1lbIZ+eai5AIEfWgkabW4ZlGnsTMRj9br2wxUItseb0NU5kl+yWj6QfECUvXscSBfuseVCu3sx2FhdA2SyQwlH957erPd6IuzRYc06Wkq+8wPBWMAG4Thpy2YsqQ0z63GzFlGeKSc=; X-YMail-OSG: 4okFLEAVM1kiNzAjaETWzv5SyCWI1X_3pTcDI31kCCR40p8 1dEf6_ka0x.TdBXxvdFJJkhiWoEWgwTlguBhpWOCtjKUkYMbEXEFHAtNcNMy c7bRUTQXz8oxuRzhYnsUidjYNaa1lFrJrVPOFgdULt05ehwMew2KsTqiZDP5 VQ9hDkllqg1tFVavLRZparDs3t7JgGngYGwVnP0xuc54DURkFHUNK3bCrpTH ix_DAU75.SgYZ82YWoGfjhsHar1Jqya8o0POCdleIylcgQsFjo9zgQe7YXAc X.Z20o.pTD8MeOz6.c_wqR9XK7sF3K6n.9.Wy4Aw0y4hYOZm3nQO826t784D 0XQed8pejC9_NjCGog1OYRqLCDbqBwEpcydMFFWkPyvtRLkCI6z4dyi_5gwj EAVFBrsPiNg1AcJuwHM6g4GiTf16UTziz2MF6vNxjyRYWZ3TYrzzInZMTtke psS4GU5E- Received: from [204.14.239.222] by web121713.mail.ne1.yahoo.com via HTTP; Tue, 13 Dec 2011 15:56:20 PST X-Mailer: YahooMailWebService/0.8.115.331698 References: <1323812604.77360.YahooMailNeo@web120805.mail.ne1.yahoo.com> <1323814574.81998.YahooMailNeo@web120801.mail.ne1.yahoo.com> Message-ID: <1323820580.8583.YahooMailNeo@web121713.mail.ne1.yahoo.com> Date: Tue, 13 Dec 2011 15:56:20 -0800 (PST) From: lars hofhansl Reply-To: lars hofhansl Subject: Re: HBase- Scan with wildcard character To: "user@hbase.apache.org" , Sreeram K In-Reply-To: <1323814574.81998.YahooMailNeo@web120801.mail.ne1.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-3089137-1792194709-1323820580=:8583" X-Virus-Checked: Checked by ClamAV on apache.org ---3089137-1792194709-1323820580=:8583 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable The shell lets you only do that much.=0AHBase does not support % wildcard. = It just happens to work in your case because % has a low ascii code.=0A=0A= =0AYou set the startRow of the scan. It does not need to exist, but the val= ue must sort before the rows your are looking for and after all rows before= it.=0ASame for the stopRow. It does not need to exist, but it must sort af= ter the rows your are looking and before all rows you do not want to see.= =0A=0ATry setting STARTROW to "sample1" and STOPROW to "sample1\255". That = will work as long as ascii 255 is not used in your row keys.=0A=0A-- Lars= =0A=0A=0A=0A________________________________=0A From: Sreeram K =0ATo: "user@hbase.apache.org" ; lars hof= hansl =0ASent: Tuesday, December 13, 2011 2:16 PM=0AS= ubject: Re: HBase- Scan with wildcard character=0A =0AThanks Doug. I am loo= king more from HBase shell for this.=0A=0A=0A----- Original Message -----= =0AFrom: Doug Meil =0ATo: "user@hbase.apache= .org" ; Sreeram K ; lars hofha= nsl =0ACc: =0ASent: Tuesday, December 13, 2011 2:01 PM= =0ASubject: Re: HBase- Scan with wildcard character=0A=0A=0AHi there-=0A=0A= At some point you're probably going to want to get out of the shell, take= =0Aa look at this...=0A=0Ahttp://hbase.apache.org/book.html#scan=0A=0A=0A= =0A=0A=0A=0AOn 12/13/11 4:43 PM, "Sreeram K" wrote:= =0A=0A>Thanks Lars. I am looking into that.=0A>=0A>Is there a way we can se= arch all the entries starting=A0 with 565HGOUO and=0A>print all the rows?= =0A>=0A>Example:=0A>scan 'SAMPLE_TABLE' ,{COLUMNS=0A>=3D>['sample_info:FILE= NAME','event_info:FILENAME'],STARTROW=3D>'sample1%'}=0A>=0A>I am seeing all= the Rows and information after that sample1% row in the=0A>DB.=0A>if for i= nstance I have extra1rowid after sample1%, I am able to see that=0A>also.= =0A>=0A>I am looking for a query to print only the rows which has Rowid sta= rting=0A>with sample1%.=0A>=0A>can you let me know if we can get a query li= ke that on hbase shell=0A>=0A>=0A>=0A>----- Original Message -----=0A>From:= lars hofhansl =0A>To: "user@hbase.apache.org" ; Sreeram K=0A>=0A>Cc: =0A>Sent: Tues= day, December 13, 2011 11:36 AM=0A>Subject: Re: HBase- Scan with wildcard c= haracter=0A>=0A>info:regioninfo is actually a serialized Java object (HRegi= onInfo). What=0A>you see in the shell the result of HRegionInfo.toString(),= which looks=0A>like a =0A>=0A>ruby object, but it is really just a string = (see HRegionInfo.toString()).=0A>=0A>=0A>=0A>______________________________= __=0A>From: Sreeram K =0A>To: "user@hbase.apache.org"= ; lars hofhansl=0A>=0A>Sent: T= uesday, December 13, 2011 12:16 AM=0A>Subject: Re: HBase- Scan with wildcar= d character=0A>=0A>Thanks Lars, I will look into that .=0A>=0A>one more que= stion: on hbase shell.=0A>=0A>If I have :=0A>=A0 =A0 =A0 =A0 =A0=A0 hbase> = scan 't1.', {COLUMNS =3D> 'info:regioninfo'}=A0 , it is=0A>printing all the= colums of regioninfo.=0A>=0A>=0A>can I have a condition like:if colum,info= .regioninfo=3D2 (value) than print=0A>all the associated columns like info:= regioninfo1, regioninfo2.=0A>=0A>=0A>=0A>----- Original Message -----=0A>Fr= om: lars hofhansl =0A>To: "user@hbase.apache.org" ; Sreeram K=0A>=0A>Cc: =0A>Sent: M= onday, December 12, 2011 10:45 PM=0A>Subject: Re: HBase- Scan with wildcard= character=0A>=0A>First off, what you want is:=A0=A0 select * from table wh= ere id like=0A>'4E1167677%'=A0=A0 in MySQL.=0A>Relational databases can typ= ically use indexes to satisfy like "xxx%"=0A>type queries, but not "%xxx%" = queries.=0A>=0A>HBase is really good at "xxx%" (prefix) type queries.=0A>= =0A>Just create a scan object, set the startkey to "4E1167677", then call= =0A>next resulting scanner until the returned key no longer start with=0A>"= 4E1167677".=0A>=0A>In your particular case (since your keys are hex numbers= ), you can even=0A>set the stopKey to "4E1167677z" (the z will sort after a= ny valid hex=0A>digit),=0A>and the scanner will automatically stop at the l= ast possible match.=0A>=0A>=0A>Have a look at the the Scan object and HTabl= e.getScanner(...)=0A>=0A>=0A>-- Lars=0A>=0A>=0A>----- Original Message ----= -=0A>From: Sreeram K =0A>To: "user@hbase.apache.org" = =0A>Cc: =0A>Sent: Monday, December 12, 2011 6:58 PM= =0A>Subject: HBase- Scan with wildcard character=0A>=0A>Hi,=0A>=0A>I have a= Table defined with the 3 columns.=0A>I am looking for a query in HBase she= ll to print all the values starting=0A>with some characters in Rowkey.=0A>= =0A>Example:=0A>My rowids are:Coulm+Key=0A>4E11676773AC3B6E9A3FE1CCD1051B8C= &1323736118749497=0A>colum=3Dxxxxxx:size,timestamp=3D67667767,value=3D=0A>= =0A>4E11676773AC3B6E9A3FE1CCD1051B8C&132373611874988=0A>colum=3D11xxxxx:siz= e,timestamp=3D67667767,value=3D=0A>=0A>4E11676773AC3B6E9A3FE1CCD1051B8C&132= 373611565656=0A>colum=3D1xxxxxx:size,timestamp=3D67667767,value=3D=0A>=0A>= =0A>Something similar to mysql =3D> select * from table where id=3D'%4E1167= 677%'=0A>=0A>do we have any command like this in the HBase shell - Scan wit= h wild=0A>characters?=0A>=0A>(or) should we end up using HIVE ? what are th= e other options?=0A>=0A>Can you please let me know.=0A>=0A>-Sreeram =0A> ---3089137-1792194709-1323820580=:8583--