Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
HBase >> mail # user >> Combining filters in the HBase shell


Copy link to this message
-
Re: Combining filters in the HBase shell
Hi Arvid,

Based on the shell help:
  hbase> scan 't1', {FILTER => "(PrefixFilter ('row2') AND (QualifierFilter
(>=, 'binary:xyz'))) AND (TimestampsFilter ( 123, 456))"}

Can you try without the ".new" when using multiple filters?

Other option, can you try to define you filters first and then reference
them on your scan?

JM
2013/11/7 Arvid Warnecke <[EMAIL PROTECTED]>

> Hello,
>
> I have some issues when I try to use filters in the shell.
> When I use only one filter everything is okay:
>
> scan 'rawdb', { COLUMNS => 'raw:a', FILTER => \
> SingleColumnValueFilter.new(Bytes.toBytes('raw'), Bytes.toBytes('a'), \
> CompareFilter::CompareOp.valueOf('EQUAL'),
> SubstringComparator.new('154442')), \
> LIMIT => 3 }
>
> But when I try to combine two filters like that:
>
> scan 'rawdb', { COLUMNS => 'raw:a', FILTER =>
> "(SingleColumnValueFilter.new(Bytes.toBytes('raw'), Bytes.toBytes('a'), \
> CompareFilter::CompareOp.valueOf('EQUAL'),
> SubstringComparator.new('154442')) \
> AND (SingleColumnValueFilter.new(Bytes.toBytes('raw'), Bytes.toBytes('u'),
> \
> CompareFilter::CompareOp.valueOf('EQUAL'),
> SubstringComparator.new('blafasel')))", \
> LIMIT => 3 }
>
> I get the following error:
> java.lang.IllegalArgumentException: Filter Name
> SingleColumnValueFilter.new not supported
>
> Can somebody tell me what I am doing wrong here?
>
> Best regards,
> Arvid
>
> --
> ThreePiO was right: Let the Wookiee win.
>