简体   繁体   中英

HBase: How to get complete rows when scanning with filters by qualifier & value?

We need to scan an HBase table, searching for rows which have certain value on a column whose qualifier matches certain pattern.

We're 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)))

Which when executed in a Scan it matches exactly as we intend on the columns & values we are looking for, but the Scanner returns results containing just the matching columns/values and we need the full row with all columns.

We've tried a lot of combinations with SkipFilter (the only filter available from factory HBase which seems to affect a full row based on another filter) but couldn't find a correct answer.

Of course we could make a custom filter for our case but we are trying to avoid needing to push "deploy jar to all regionservers & restart hbase cluster" kind of instructions to production ops team.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM