nameerror:未初始化常量筛选器

ocebsuys  于 2021-06-09  发布在  Hbase
关注(0)|答案(1)|浏览(421)

如何在hbase上配置筛选器?

hbase(main):005:0> scan 'List', {
   COLUMNS => 'Attributes:supplierPartNumber', 
   FILTER => "SingleColumnValueFilter.new(Bytes.toBytes('Attributes'), 
   Bytes.toBytes('supplierPartNumber'), 
   CompareFilter::CompareOp.valueOf('EQUAL'), 
   Bytes.toBytes('00980866000P'))"
}

nameerror:未初始化常量筛选器

xesrikrc

xesrikrc1#

首先导入所有这些过滤器包,然后使用filter命令。我想这对你有帮助

hbase(main):009:0> import org.apache.hadoop.hbase.util.Bytes;
    hbase(main):009:0> import org.apache.hadoop.hbase.filter.SingleColumnValueFilter;
    hbase(main):009:0> import org.apache.hadoop.hbase.filter.BinaryComparator;
    hbase(main):009:0> import org.apache.hadoop.hbase.filter.CompareFilter;
    hbase(main):009:0> import org.apache.hadoop.hbase.filter. Filter;

相关问题