官方定义
http://hbase.apache.org/apidocs/org/apache/hadoop/hbase/filter/BinaryPrefixComparator.html
BinaryPrefixComparator
A comparator which compares against a specified byte array, but only compares up to the length of this byte array. For the rest it is similar to BinaryComparator
.
假设待比较的字符串只有3位,BinaryPrefixComparator 只比较前3位的字符。
示例
假设数据表中有三行数据,行键分别为 tom tom0011 00tom11
BinaryComarator
按字典顺序排序, tom0011 大于 tom 所以查询 (>, 'binary:tom') 有如下结果