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 0E1B7CE96 for ; Mon, 24 Jun 2013 00:51:44 +0000 (UTC) Received: (qmail 15078 invoked by uid 500); 24 Jun 2013 00:51:41 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 15023 invoked by uid 500); 24 Jun 2013 00:51:41 -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 15015 invoked by uid 99); 24 Jun 2013 00:51:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Jun 2013 00:51:41 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of yuzhihong@gmail.com designates 209.85.215.52 as permitted sender) Received: from [209.85.215.52] (HELO mail-la0-f52.google.com) (209.85.215.52) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Jun 2013 00:51:35 +0000 Received: by mail-la0-f52.google.com with SMTP id fo12so9593372lab.39 for ; Sun, 23 Jun 2013 17:51:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=zrjz/dnnN762qu+Zod1KzKl7O+Y/1G7E/D+GghC5eqs=; b=cOeKiv7w0ZdaDu5/VkTuHawqPnCS+pKfQ9aS7hDbP83VXl1S2Y8ddxdULSsmA6mGZf g8ith7CEFxKc3oSRjeuUPHZKoaj8lC6khI/4bxmFQGs3dq9cYEJtIgjKC9ZmfNRsD4/p nVhkzsj9gubp7pUh90DEuNbfSwRqGf1Yb/G2dKcRpY0c7+exIH7xZkdUG1Tr+un5bzuH AnqmFkpU4lixYTRP30+sbi4qOESCwtjI2TH45Q0Neeb4IJ2vX2Smcrf4OoNWgwysTXMN TRYidE/dmTgZ2f6ozq/R5lnO2hsH+hiEdIMosaur3ja820VAjEKEActHPYZdtVeXnKgW /Njw== MIME-Version: 1.0 X-Received: by 10.112.42.44 with SMTP id k12mr7885757lbl.63.1372035074624; Sun, 23 Jun 2013 17:51:14 -0700 (PDT) Received: by 10.112.141.5 with HTTP; Sun, 23 Jun 2013 17:51:14 -0700 (PDT) In-Reply-To: <1371813553460-4046726.post@n3.nabble.com> References: <1371813553460-4046726.post@n3.nabble.com> Date: Mon, 24 Jun 2013 08:51:14 +0800 Message-ID: Subject: Re: HBase Filterlist hierarchy not working From: Ted Yu To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=001a113369743e13b204dfdbcfbb X-Virus-Checked: Checked by ClamAV on apache.org --001a113369743e13b204dfdbcfbb Content-Type: text/plain; charset=ISO-8859-1 Can you tell us which HBase version you are using ? Thanks On Fri, Jun 21, 2013 at 7:19 PM, sandesh wrote: > Hi, > > Filter List with multiple filters is not working for us. > > We have a table 'country_details' with family 'country' having columns > with > prefix 'AGE' and 'SALARY'. > > Data is inserted as shown below. > > We need to get following rows and columns based on filters > > 'SRILANKA' if 'AGE' prefix column has value >= 30 > OR 'INDIA' if 'AGE' prefix column has value >= 20 > OR 'JAPAN' if 'SALARY' prefix column has value >= 3000 > > We have wriiten following filter criteria for scan > > scan 'country_details', { FILTER => "( > ( RowFilter(=,'binary:SRILANKA') AND (ColumnPrefixFilter('AGE') AND > ValueFilter(>=,'binary:30')) ) > OR > ( RowFilter(=,'binary:INDIA') AND (ColumnPrefixFilter('AGE') AND > ValueFilter(>=,'binary:20')) ) > OR > ( RowFilter(=,'binary:JAPAN') AND (ColumnPrefixFilter('SALARY') AND > ValueFilter(>=,'binary:3000')) ) > )" } > > But we are not getting correct result (In Bold. i.e. "SRILANKA > column=country:AGE:123457, timestamp=1371811958816, value=*23* " ). Is it > something wrong with filters we have used or this kind of filters cannot be > used ? > > > > > create 'country_details', 'country' > > > put 'country_details','INDIA','country:AGE:123456','34'; > put 'country_details','INDIA','country:AGE:123451','32'; > put 'country_details','INDIA','country:AGE:123452','23'; > put 'country_details','INDIA','country:AGE:123453','24'; > put 'country_details','INDIA','country:AGE:123454','30'; > > put 'country_details','SRILANKA','country:AGE:123455','30'; > put 'country_details','SRILANKA','country:AGE:123457','23'; > put 'country_details','SRILANKA','country:AGE:123458','34'; > put 'country_details','SRILANKA','country:AGE:123459','18'; > put 'country_details','SRILANKA','country:AGE:123450','19'; > > put 'country_details','JAPAN','country:AGE:1234565','23'; > put 'country_details','JAPAN','country:AGE:1234557','25'; > put 'country_details','JAPAN','country:AGE:1234578','35'; > put 'country_details','JAPAN','country:AGE:1234559','37'; > put 'country_details','JAPAN','country:AGE:1234570','19'; > > put 'country_details','JAPAN','country:SALARY:1234565','8000'; > put 'country_details','JAPAN','country:SALARY:1234557','2300'; > put 'country_details','JAPAN','country:SALARY:1234578','3400'; > put 'country_details','JAPAN','country:SALARY:1234559','4500'; > put 'country_details','JAPAN','country:SALARY:1234570','1900'; > > hbase(main):075:0> scan 'country_details', { FILTER => "( ( > RowFilter(=,'binary:SRILANKA') AND (ColumnPrefixFilter('AGE') AND > ValueFilter(>=,'binary:30')) ) OR ( RowFilter(=,'binary:INDIA') AND > (ColumnPrefixFilter('AGE') AND ValueFilter(>=,'binary:20')) ) OR ( > RowFilter(=,'binary:JAPAN') AND (ColumnPrefixFilter('SALARY') AND > ValueFilter(>=,'binary:3000')) ) )" } > > ROW COLUMN+CELL > INDIA column=country:AGE:123451, > timestamp=1371811958805, value=32 > INDIA column=country:AGE:123452, > timestamp=1371811958808, value=23 > INDIA column=country:AGE:123453, > timestamp=1371811958810, value=24 > INDIA column=country:AGE:123454, > timestamp=1371811958812, value=30 > INDIA column=country:AGE:123456, > timestamp=1371811958801, value=34 > JAPAN column=country:SALARY:1234559, > timestamp=1371811958883, value=4500 > JAPAN column=country:SALARY:1234565, > timestamp=1371811958874, value=8000 > JAPAN column=country:SALARY:1234578, > timestamp=1371811958880, value=3400 > SRILANKA column=country:AGE:123455, > timestamp=1371811958814, value=30 > * SRILANKA column=country:AGE:123457, > timestamp=1371811958816, value=23 * > SRILANKA column=country:AGE:123458, > timestamp=1371811958818, value=34 > 3 row(s) in 0.0350 seconds > > > > -- > View this message in context: > http://apache-hbase.679495.n3.nabble.com/HBase-Filterlist-hierarchy-not-working-tp4046726.html > Sent from the HBase User mailing list archive at Nabble.com. > --001a113369743e13b204dfdbcfbb--