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
[email protected]

Reply via email to