- 论坛徽章:
- 0
|
本帖最后由 logicBaby 于 2015-09-22 20:46 编辑
Scan scan = new Scan(Bytes.toBytes(startRowKey), Bytes.toBytes(stopRowKey));
String rowRegex = String.format(".*\\|.*\\|%s\\|%s", serverRegex, channelRegex);
Filter filter = new RowFilter(CompareFilter.CompareOp.EQUAL, new RegexStringComparator(rowRegex));
scan.setFilter(filter);
添加了这个RowFilter后非常慢;如果没有这个RowFilter,我自己在代码里判断过滤反倒非常快;
为何?难道Filter不能和startRowKey/stopRowKey一起指定?还是指定了Filter后startRowKey/stopRowKey就不起作用了?成全表扫描了?
严重怀疑是HBase的bug,HBase版本 1.0.0+cdh5.4.5+175 …… |
|