You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Sreeram <sr...@gmail.com> on 2017/04/20 07:34:37 UTC

ValueFilter returning earlier values

Hi,

 When I scan with ValueFilter on a column, I see that it returns older
versions too if they happen to match the value in the ValueFilter.

The table column family has the property VERSIONS set to 1. I had set
setMaxVersions to 1 in the scan object.

I was expecting the value filter to return only the latest values for
the column, provided they match the filter.

Is this the expected behaviour of ValueFilter? Any suggestions if I
must be setting any options to skip the older values from coming in
the result?

Thank you

Regards,
Sreeram

Re: ValueFilter returning earlier values

Posted by Robert Yokota <ra...@gmail.com>.
I ran into this issue as well:
https://yokota.blog/2016/10/20/tips-on-writing-custom-hbase-filters/

Regards,
Robert

On Thu, Apr 20, 2017 at 10:24 AM, Ted Yu <yu...@gmail.com> wrote:

> The JIRA number is HBASE-17125
>
> On Thu, Apr 20, 2017 at 6:40 AM, Anoop John <an...@gmail.com> wrote:
>
> > This is because of the way with which filters and versions are checked
> > in RS.  We first do filter op and then apply version. The value filter
> > might have filtered out latest cell but it is applied and succeed on
> > older version and then only the version count begin..  There is an
> > open issue in HBase jira which aims at solving this unexpected
> > behavior.
> >
> > -Anoop-
> >
> > On Thu, Apr 20, 2017 at 1:04 PM, Sreeram <sr...@gmail.com> wrote:
> > > Hi,
> > >
> > >  When I scan with ValueFilter on a column, I see that it returns older
> > > versions too if they happen to match the value in the ValueFilter.
> > >
> > > The table column family has the property VERSIONS set to 1. I had set
> > > setMaxVersions to 1 in the scan object.
> > >
> > > I was expecting the value filter to return only the latest values for
> > > the column, provided they match the filter.
> > >
> > > Is this the expected behaviour of ValueFilter? Any suggestions if I
> > > must be setting any options to skip the older values from coming in
> > > the result?
> > >
> > > Thank you
> > >
> > > Regards,
> > > Sreeram
> >
>

Re: ValueFilter returning earlier values

Posted by Ted Yu <yu...@gmail.com>.
The JIRA number is HBASE-17125

On Thu, Apr 20, 2017 at 6:40 AM, Anoop John <an...@gmail.com> wrote:

> This is because of the way with which filters and versions are checked
> in RS.  We first do filter op and then apply version. The value filter
> might have filtered out latest cell but it is applied and succeed on
> older version and then only the version count begin..  There is an
> open issue in HBase jira which aims at solving this unexpected
> behavior.
>
> -Anoop-
>
> On Thu, Apr 20, 2017 at 1:04 PM, Sreeram <sr...@gmail.com> wrote:
> > Hi,
> >
> >  When I scan with ValueFilter on a column, I see that it returns older
> > versions too if they happen to match the value in the ValueFilter.
> >
> > The table column family has the property VERSIONS set to 1. I had set
> > setMaxVersions to 1 in the scan object.
> >
> > I was expecting the value filter to return only the latest values for
> > the column, provided they match the filter.
> >
> > Is this the expected behaviour of ValueFilter? Any suggestions if I
> > must be setting any options to skip the older values from coming in
> > the result?
> >
> > Thank you
> >
> > Regards,
> > Sreeram
>

Re: ValueFilter returning earlier values

Posted by Anoop John <an...@gmail.com>.
This is because of the way with which filters and versions are checked
in RS.  We first do filter op and then apply version. The value filter
might have filtered out latest cell but it is applied and succeed on
older version and then only the version count begin..  There is an
open issue in HBase jira which aims at solving this unexpected
behavior.

-Anoop-

On Thu, Apr 20, 2017 at 1:04 PM, Sreeram <sr...@gmail.com> wrote:
> Hi,
>
>  When I scan with ValueFilter on a column, I see that it returns older
> versions too if they happen to match the value in the ValueFilter.
>
> The table column family has the property VERSIONS set to 1. I had set
> setMaxVersions to 1 in the scan object.
>
> I was expecting the value filter to return only the latest values for
> the column, provided they match the filter.
>
> Is this the expected behaviour of ValueFilter? Any suggestions if I
> must be setting any options to skip the older values from coming in
> the result?
>
> Thank you
>
> Regards,
> Sreeram