I’m trying to use the HBase Java client to answer the following question as efficiently as possible:
For a given row and a given column family, which qualifiers have a certain prefix?
I’d likely use a QualifierFilter with a BinaryPrefixComparator. Would this work? My intuition is that it should be possible to do this without sending the corresponding cell contents of those columns, right? Would something like a KeyOnlyFilter work here?
Here’s what I got to work.
KeyOnlyFilterworks splendidly, as doesColumnPrefixFilter, which as far as I can tell is equivalent toQualifierFilterandBinaryPrefixComparator.Where
getSuccessor()is a function that merely adds a null byte to the end.