the-other-tim-brown opened a new pull request, #1001:
URL: https://github.com/apache/incubator-xtable/pull/1001

   ## What
   
   The `xtable-hive-metastore` bundle shaded in transitive Hive dependencies 
that an HMS client never loads. Removing them takes out code and licensing that 
reviewers would otherwise have to check:
   
   | Removed | Why it was there | Who uses it |
   |---|---|---|
   | `groovy-all`, `ivy` | via `hive-exec` | only `CompileProcessor` (the 
`COMPILE` command) and `DependencyResolver` (`ADD JAR ivy://`) |
   | `hadoop-yarn-server-*` (plus `jersey-json` 1.19, `leveldbjni-all`, Jackson 
1.x) | via `hive-shims-0.23` | only `MiniSparkOnYARNCluster` and 
`FairSchedulerShim` |
   | `hadoop-yarn-registry` | via `hive-exec` | only LLAP's registry and 
`TezSessionState` |
   
   I found those users by scanning every Hive 3.1.3 jar's bytecode. Jackson 1.x 
is otherwise used only by `JsonSerDe`, replication messages, EXPLAIN JSON and 
HiveServer2 HTTP.
   
   Licensing effect:
   - `groovy-all` embeds relocated ANTLR 2, ASM and commons-cli. Their license 
texts (`antlr2-license.txt`, `asm-license.txt`, `jline2-license.txt`, 
`jsr223-license.txt`, `normalize-stylesheet-license.txt`) ended up in our 
`META-INF/licenses/`, but our LICENSE never mentioned them.
   - The YARN jars are 3.1.0 server classes shipped next to the user's Hadoop 
3.4.1, and they carried Hadoop's 607-line NOTICE.
   - Result: the bundle goes from 91 MB to 77 MB, its NOTICE from 1510 to 1187 
lines, and its non-Apache-2.0 dependencies from 11 to 9.
   
   `validate_bundled_license_texts.py` now fails on any text in 
`META-INF/licenses/` that is neither a curated `LICENSE-<artifactId>` nor 
listed in `EMBEDDED_TEXTS`. That is how the Groovy texts went unnoticed.
   
   ## Verification
   
   - Unit tests pass for xtable-hive-metastore (63) and the modules it builds 
on.
   - `validate_shaded_license_coverage.sh` and 
`validate_bundled_license_texts.py` pass. The new check flags the five Groovy 
texts in a bundle built from `main`.
   - **End to end against a real metastore.** I ran the bundled jar against 
`apache/hive:3.1.3` (`SERVICE_NAME=metastore`), with only Hadoop and the 
provided Hudi/Delta jars on the classpath and every jar that contains Hive, 
Groovy or Ivy classes removed. Through `HMSCatalogSyncClient`, 
`HMSCatalogPartitionSyncOperations` and `HMSCatalogConversionSource`, it 
covered:
     - create, `createOrReplaceTable`, `refreshTable` and drop of a Delta table;
     - partition add, list, update and drop;
     - table properties;
     - `getSourceTable`.
   
     With `-verbose:class`, no Groovy, Ivy, YARN server, registry, LLAP, Tez, 
ZooKeeper or Jackson 1.x class loads. The same flow passes on the trimmed 
bundle.
   
   ## Merge note
   
   This PR and the NOTICE-boilerplate PR both regenerate 
`xtable-hive-metastore/.../NOTICE-bundled`. Whichever merges second should 
rerun `generate_shaded_license_metadata.py` rather than hand-resolve the 
conflict.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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

  • [PR] [MINOR] Drop Groovy, Ivy... the-other-tim-brown (via GitHub) via commits

Reply via email to