Jiyoung Yoo has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24588
Change subject: IMPALA-15117: Optimize getFirstLevelAcidDirPath ...................................................................... IMPALA-15117: Optimize getFirstLevelAcidDirPath In the original implementation of AcidUtils.getFirstLevelAcidDirPath(), the FileSystem.isDirectory() API was called recursively for each path component. This introduces unnecessary RPC overhead during table loading. This change refactors the logic to leverage Path string operations by traversing upwards from the file's parent directory to detect the ACID directory structure 1. Eliminated FileSystem.isDirectory() RPCs: Since the input filePath is guaranteed to be a valid data file during metadata load, we can assume that all of its parent paths are directories 2. Preserved backward compatibility: The original recursive behavior handled nested subdirectories inside ACID folders. To maintain the same behavior, this change preserved the exact same path-merging logic (e.g., returning "delta_000001_000001_0000/subdir" for a file path like “partition_dir/delta_000001_000001_0000/sub_dir/filename") Testing: AcidUtilsTest.testGetFirstLevelAcidDirPath Change-Id: I390183039181bb62d6818c8e869738ddf01c2f6b --- M fe/src/main/java/org/apache/impala/service/CatalogOpExecutor.java M fe/src/main/java/org/apache/impala/util/AcidUtils.java M fe/src/test/java/org/apache/impala/util/AcidUtilsTest.java 3 files changed, 77 insertions(+), 36 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/88/24588/2 -- To view, visit http://gerrit.cloudera.org:8080/24588 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I390183039181bb62d6818c8e869738ddf01c2f6b Gerrit-Change-Number: 24588 Gerrit-PatchSet: 2 Gerrit-Owner: Jiyoung Yoo <[email protected]>
