Hello Quanlong Huang, Michael Smith, Impala Public Jenkins,

I'd like you to reexamine a change. Please visit

    https://gerrit.cloudera.org/25113

to look at the new patch set (#3).

Change subject: IMPALA-15428: Avoid retaining host stats in partition 
FileMetadataStats
......................................................................

IMPALA-15428: Avoid retaining host stats in partition FileMetadataStats

IMPALA-13122 added unique host and host:disk pair counts to the catalogd
log line written after loading file metadata. The sets backing these
counts were stored in FeFsTable.FileMetadataStats, which every
HdfsPartition keeps for its lifetime. As a result catalogd held a
HashSet of host indices and a HashSet of (host, disk) pairs for each
partition, and copied both whenever a partition builder was created from
an existing partition, although they were only used for one log message.

This patch moves host tracking into a new transient class,
FileMetadataHostStats:
- FileMetadataLoader accumulates host stats for each file descriptor it
  loads, alongside FileMetadataStats.
- ParallelFileMetadataLoader merges the host stats of every loaded path
  into an aggregate that is reset at the start of each load(). Paths
  whose files are unchanged still contribute, even though their
  partitions keep their existing file descriptors.
- HdfsTable.loadFileMetadataForPartitions() passes the aggregate to
  FileMetadataStats.toLogString() and discards it after logging.

FileMetadataStats now only holds scalar fields. The host counts in the
log line describe the paths loaded by the current operation.

Testing:
- Added FileMetadataHostStatsTest and updated FileMetadataLoaderTest.
- Added test_file_metadata_stats_hosts_on_refresh, which checks that host
  stats are logged when REFRESH reuses unchanged file descriptors.
- Ran test_file_metadata_stats.py on the HDFS minicluster with erasure
  coding enabled and disabled.

Change-Id: I4bc33ae36cfc29a63a1eff79f126b36c1c2acd8b
Assisted-by: Claude Opus 5.5 (Cursor)
---
M fe/src/main/java/org/apache/impala/catalog/FeFsTable.java
A fe/src/main/java/org/apache/impala/catalog/FileMetadataHostStats.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/ParallelFileMetadataLoader.java
A fe/src/test/java/org/apache/impala/catalog/FileMetadataHostStatsTest.java
M fe/src/test/java/org/apache/impala/catalog/FileMetadataLoaderTest.java
M tests/custom_cluster/test_file_metadata_stats.py
8 files changed, 232 insertions(+), 59 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/13/25113/3
--
To view, visit https://gerrit.cloudera.org/25113
To unsubscribe, visit https://gerrit.cloudera.org/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I4bc33ae36cfc29a63a1eff79f126b36c1c2acd8b
Gerrit-Change-Number: 25113
Gerrit-PatchSet: 3
Gerrit-Owner: Arnab Karmakar <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>

Reply via email to