hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Biplob Biswas <revolutioni...@gmail.com>
Subject Re: Adding same row filter multiple times
Date Tue, 24 Jul 2018 09:02:10 GMT
Thanks, I checked both HBASE-19008 and HBASE-15410, and understood the
reasons why it was changed back to a list from a set.

For now, what I am doing to not bloat up my filterlist is to create sets
which store the row keys so that the duplicates are eliminated, and then
use the set result to populate the filterlist, which works but utilizes one
extra data structure.

HBASE-19008 - would be a step forward to have filtersets which will
eliminate the workaround I have now.


Thanks & Regards
Biplob Biswas


On Mon, Jul 23, 2018 at 5:05 PM Ted Yu <yuzhihong@gmail.com> wrote:

> I looked at Filter one more time this morning - it doesn't have method
> which returns the row in which the Filter is interested in.
>
> Since each of your RowFilter instances may be constructed from unique
> objects in memory (though they can be considered equal after byte wise
> comparison), we need more formal way of defining equality - which is
> required for implementing Set.
>
> In this regard, we should revisit HBASE-19008
> <https://issues.apache.org/jira/browse/HBASE-19008> first.
>
> FYI
>
> On Mon, Jul 23, 2018 at 7:10 AM Biplob Biswas <revolutionisme@gmail.com>
> wrote:
>
> > Thanks for the response, I indeed have MUST_PASS_ONE operator defined for
> > the filterlist, and my list passes and returns result as well. I just
> > wanted to know how duplicate filters are handled within filterlist, which
> > you already clarified by saying that it would bloat up the list.
> >
> > In this case, won't a filterset make more sense? Do you think creating a
> > bug(or a feature request) for this, makes sense?
> >
> > Thanks & Regards
> > Biplob Biswas
> >
> >
> > On Fri, Jul 20, 2018 at 6:31 PM Ted Yu <yuzhihong@gmail.com> wrote:
> >
> > > 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