CompareFilter

HBase Filter介绍及执行流程

懵懂的女人 提交于 2020-03-01 03:16:19
HBASE过滤器介绍: 所有的过滤器都在服务端生效,叫做谓语下推(predicate push down),这样可以保证被过滤掉的数据不会被传送到客户端。 注意: 基于字符串的比较器,如RegexStringComparator和SubstringComparator,比基于字节的比较器更慢,更消耗资源。因为每次比较时它们都需要将给定的值转化为String.截取字符串子串和正则式的处理也需要花费额外的时间。 过滤器本来的目的是为了筛掉无用的信息,所有基于CompareFilter的过滤处理过程是返回匹配的值。 Interface for row and column filters directly applied within the regionserver. A filter can expect the following call sequence: reset() : reset the filter state before filtering a new row. filterAllRemaining() : true means row scan is over; false means keep going. filterRowKey(byte[],int,int) : true means drop this row; false means include.