0
点赞
收藏
分享

微信扫一扫

hbase filter练习

认真的老去 2023-04-25 阅读 68


1,命令例子

scan 'scorse', {FILTER => "(PrefixFilter ('joeyon:'))"}
scan 'scorse', {FILTER => "(FirstKeyOnlyFilter ())"}
scan 'scorse',{FILTER=>"(PrefixFilter('joeyon')) AND (SingleColumnValueFilter('course','math',=,'regexstring:97',true,true))



2,测试数据

hbase(main):068:0> scan 'scorse'
ROW                                  COLUMN+CELL                                                                                             
 joeyon                              column=course:math, timestamp=1416821469350, value=97                                                   
 joeyon                              column=grad:, timestamp=1416821398138, value=5                                                          
 joeyon3                             column=course:pc, timestamp=1416877739159, value=100                                                    
 joeyon5                             column=course:math, timestamp=1416823873826, value=97                                                   
 joeyon5                             column=course:yuwen, timestamp=1416877396829, value=87                                                  
 joeyon:1                            column=course:math, timestamp=1416822508961, value=97                                                   
 joeyon:2                            column=course:math, timestamp=1416822514683, value=97                                                   
 joeyon:3                            column=course:math, timestamp=1416822518762, value=97                                                   
 joeyon:4                            column=course:math, timestamp=1416822523256, value=97                                                   
 joeyon:5                            column=course:math, timestamp=1416822528175, value=97                                                   
 xmm                                 column=course:english, timestamp=1416821567570, value=100                                               
 xmm                                 column=grad:, timestamp=1416821715259, value=1                                                          
 xyy                                 column=course:english, timestamp=1416821623967, value=100                                               
 xyy                                 column=grad:, timestamp=1416821725323, value=2                                                          
10 row(s) in 0.0420 seconds




举报

相关推荐

0 条评论