Hi,

We use hbase-0.94.7


On Mon, Jun 24, 2013 at 6:22 AM, Ted Yu-3 [via Apache HBase] <
[email protected]> wrote:

> Can you tell us which HBase version you are using ?
>
> Thanks
>
> On Fri, Jun 21, 2013 at 7:19 PM, sandesh <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=4046857&i=0>>
> 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.
> >
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-hbase.679495.n3.nabble.com/HBase-Filterlist-hierarchy-not-working-tp4046726p4046857.html
>  To unsubscribe from HBase Filterlist hierarchy not working, click 
> here<http://apache-hbase.679495.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4046726&code=c2FuZGVzaHBhaUBnbWFpbC5jb218NDA0NjcyNnwxNjk2ODE5Mjcz>
> .
> NAML<http://apache-hbase.679495.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://apache-hbase.679495.n3.nabble.com/HBase-Filterlist-hierarchy-not-working-tp4046726p4046862.html
Sent from the HBase User mailing list archive at Nabble.com.

Reply via email to