在工做中,有时候只是想简单看下HBase表某些关键指标的值,这个时候总不能现写Java代码去查看,如下几个小技巧你可能会常常用到。微信
hbase> get 't1', 'r1', ['f:c1', 'f:c2', 'f:c3']
hbase> get 't1', 'r1', {COLUMN => 'f:c1', VERSIONS => 4}
hbase> put 't1','r1','f:c1','中国' hbase> get 't1','r1','f:c1:toString' COLUMN CELL f:c1 timestamp=1585635275771, value=中国 1 row(s) in 0.0180 seconds
对于Int型、Long型数值,支持toInt|toLong语法。spa
使用列族过滤器: 1. 精确匹配列族 hbase> get 't1,'r1',FILTER=>"FamilyFilter(=,'binary:f')" 2. 模糊匹配列族 hbase> get 't1,'r1',FILTER=>"FamilyFilter(=,'substring:f')"
hbase> get 't1','r1',FILTER=>"ColumnPrefixFilter('c')"
不经常使用的语法再也不论述。code
转载请注明出处!欢迎关注本人微信公众号【HBase工做笔记】