hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: Adding same row filter multiple times
Date Fri, 20 Jul 2018 16:31:04 GMT
Assuming your filter list uses MUST_PASS_ONE operator, the recurring key
would pass one of these RowFilter's. So the filter list would pass.

However, depending on the actual number of repetitions for a given key,
your filter list would be bloated.
You can use ByteArrayComparable#getValue() to determine if the key you want
to check is already specified by any of the existing filters in the filter
list.

Cheers

On Fri, Jul 20, 2018 at 8:46 AM Biplob Biswas <revolutionisme@gmail.com>
wrote:

> For example,
>
> I have an iterative process which generates the key and inserts the key as
> a RowFilter in a  filter list.
>
> For example:
>
> for(String k:keys){
>      filterlist.addfilter(new RowFilter(EQ, BinaryComparator(k)))
> }
>
> Now if the list "keys" has same keys multiple times, we are adding the same
> RowFilter to the FilterList multiple times. What is HBase doing in that
> circumstance
>
> Thanks & Regards
> Biplob Biswas
>
>
> On Fri, Jul 20, 2018 at 4:12 PM Ted Yu <yuzhihong@gmail.com> wrote:
>
> > Did you mean chaining the same row filter 'n' times using FilterList ?
> > Is the row filter from hbase (RowFilter) ?
> > What operator do you use (MUST_PASS_ALL or MUST_PASS_ONE) ?
> >
> > For second question, I wonder how filter set would handle the constituent
> > filters differently from how FilterList handles them.
> > Maybe by 'Set' you mean when any one of the constituent filters passes,
> the
> > row is returned ?
> >
> > Cheers
> >
> > On Fri, Jul 20, 2018 at 4:45 AM Biplob Biswas <revolutionisme@gmail.com>
> > wrote:
> >
> > > What happens if I insert the same row filter 'n' times? Would the table
> > be
> > > queried n times with the same row key?
> > >
> > > Why is it that there is a filterList and not a filterSet?
> > >
> > > Thanks & Regards
> > > Biplob Biswas
> > >
> >
>

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