Details
Description
This new comparator is similar to the existing BinaryComparator, but only compares up to the length of the supplied byte array.
The use-case I need this for is secondary indexes. I build a table where the row keys have the form
{value}{row key}, where {value}is a fixed length byte array. On this index table I then would like to perform range scans on just the fixed length
{value}part. The BinaryPrefixComparator supplied in this patch enables exactly this, when used in combination with the RowFilter.
See also mail at
http://mail-archives.apache.org/mod_mbox/hadoop-hbase-user/201002.mbox/%3Cf5a74c8e1002100716y56371298xc96e482a6486d939@mail.gmail.com%3E