简体   繁体   中英

In HBase shell,how to scan the latest 5 data in a row?

My HBase table name is "recommend",I have inserted into 5 rows data.

Just like

put 'recommend','1','info:itemId',"1:1"
put 'recommend','1','info:itemId',"1:2"
put 'recommend','1','info:itemId',"1:3"
put 'recommend','1','info:itemId',"1:4" put 'recommend','1','info:itemId',"1:5"

When I use get 'recommend','1', {COLUMN => 'info:itemId', VERSIONS => 5} ,the result is not the latest 5 data from row 1 ! It's only one! Who can tell me what is problem or give me some tips? 在此处输入图片说明

I guess you can find right answer here . Probably you didn't specify versions number when created table. Default value is 1.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM