hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Marc Spaggiari <jean-m...@spaggiari.org>
Subject Re: Combining filters in the HBase shell
Date Thu, 07 Nov 2013 11:55:16 GMT
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 <arvid@nostalgix.org>

> 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.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message