Java – HBase: How do I get complete rows when scanning with filters with qualifiers and values?

HBase: How do I get complete rows when scanning with filters with qualifiers and values?… here is a solution to the problem.

HBase: How do I get complete rows when scanning with filters with qualifiers and values?

We need to scan an HBase table to search for rows with specific values on columns whose qualifiers match a specific pattern.

We are setting up a filter like this:

new FilterList(MUST_PASS_ALL,
    new FamilyFilter(EQUAL, new BinaryComparator(bytes(someFamily))),
    new QualifierFilter(EQUAL, new RegexStringComparator(qualifierRegex)),
    new ValueFilter(EQUAL, new SubstringComparator(detailValue)))

When executed in Scan, it exactly matches the columns and values we want, but the result returned by Scanner contains only matching columns/values, whereas we need to contain the entire row of all columns.

We’ve tried a lot of combinations with SkipFilter (the only filter available in factory HBase, it seems to affect an entire row based on another filter) but can’t find the right answer.

Sure, we

can make custom filters for our cases, but we’re trying to avoid pushing instructions like “deploy the jar to all regional servers and restart the hbase cluster” to the production operations team.

Solution

Related Problems and Solutions