【转】HBase shell命令与 scan 过滤器


 

Hbase 常用shell命令 https://www.cnblogs.com/i80386/p/4105423.html

 

HBase基础之常用过滤器hbase shell操作 https://www.cnblogs.com/luogankun/p/3939712.html

 

Row key filter:

hbase(main):003:0> import org.apache.hadoop.hbase.filter.CompareFilter
hbase(main):005:0> import org.apache.hadoop.hbase.filter.SubstringComparator
hbase(main):006:0> scan 'test', {FILTER => org.apache.hadoop.hbase.filter.RowFilter.new(CompareFilter::CompareOp.valueOf('EQUAL'),SubstringComparator.new("word_by_which_you_want_to_search"))}

scan 'test', {FILTER => "(ValueFilter(=, 'substring:ABCD'))"}

 

Hbase copy table to a new one:

# Firstly need to create the new table "tbl_abc_new" in hbase shell

hbase org.apache.hadoop.hbase.mapreduce.CopyTable --startrow=20190813 --new.name=tbl_abc_new tbl_abc

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM