hbase使用过滤器查找 1000=<FLOW<=2000的不生效,是什么原因
Bytes.toBytes(Long.valueOf("1000")) 只支持string过滤,不支持数值类型?
[mw_shl_code=java,true]FilterList list = new FilterList(Operator.MUST_PASS_ALL);
list.addFilter(new SingleColumnValueFilter(Bytes.toBytes("F"), Bytes.toBytes("FLOW"),
CompareOp.GREATER_OR_EQUAL, Bytes.toBytes(Long.valueOf("1000"))));
list.addFilter(new SingleColumnValueFilter(Bytes.toBytes("F"), Bytes.toBytes("FLOW"),
CompareOp.LESS_OR_EQUAL, Bytes.toBytes(Long.valueOf("2000"))));
scan.setFilter(list);[/mw_shl_code]
|