如何在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:未初始化的常量FILTER
答案 0 :(得分:0)
首先导入所有这些过滤器包然后找到他过滤命令。我想这会对你有帮助
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;