我想创建一个扫描器,它会给我带有 2 个前缀过滤器的结果
例如,我希望所有行的键以字符串“x”开头或以字符串“y”开头。
目前我知道只能通过以下方式使用一个前缀:
scan.setRowPrefixFilter(prefixFiltet)
最佳答案
在这种情况下,您不能使用 setRowPrefixFilter
API,您必须使用更通用的 setFilter
API,例如:
scan.setFilter(
new FilterList(
FilterList.Operator.MUST_PASS_ONE,
new PrefixFilter('xx'),
new PrefixFilter('yy')
)
);
关于java - 将多前缀行过滤器设置为扫描仪 hbase java,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39079949/