【轉】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