ykisana opened a new pull request, #63:
URL: https://github.com/apache/flink-connector-hbase/pull/63

   ## Purpose of the change
   
   [FLINK-40908](https://issues.apache.org/jira/browse/FLINK-40908): 
`HBaseITCase.test` has read back 0 rows from the sink table since the HBase 
2.6.6 upgrade (FLINK-40133).
   
   The SQL connector jar bundles its own `hbase-default.xml` in place of the 
one from `hbase-common`. FLINK-40133 bumped `hbase2.version` but left that 
file's `hbase.defaults.for.version` at `2.6.4`. When the shaded HBase 2.6.6 
client builds its configuration it rejects the file, so the `INSERT` never runs:
   
   ```
   [ERROR] Could not execute SQL statement. Reason:
   java.lang.RuntimeException: hbase-default.xml file seems to be for an older 
version of HBase (2.6.4), this version is 2.6.6
   ```
   
   `sql-client.sh` still exits with 0, so the test goes on to scan an empty 
sink table and fails with `expected: <6> but was: <0>`.
   
   This affects users too, not only the test: the 4.0-SNAPSHOT SQL connector 
jar cannot create an HBase configuration at all.
   
   ## Brief change log
   
   - `hbase-default.xml`: set `hbase.defaults.for.version` to `2.6.6`, as 
FLINK-38722 did for 2.6.4.
   - `META-INF/NOTICE`: bundled `hbase-*` versions 2.6.4 → 2.6.6 and 
`hbase.thirdparty` 4.1.12 → 4.1.13, matching the shade plugin's `Including ...` 
output.
   - Added `HBaseDefaultConfigVersionTest`, which checks that the bundled 
file's version matches the HBase version on the classpath. A future bump that 
misses this file now fails in `flink-sql-connector-hbase-2.6` unit tests 
instead of as "0 rows" in the e2e test.
   
   ## Verifying this change
   
   - `HBaseDefaultConfigVersionTest` fails before the fix (`expected: "2.6.6" 
but was: "2.6.4"`) and passes after it.
   - Called the shaded `HBaseConfiguration.create()` with the e2e module's 
Hadoop classpath. The pre-fix jar throws the same `RuntimeException` as CI, and 
the fixed jar returns a configuration.
   - Ran `HBaseITCase` locally (Flink 1.20.3, JDK 17, Docker) with 
`HBaseContainer` temporarily pointed at archive.apache.org (see note below). It 
passes: 6 rows read back from the sink table.
   - `mvn verify -pl flink-sql-connector-hbase-2.6` passes (spotless, 
checkstyle, rat, tests).
   
   ## Impact and documentation
   
   Not applicable. No dependency, API, or behavior change beyond making the SQL 
connector jar usable with the HBase version it already ships.
   
   Note: CI will still fail in `HBaseITCase` until 
[FLINK-40907](https://issues.apache.org/jira/browse/FLINK-40907) is fixed. 
`HBaseContainer` downloads HBase 2.6.6 from dlcdn.apache.org, which now only 
has 2.6.7, so building the HBase image fails before the test reaches the sink.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated by: Claude Opus 5.5
   Fix written by and all code manually reviewed by @ykisana.
   Tests, PR description, and comments by Claude.
   


-- 
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]

Reply via email to