hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clint Morgan <clint.mor...@troove.net>
Subject Re: hbase.filter.ColumnValueFilter CompareOp EQUAL/NOT_EQUAL
Date Wed, 13 May 2009 21:28:43 GMT
That was a bug introduced in 0.19.2. Has since been fixed. (
https://issues.apache.org/jira/browse/HBASE-1264)

Your expectations are correct; the behavior you describe is not...

-clint

On Wed, May 13, 2009 at 2:13 PM, Sasha Dolgy <sasha.dolgy@gmail.com> wrote:

> Hi there, i'm a little confused, maybe I missed the plot somewhere
>
> Very simple table defined:
>
> hbase(main):028:0> describe 'foo'
> {NAME => 'foo', IS_ROOT => 'false', IS_META => 'false', FAMILIES => [{NAME
> => 'entry', BLOOMFILTER => 'false',
>  COMPRESSION => 'NONE', VERSIONS => '3', LENGTH => '2147483647', TTL =>
> '-1', IN_MEMORY => 'false', BLOCKCACHE
>  => 'false'}], INDEXES => [ID => A]}
>
> Two rows in the table:
>
> hbase(main):031:0> scan 'foo'
> ROW                          COLUMN+CELL
>  myNewRow                    column=entry:a, timestamp=1242248892949,
> value=scuba
>  myRow                       column=entry:a, timestamp=1242248888885,
> value=barf
> 2 row(s) in 0.0855 seconds
>
>
> java query:
>
> String tableName = "foo";
> String filterName = "entry:a";
> String filterVal = "barf";
> String[] searchString = { "entry:a" };
>
> RowFilterInterface filter = new
> ColumnValueFilter(Bytes.toBytes(filterName),
> ColumnValueFilter.CompareOp.EQUAL, Bytes.toBytes(filterVal));
> Scanner search = hbaseTableName.getScanner(searchString, "",
> Long.MAX_VALUE,
> filter);
>
> When I go through the results of the scanner,
> if org.apache.hadoop.hbase.filter.ColumnValueFilter.CompareOp.EQUAL then it
> returns the row with "scuba".  If I change it to NOT_EQUAL it returns the
> row with "barf".
>
> Is this the expected behaviour?
>
> --
> Sasha Dolgy
> sasha.dolgy@gmail.com
>

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