qq_31376151
2022-01-09 14:26
采纳率: 100%
浏览 23

hbase1.3.1 scan '表',{RAW=>TRUE,VERSION=>10}失效(只能获取一个版本)

在hbase使用shell,scan '表',{RAW=>TRUE,VERSION=>10},只返回了一个版本的数据,使用get指定时间戳却可以看到历史版本的数据

shell命令如下:

hbase(main):045:0* create 'student','info'
0 row(s) in 1.2480 seconds

=> Hbase::Table - student
hbase(main):046:0> describe 'student'
Table student is ENABLED
student
COLUMN FAMILIES DESCRIPTION
{NAME => 'info', BLOOMFILTER => 'ROW', VERSIONS => '1', IN_MEMORY => 'false', KEEP_DELETED_CELLS => 'FALSE', DATA_BLOCK_ENCODING => 'NONE', TTL => 'FOREVER', COMPRESSION => 'NONE', MIN_VER
SIONS => '0', BLOCKCACHE => 'true', BLOCKSIZE => '65536', REPLICATION_SCOPE => '0'}
1 row(s) in 0.0240 seconds

hbase(main):047:0> put 'student','1001','info:name','zhangsan'
0 row(s) in 0.0220 seconds

hbase(main):048:0> scan 'student',{RAW=>TRUE,VERSION=>10}
ROW COLUMN+CELL
1001 column=info:name, timestamp=1641709231020, value=zhangsan
1 row(s) in 0.0130 seconds

hbase(main):049:0> put 'student','1001','info:name','lisi'
0 row(s) in 0.0070 seconds

hbase(main):050:0> scan 'student',{RAW=>TRUE,VERSION=>10}
ROW COLUMN+CELL
1001 column=info:name, timestamp=1641709268374, value=lisi
1 row(s) in 0.0120 seconds

hbase(main):051:0> get 'student','1001',{COLUMN=>'info:name',TIMESTAMP=> 1641709231020}
COLUMN CELL
info:name timestamp=1641709231020, value=zhangsan
1 row(s) in 0.0070 seconds

不清楚为什么scan RAW=>TRUE,VERSION=>10为什么会失效,希望各位可以解答

1条回答 默认 最新

相关推荐 更多相似问题