shubham-roy opened a new pull request, #2499:
URL: https://github.com/apache/phoenix/pull/2499
### 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](https://issues.apache.org/jira/browse/HBASE-29974) and propagated
through composite filters by
[HBASE-30150](https://issues.apache.org/jira/browse/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 `@Override`s 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` build** — `phoenix-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)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]