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

 

你可能感兴趣的:(HBase shell命令与 scan 过滤器)