hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 冯宏华 <fenghong...@xiaomi.com>
Subject 答复: Scanning not show the correct value of latest version
Date Wed, 12 Jun 2013 08:51:30 GMT
hi, Kyle

This is NOT a bug. There are three types of delete: Delete, DeleteColumn, DeleteFamily; Delete
is actually DeleteCell which can only mask(delete) a cell with exactly the SAME timestamp,
in your below case, "* Row1                                column=cf:c2, timestamp=1370935373545,
type=Delete" is a Delete (DeleteCell) so it can only mask(delete) " Row1   column=cf:c2, timestamp=1370935373545,
value=kk" since they have the same timestamps, but can't mask(delete) "Row1  column=cf:c2,
timestamp=1370935357741, value=h   *" since they have different timestamps

DeleteColumn can do what you expect: it can mask(delete) cells under the column with timestamps
less or equal to the timestamp of the DeleteColumn

--Honghua

________________________________________
发件人: Kyle Lin [kylelin2000@gmail.com]
发送时间: 2013年6月11日 16:58
收件人: user@hbase.apache.org
主题: Scanning not show the correct value of latest version

Hey Guys

    After I modifying a cell many times with delete action, The result of
scan is not correct.

    I Expect the value of "Row1 cf:c2" is null because I've delete the
cell(The line with blue color below). But I actually got "h"(The line with
green color below).

    Is this a hbase bug? Or my operating fault?

hbase(main):007:0> scan 'table42', {RAW => true, VERSIONS => 3}
ROW
COLUMN+CELL

 Row1                                column=cf:c1, timestamp=1370935357679,
value=e
* Row1                                column=cf:c2,
timestamp=1370935373545, type=Delete

 Row1                                column=cf:c2, timestamp=1370935373545,
value=kk
 Row1                                column=cf:c2, timestamp=1370935357741,
value=h   *
 Row2                                column=cf:c1, timestamp=1370935357804,
value=p
 Row2                                column=cf:c2, timestamp=1370935380939,
value=pp
 Row2                                column=cf:c2, timestamp=1370935373582,
value=jj
 Row2                                column=cf:c2, timestamp=1370935357774,
value=d
2 row(s) in 0.0220 seconds

hbase(main):008:0> scan 'table42'
ROW
COLUMN+CELL

 Row1                                column=cf:c1, timestamp=1370935357679,
value=e
* Row1                                column=cf:c2,
timestamp=1370935357741, value=h  *

 Row2                                column=cf:c1, timestamp=1370935357804,
value=p
 Row2                                column=cf:c2, timestamp=1370935380939,
value=pp
2 row(s) in 0.0200 seconds


*P.S. My HBase Version is 0.94.6*


Kyle
Mime
View raw message