Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hbase not condition in compound filter

Tags:

java

hbase

I want to build compound filter. I can do something like this

(filter1 and filter2) or filter3

Now I want to build the same filter, but with negative function

(**NOT** (filter1 and filter2)) or filter3

And I want to do it with java client api (org.apache.hadoop.hbase.client)

like image 964
Alexander Kazantsev Avatar asked Feb 20 '26 01:02

Alexander Kazantsev


1 Answers

You have to use FilterList to do this kind of condition.

FilterList Implementation of Filter that represents an ordered List of Filters which will be evaluated with a specified boolean operator FilterList.Operator.MUST_PASS_ALL (AND) or FilterList.Operator.MUST_PASS_ONE (OR).

AFAIK negation as shown above is not possible directly with FilterList. I'd suggest to use SOLR(May be Elastic search also) to do this. If you are using Cloudera Solr(Cloudera Search) is useful for this.

like image 167
Ram Ghadiyaram Avatar answered Feb 21 '26 15:02

Ram Ghadiyaram



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!