Zhi Tang created IMPALA-15831:
---------------------------------
Summary: Reduce catalogd memory and load time for large tables by
loading file metadata on coordinators
Key: IMPALA-15831
URL: https://issues.apache.org/jira/browse/IMPALA-15831
Project: IMPALA
Issue Type: Improvement
Components: Catalog, Frontend
Affects Versions: Impala 5.0.0
Reporter: Zhi Tang
catalogd caches a FileDescriptor (block locations, host index) per data file of
every
loaded HDFS table. For tables with millions of files this dominates catalogd's
memory
footprint and load time, yet file metadata is only consumed by coordinators
while
planning a query — catalogd itself never reads the descriptors. Iceberg REST
tables
already follow this split: catalogd holds table metadata, coordinators load the
files.
Proposal: opt-in table property
'impala.file.metadata.load.by.coordinator'='true'.
When set:
- catalogd loads and caches HMS metadata only, skipping file descriptors;
- coordinators fetch partitions with want_partition_files=false and list the
partition
directories themselves (FileMetadataLoader), discarding descriptors after
planning.
Since coordinators list the directories at query time, file-level metadata is
always
current. This sidesteps the staleness cases that metadata syncing cannot cover:
files
written directly into partition directories by external tools, or synced events
that
are lost or delayed.
Out of scope:
- ACID tables (require ValidTxnList filtering when listing);
- non-HDFS tables;
- coordinator-side caching. Trade-off to watch: per-query listing multiplies
LIST/getFileBlockLocations calls on the NameNode by the number of
coordinators.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)