1.导入需要的类
import org.apache.hadoop.hbase.filter.CompareFilter
import org.apache.hadoop.hbase.filter.SingleColumnValueFilter
import org.apache.hadoop.hbase.filter.SubstringComparator
import org.apache.hadoop.hbase.util.Bytes
2.执行命令
scan ‘tablename’,STARTROW=>’start’,COLUMNS=>[‘family:qualifier’],FILTER=>SingleColumnValueFilter.new(Bytes.toBytes(‘family’),Bytes.toBytes(‘qualifier’),CompareFilter::CompareOp.valueOf(‘EQUAL’),SubstringComparator.new(‘value’)),LIMIT=>1
- 点赞
- 收藏
- 分享
-
- 文章举报
原文始发于:hbase shell应用filter
主题测试文章,只做测试使用。发布者:sys234,转转请注明出处:http://www.cxybcw.com/49051.html