Database Reference
In-Depth Information
hbase> scan 'my_table', {STARTROW => '000600', STOPROW
=>'000800'}
ROW COLUMN+CELL
000600 column=cf1:cq2, timestamp=1393866792008,
value=data5
000700 column=cf1:cq1, timestamp=1393866105687,
value=data1
000700 column=cf1:cq2, timestamp=1393866122073,
value=data2
000700 column=cf2:cq3, timestamp=1393866431669,
value=data4
2 row(s) in 0.0400 seconds
The next operation deletes the oldest entry for column cf2:cq3 for row 000700
by specifying the timestamp.
hbase> delete 'my_table', '000700', 'cf2:cq3', 1393866138714
0 row(s) in 0.0110 seconds
Repeating the earlier get operation to obtain both versions only provides the last
version for that cell. After all, the older version was deleted.
hbase> get 'my_table', '000700', {COLUMN => 'cf2:cq3',
VERSIONS => 2}
COLUMN CELL
cf2:cq3 timestamp=1393866431669, value=data4
1 row(s) in 0.0130 seconds
However, running a scan operation, with the RAW option set to true , reveals that
the deleted entry actually remains. The highlighted line illustrates the creation of a
tombstone marker, which informs the default get and scan operations to ignore
all older cell versions of the particular row and column.
hbase> scan 'my_table', {RAW => true, VERSIONS => 2,
STARTROW => '000700'}
ROW COLUMN+CELL
000700 column=cf1:cq1, timestamp=1393866105687,
Search WWH ::




Custom Search