[
https://issues.apache.org/jira/browse/HIVE-30277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HIVE-30277:
----------------------------------
Labels: performance pull-request-available (was: performance)
> Iceberg: cache table metadata files across queries in the Hive catalog's
> FileIO
> -------------------------------------------------------------------------------
>
> Key: HIVE-30277
> URL: https://issues.apache.org/jira/browse/HIVE-30277
> Project: Hive
> Issue Type: Improvement
> Components: Iceberg integration
> Reporter: Denys Kuzmenko
> Priority: Major
> Labels: performance, pull-request-available
>
> Iceberg can cache manifest lists and manifests (io.manifest.cache-enabled,
> io.manifest.cache.*, set as catalog properties, e.g.
> iceberg.catalog-default.io.manifest.cache-enabled=true for every catalog).
> Iceberg keeps that cache per FileIO instance (ManifestFiles.CONTENT_CACHES,
> weak keys). Hive never keeps one for long:
>
> - Catalogs.loadCatalog builds a new catalog, and with it a new FileIO, for
> every table it loads (HiveServer2 at compile time).
>
> - The Tez AM (split planning) and the LLAP tasks deserialize a new
> SerializableTable, its FileIO included, for every query.
>
>
>
>
> So the property never reuses anything across queries. Each query also
> re-reads its tables' metadata JSON and statistics files (the Puffin column
> statistics, partition statistics), which Iceberg does not cache at all.
>
>
>
> Trino caches all of these in a catalog-wide in-memory cache keyed by location
> (Iceberg files are immutable). It is on by default, with a 1 h TTL and an 8
> MB per-file limit. StarRocks keeps a process-wide content cache keyed by path
> in the FileIO its catalogs use.
>
>
>
>
>
> This change gives Hive's catalog the same: with the property set, its FileIO
> caches the table metadata files it reads once per process, in Iceberg's own
> ContentCache, keyed by location.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)