Alexander Kazantsev
Alexander Kazantsev

Reputation: 340

Hbase not condition in compound filter

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)

Upvotes: 3

Views: 554

Answers (1)

Ram Ghadiyaram
Ram Ghadiyaram

Reputation: 29195

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.

Upvotes: 1

Related Questions