Hi All,
The following is a session in hbase shell.
You can see that VERSIONS = 1, yet even after a triggering a major compaction I
can still retrieve version 2, 3, and 4, when querying by timestamp, even after
I triggered a major compaction.
Does "major_compact" from the shell not trigger a major compaction?
Or does it just not do anything because there's only one small file to begin
with?
(HBase version is 0.90.3-cdh3u1 and it was running in local mode, in case that
makes a difference).
I apologize in advance if this is documented somewhere already.
Thanks.
-- Lars
--------------
hbase(main):003:0> describe 'test'
DESCRIPTION ENABLED
{NAME => 'test', FAMILIES => [{NAME => 'cf', BLOOMF true
ILTER => 'NONE', REPLICATION_SCOPE => '0', COMPRESS
ION => 'NONE', VERSIONS => '1', TTL => '2147483647'
, BLOCKSIZE => '65536', IN_MEMORY => 'false', BLOCK
CACHE => 'true'}]}
1 row(s) in 0.0270 seconds
hbase(main):004:0> scan 'test'
ROW COLUMN+CELL
0 row(s) in 0.1260 seconds
hbase(main):005:0> put 'test', 'r1', 'cf:x', 'val1'
0 row(s) in 0.0450 seconds
hbase(main):006:0> put 'test', 'r1', 'cf:x', 'val2'
0 row(s) in 0.0130 seconds
hbase(main):007:0> put 'test', 'r1', 'cf:x', 'val3'
0 row(s) in 0.0160 seconds
hbase(main):008:0> put 'test', 'r1', 'cf:x', 'val4'
0 row(s) in 0.0120 seconds
hbase(main):009:0> scan 'test'
ROW COLUMN+CELL
r1 column=cf:x, timestamp=1313360551865, value=val4
1 row(s) in 0.0380 seconds
hbase(main):010:0> scan 'test', {TIMERANGE => [0, 1313360551865]}
ROW COLUMN+CELL
r1 column=cf:x, timestamp=1313360550493, value=val3
1 row(s) in 0.0310 seconds
hbase(main):011:0> scan 'test', {TIMERANGE => [0, 1313360550493]}
ROW COLUMN+CELL
r1 column=cf:x, timestamp=1313360549220, value=val2
1 row(s) in 0.0310 seconds
hbase(main):012:0> scan 'test', {TIMERANGE => [0, 1313360549220]}
ROW COLUMN+CELL
r1 column=cf:x, timestamp=1313360545784, value=val1
1 row(s) in 0.0190 seconds
hbase(main):013:0> major_compact 'test'
0 row(s) in 0.0670 seconds
hbase(main):014:0> scan 'test', {TIMERANGE => [0, 1313360549220]}
ROW COLUMN+CELL
r1 column=cf:x, timestamp=1313360545784, value=val1
1 row(s) in 0.0230 seconds
hbase(main):015:0> major_compact 'test'
0 row(s) in 0.0450 seconds
hbase(main):016:0> scan 'test', {TIMERANGE => [0, 1313360549220]}
ROW COLUMN+CELL
r1 column=cf:x, timestamp=1313360545784, value=val1
1 row(s) in 0.0300 seconds