Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> HBase Filterlist hierarchy not working


Copy link to this message
-
Re: HBase Filterlist hierarchy not working
Can you tell us which HBase version you are using ?

Thanks

On Fri, Jun 21, 2013 at 7:19 PM, sandesh <[EMAIL PROTECTED]> 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,
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB