Skip to content

PHOENIX-7873: Incorporate HBASE-29974 filter seek hints (compat-2.6.6 module) [5.3]#2499

Open
shubham-roy wants to merge 5 commits into
apache:5.3from
shubham-roy:PHOENIX-7873-5.3
Open

PHOENIX-7873: Incorporate HBASE-29974 filter seek hints (compat-2.6.6 module) [5.3]#2499
shubham-roy wants to merge 5 commits into
apache:5.3from
shubham-roy:PHOENIX-7873-5.3

Conversation

@shubham-roy
Copy link
Copy Markdown

What changes were proposed in this pull request?

Backport of PHOENIX-7873 to the 5.3 branch. Incorporates the new HBase filter seek-hint methods — getSkipHint / getHintForRejectedRow, added to
Filter by HBASE-29974 and propagated through composite filters by
HBASE-30150 — into Phoenix's wrapper filters, so a wrapped delegate's seek hint is no longer
swallowed.

Identical to the master PR except for the new module pom's parent version (5.3.2-SNAPSHOT). Because these Filter methods exist only in HBase 2.6.6+,
this follows the PHOENIX-7731 precedent (commit 0d71499104) and adds a new version-gated compat module phoenix-hbase-compat-2.6.6 (a copy of
phoenix-hbase-compat-2.6.4) where the gated @Overrides live. Older compat modules are untouched.

  • New module phoenix-hbase-compat-2.6.6 — verbatim copy of 2.6.4, plus the two seek-hint forwarding overrides:
    • CompatDelegateFilter — unconditional forwarding to the delegate.
    • CompatPagingFilter — null-guarded forwarding (falls back to super when there is no delegate).
  • DelegateFilter re-parented from FilterBase to CompatDelegateFilter, so it and its subclasses (AllVersionsIndexRebuildFilter,
    UnverifiedRowFilter) inherit the forwarding. PagingFilter already extends CompatPagingFilter (unchanged).
  • Build wiring (root pom.xml): new module in <modules>; hbase-2.6.5.runtime.version split out; the 2.6 family profile repointed to the 2.6.6
    module; a new pinned hbase.profile=2.6.5 profile for the displaced 2.6.5 line; 5 dependencyManagement entries; enforcer beanshell clause; assembly
    coverage dependency.

Class hierarchy after this change:

FilterBase (HBase)
  └─ CompatDelegateFilter   (phoenix-hbase-compat-2.6.6: forwards getSkipHint/getHintForRejectedRow)
       └─ DelegateFilter    (phoenix-core-client)
            ├─ AllVersionsIndexRebuildFilter
            └─ UnverifiedRowFilter

FilterBase (HBase)
  └─ CompatPagingFilter     (phoenix-hbase-compat-2.6.6: null-guarded forwarding)
       └─ PagingFilter       (phoenix-core-client)

⚠️ Draft — blocked on HBase 2.6.6 GA. HBase 2.6.6 is not yet GA on Maven Central (the JIRAs are merged and present in tag 2.6.6RC0, but no
2.6.6-hadoop3 artifact is published). This branch pins 2.6.6-SNAPSHOT, which only resolves against a locally-installed HBase build. Two
2.6.6-SNAPSHOT markers (root pom.xml <hbase-2.6.runtime.version> and phoenix-hbase-compat-2.6.6/pom.xml <hbase26.compat.version>, both carrying
TODO(PHOENIX-7873) comments) must flip to 2.6.6-hadoop3 at GA before merge.

Why are the changes needed?

HBASE-29974 lets a Filter return a seek hint when it skips/rejects a row so the scanner can jump ahead instead of scanning cell-by-cell, and HBASE-30150
makes composite filters propagate that hint. Phoenix's wrapper filters (DelegateFilter, PagingFilter) extend FilterBase, whose default
implementations of these methods return no hint. As a result, when one of these wrappers wraps a delegate that does produce a seek hint, the hint is
swallowed and the scan loses the skip optimization. Forwarding the hint from the delegate restores that optimization for wrapped filters on HBase 2.6.6+.

Does this PR introduce any user-facing change?

No functional/result change. This is a scan-performance behavior change that only takes effect on HBase 2.6.6+: wrapped delegate filters can now
contribute seek hints instead of having them swallowed. Query results are unchanged; only how efficiently the scanner skips rows/cells differs. Against
all currently released Phoenix/HBase versions there is no observable change, since the methods do not exist before HBase 2.6.6.

How was this patch tested?

Verified locally (JDK 8) against a locally-installed HBase 2.6.6-SNAPSHOT, on the 5.3 branch:

  • -Dhbase.profile=2.6 buildphoenix-hbase-compat-2.6.6 + phoenix-core-client + phoenix-core compile; new forwarding unit tests pass
    (CompatDelegateFilterTest, CompatPagingFilterTest) plus the structural test.
  • Default profile (HBase 2.5.x) build — no regression; the profile-safe structural test (DelegateFilterStructureTest, instanceof-only) compiles
    and passes where the new Filter methods are absent, proving the version gating.
  • Pinned -Dhbase.profile=2.6.5 build — the displaced 2.6.4 module still compiles against 2.6.5-hadoop3; enforcer passes.
  • Spotless clean on all changed files.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Anthropic Claude Opus 4.8)

Shubham Roy and others added 5 commits June 8, 2026 15:57
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…epMgmt, enforcer, assembly)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…at filters

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nherit hint forwarding

DelegateFilter now extends CompatDelegateFilter (removing its own shadowing
delegate field) so that the version-gated getSkipHint / getHintForRejectedRow
forwarding added in the 2.6.6 compat module is inherited by DelegateFilter and
its subclasses (AllVersionsIndexRebuildFilter, UnverifiedRowFilter).

A structural-only test (DelegateFilterStructureTest) is added in phoenix-core,
alongside the existing filter tests; it asserts the inheritance wiring without
referencing the new Filter methods, so it compiles under every hbase.profile.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Expand the two TODO(PHOENIX-7873) markers into step-by-step instructions for
the GA cutover (flip both 2.6.6-SNAPSHOT values to 2.6.6-hadoop3 in lockstep,
remove the comments), and cross-reference each marker to the other so neither
is missed. No functional change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant