jerryshao opened a new pull request, #14812: URL: https://github.com/apache/gravitino/pull/14812
### What changes were proposed in this pull request? - `KerberosAwareIcebergCatalogProxy` now creates its cglib proxy instance with Objenesis, so no constructor of the wrapped class (`IcebergCatalogWrapper` / `CatalogWrapperForREST` / `FederatedCatalogWrapper`) is run. The two `getProxy(...)` overloads are replaced by a single `getProxy()`. - Update both call sites: `IcebergCatalogWrapperManager.createCatalogWrapper` and `IcebergBackend.reload()`. - Add `org.objenesis:objenesis:3.3` (Apache-2.0, already resolved transitively via Mockito) to `iceberg-common`, and list it in `LICENSE.bin`. ### Why are the changes needed? `Enhancer.create(argClass, args)` ran the wrapper constructors again for the proxy instance. This created a second catalog and, for Kerberos-enabled Hive/JDBC backends, a second `KerberosClient` with its own TGT refresh thread. Every call and `close()` is delegated to the original target, so the proxy's own client was never used or closed, and its refresh thread leaked each time a catalog wrapper was created or evicted/reloaded. Fixes #12032 ### Does this PR introduce _any_ user-facing change? No. `KerberosAwareIcebergCatalogProxy.getProxy(...)` is an internal API. ### How was this patch tested? - Added `TestKerberosAwareIcebergCatalogProxy`, which checks that creating the proxy constructs the wrapper and catalog exactly once, that calls are delegated to the target's catalog under Kerberos, and that closing the proxy closes the target's catalog once. - Confirmed locally that 2 of the 3 tests fail against the old proxy implementation (2 constructions instead of 1) and pass with the fix. - `./gradlew :iceberg:iceberg-common:test -PskipITs` passes; `iceberg-rest-server` and `catalog-lakehouse-iceberg` compile. 🤖 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]
