hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Ossowicki <...@vmn.dk>
Subject ValueFilter finding old versions of cells
Date Mon, 22 Jan 2018 22:57:20 GMT
Hi,

When doing a scan with a ValueFilter, I get an old cell value out,
even with VERSIONS => 1 set for the table.

hbase(main):003:0> create 't1', 'f1'
0 row(s) in 1.8020 seconds
hbase(main):005:0> put 't1', 'foo', 'f1:a', 'foo'
0 row(s) in 0.1260 seconds
hbase(main):006:0> put 't1', 'foo', 'f1:a', 'FOO'
0 row(s) in 0.0070 seconds
hbase(main):001:0> scan 't1'
ROW                                                   COLUMN+CELL
 foo                                                  column=f1:a,
timestamp=1516659855024, value=FOO
1 row(s) in 0.2260 seconds
hbase(main):002:0> scan 't1', { COLUMNS => 'f1:a', FILTER =>
"ValueFilter( =, 'binaryprefix:foo' )" }
ROW                                                   COLUMN+CELL
 foo                                                  column=f1:a,
timestamp=1516659851593, value=foo
1 row(s) in 0.0600 seconds
hbase(main):003:0> describe 't1'
Table t1 is ENABLED
t1
COLUMN FAMILIES DESCRIPTION
{NAME => 'f1', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY =>
'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'NONE',
TTL => 'FOREVER', COMPRESSION => 'NONE', MIN_VERSIONS => '0',
BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'}

This is on HBase 1.1.2 as shipped by HortonWorks.

My understanding is that this will happen as long as there hasn't been
a major compaction to clean up old cell versions.

I'm wondering if I'm missing an obvious way to get what I want (only
cells that would survive a major compaction), possibly one that would
just work when VERSIONS => 1, or if I'll just have to do the scan
without a valuefilter, and filter the data clientside.

-- 
Anders Ossowicki

Mime
View raw message