ttttttz has uploaded this change for review. ( https://gerrit.cloudera.org/25557


Change subject: IMPALA-15831: Load file metadata of HDFS tables on coordinators 
on demand Add an opt-in table property 
'impala.file.metadata.load.by.coordinator'='true'. When set, and when 
--use_local_catalog is enabled: - catalogd loads and caches HMS metadata only, 
ski
......................................................................

IMPALA-15831: Load file metadata of HDFS tables on coordinators on demand
Add an opt-in table property 'impala.file.metadata.load.by.coordinator'='true'.
When set, and when --use_local_catalog is enabled:
- catalogd loads and caches HMS metadata only, skipping file descriptors;
- coordinators fetch partitions with want_partition_files=false and list the
  directories of the queried partitions themselves in parallel
  (ParallelFileMetadataLoader), discarding the descriptors after planning.
This reduces catalogd memory and load time for large tables: file metadata is
only consumed by coordinators while planning a query, yet catalogd caches a
FileDescriptor (block locations, host index) per data file and loads the
complete file list of all partitions before the table becomes queryable,
repeating the full load after every restart or INVALIDATE METADATA. Iceberg
REST tables already follow this split: catalogd holds table metadata,
coordinators load the files.
Files dropped into partition directories by external tools also become visible
without REFRESH.
Transactional (ACID) and non-HDFS tables are rejected at DDL time. Trade-off
to watch: per-query listing multiplies LIST/getFileBlockLocations calls on the
NameNode by the number of coordinators.
The /catalog web page shows the tables using this mode on both catalogd and
coordinators, and /table_metrics exposes a per-table gauge.
Testing:
- TODO before push: e2e coverage for create/query/external-file-visibility.

Change-Id: Iff48b8c3ec783097dca03fcc25ccde5dae288bf1
---
M be/src/catalog/catalog-server.cc
M be/src/catalog/catalog-server.h
M be/src/catalog/catalog.cc
M be/src/catalog/catalog.h
M be/src/service/frontend.cc
M be/src/service/frontend.h
M be/src/service/impala-http-handler.cc
M common/thrift/JniCatalog.thrift
M fe/src/main/java/org/apache/impala/catalog/CatalogServiceCatalog.java
M fe/src/main/java/org/apache/impala/catalog/FeFsTable.java
M fe/src/main/java/org/apache/impala/catalog/FileMetadataLoader.java
M fe/src/main/java/org/apache/impala/catalog/HdfsTable.java
M fe/src/main/java/org/apache/impala/catalog/local/CatalogdMetaProvider.java
M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java
M fe/src/main/java/org/apache/impala/service/Frontend.java
M fe/src/main/java/org/apache/impala/service/JniCatalog.java
M fe/src/main/java/org/apache/impala/service/JniFrontend.java
M www/catalog.tmpl
18 files changed, 489 insertions(+), 14 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/57/25557/1
--
To view, visit https://gerrit.cloudera.org/25557
To unsubscribe, visit https://gerrit.cloudera.org/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff48b8c3ec783097dca03fcc25ccde5dae288bf1
Gerrit-Change-Number: 25557
Gerrit-PatchSet: 1
Gerrit-Owner: ttttttz <[email protected]>

Reply via email to