Nandor Kollar has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24712
Change subject: IMPALA-13314: Cache HadoopCatalog instances and use holder pattern for singletons ...................................................................... IMPALA-13314: Cache HadoopCatalog instances and use holder pattern for singletons Previously, a new HadoopCatalog (and its FileIO/filesystem resources) was created on every table operation via getIcebergCatalog(). This caused excessive resource consumption when many Iceberg tables shared the same catalog location. Changes: - Introduce a Guava Cache (LRU, max 64 entries) in IcebergHadoopCatalog keyed by catalog location string. Tables sharing the same iceberg.catalog_location now reuse a single HadoopCatalog instance. - Add a removalListener that closes evicted HadoopCatalog instances, releasing FileIO and filesystem resources. - Replace synchronized lazy initialization with the initialization-on-demand holder idiom for IcebergHiveCatalog, IcebergHadoopTables, and IcebergCatalogUtil. The JVM guarantees thread-safe lazy initialization without synchronization overhead on every access. - Fix logger in IcebergHadoopCatalog (was incorrectly using IcebergHadoopTables.class). Testing: Ran existing Iceberg catalog tests. Change-Id: Ibb3a6c8e4f1d2a9e7c5b0f8d3e6a4c2b1d0e9f7a Assisted-by: Claude Opus 4.6 (Claude Code) --- M fe/src/main/java/org/apache/impala/catalog/iceberg/IcebergCatalogUtil.java M fe/src/main/java/org/apache/impala/catalog/iceberg/IcebergHadoopCatalog.java M fe/src/main/java/org/apache/impala/catalog/iceberg/IcebergHadoopTables.java M fe/src/main/java/org/apache/impala/catalog/iceberg/IcebergHiveCatalog.java M fe/src/main/java/org/apache/impala/util/IcebergUtil.java 5 files changed, 67 insertions(+), 39 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/12/24712/1 -- To view, visit http://gerrit.cloudera.org:8080/24712 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ibb3a6c8e4f1d2a9e7c5b0f8d3e6a4c2b1d0e9f7a Gerrit-Change-Number: 24712 Gerrit-PatchSet: 1 Gerrit-Owner: Nandor Kollar <[email protected]>
