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: scan filter: how to ignore everything with a prefix except one particular column with that prefix
Date Thu, 05 Jun 2014 19:59:30 GMT
Can you use a FilterList? And say "*MUST_PASS_ONE*"?

JM


2014-06-05 15:52 GMT-04:00 Vrushali C <vrushali@ymail.com>:

>
>
> Hi
> Is there a way to do this kind of filtering : In my scan, I want to
> retrieve all columns except for columns starting with a certain prefix. But
> within that set of columns being ignored, I have one known column name that
> I want to retrieve but ignore the rest. The reason is that columns with
> this prefix have a lot of data and I am not interested in everything EXCEPT
> one of those.
>
> So for ignoring the columns with a certain prefix in the scan, I am doing
> something like
> filters.addFilter(
>      new QualifierFilter(CompareFilter.CompareOp.NOT_EQUAL,
>         new BinaryPrefixComparator(
>                 Bytes.add(Bytes.toBytes("c!"), Constants.SEP_BYTES))))
>
> Which works. But what I also want to add, is something like this
>
> filters.addFilter(
>      new QualifierFilter(CompareFilter.CompareOp.EQUAL,
>         new BinaryPrefixComparator(
>                 Bytes.add(Bytes.toBytes("c!someName"),
> Constants.SEP_BYTES))))
>
> I realize both filters are contradictory to each other, so how do I
> achieve this?
>
> thanks
> Vrushali
>

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