Skip to content

Return false from HadoopPinotFS.isDirectory for missing paths#18626

Open
wolfkill wants to merge 1 commit into
apache:masterfrom
wolfkill:fix/hdfs-is-directory-missing-path
Open

Return false from HadoopPinotFS.isDirectory for missing paths#18626
wolfkill wants to merge 1 commit into
apache:masterfrom
wolfkill:fix/hdfs-is-directory-missing-path

Conversation

@wolfkill
Copy link
Copy Markdown
Contributor

Summary

  • Return false from HadoopPinotFS.isDirectory() when the target path does not exist
  • Add a regression test covering the missing-path behavior

Rationale

HadoopPinotFS.isDirectory() used FileSystem#getFileStatus() directly, so missing paths raised FileNotFoundException. Other filesystem implementations such as LocalPinotFS treat missing paths as not directories. This makes the Hadoop implementation consistent for callers that use isDirectory() as a predicate.

Addresses #7083.

Test Plan

  • ./mvnw -pl pinot-plugins/pinot-file-system/pinot-hdfs -am -Dtest=HadoopPinotFSTest#testIsDirectoryReturnsFalseForNonExistentPath -Dsurefire.failIfNoSpecifiedTests=false test
  • ./mvnw -pl pinot-plugins/pinot-file-system/pinot-hdfs -am -Dtest=HadoopPinotFSTest -Dsurefire.failIfNoSpecifiedTests=false test

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.41%. Comparing base (a762254) to head (06946f8).

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18626      +/-   ##
============================================
+ Coverage     64.40%   64.41%   +0.01%     
  Complexity     1137     1137              
============================================
  Files          3337     3337              
  Lines        206069   206069              
  Branches      32128    32128              
============================================
+ Hits         132710   132733      +23     
+ Misses        62726    62700      -26     
- Partials      10633    10636       +3     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-21 64.41% <ø> (+0.01%) ⬆️
temurin 64.41% <ø> (+0.01%) ⬆️
unittests 64.40% <ø> (+0.01%) ⬆️
unittests1 56.83% <ø> (+<0.01%) ⬆️
unittests2 36.94% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wolfkill wolfkill marked this pull request as ready for review May 29, 2026 03:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants