hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mike anderson <saidthero...@gmail.com>
Subject Re: ColumnValueFilter issue
Date Tue, 23 Jun 2009 15:32:16 GMT
So ColumnValueFilters are only used for comparing two columns against each
other? As opposed to comparing a column against a fixed value ('foo' in your
case)? If this is the case, what is the preferred method for accomplishing
the latter.

-Mike

On Fri, Jun 19, 2009 at 1:50 AM, schnitzi <mark.schnitzius@fastsearch.com>wrote:

>
> Isn't it always the way?  As soon as you post a question to a forum, you
> figure out the answer...
>
> For the benefit of future generations, the first 'columns' parameter to
> getScanner(...) needs to include the column you are comparing on, if you're
> using a ColumnValueFilter.  I thought you would only need to include the
> columns you were subsequently interested in seeing in the results.
>
> It would be nice to see an exception generated for this, instead of just no
> results...
>
>
>
> schnitzi wrote:
> >
> > I'm using HBase 0.19.3, and seeing some unusual behavior around
> > ColumnValueFilter.  When I do this...
> >
> >     Scanner scanner = myTable.getScanner(COLUMN1, startKey);
> >
> > ...I get three results.  But if I do...
> >
> >     Scanner scanner = myTable.getScanner(COLUMN1, startKey, new
> > ColumnValueFilter(COL1,
> >                 ColumnValueFilter.CompareOp.NOT_EQUAL,
> > Bytes.toBytes("foo")));
> >
> > ...I get no results, where I would expect three.  But even if I change
> > NOT_EQUAL to EQUAL....
> >
> >     Scanner scanner = myTable.getScanner(COLUMN1, startKey, new
> > ColumnValueFilter(COL1,
> >                 ColumnValueFilter.CompareOp.EQUAL,
> Bytes.toBytes("foo")));
> >
> > ...I get no results.  Is there something about ColumnValueFilter I'm not
> > understanding?  I would expect either EQUAL or NOT_EQUAL to return
> > *something*...
> >
> >
> > Thanks
> > Mark
> >
>
> --
> View this message in context:
> http://www.nabble.com/ColumnValueFilter-issue-tp24105833p24105876.html
> Sent from the HBase User mailing list archive at Nabble.com.
>
>

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