Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HIVE-28691: Check if the path exists before deleting in FileUtils#moveToTrash #5596

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wecharyu
Copy link
Contributor

@wecharyu wecharyu commented Jan 6, 2025

What changes were proposed in this pull request?

Currently the FileUtils#moveToTrash would fallback to call delete() API even if encountering FileNotFoundException, we could fast return if the path does not exist.

Why are the changes needed?

To reduce the hdfs calls and avoid the confusing failure log.

Does this PR introduce any user-facing change?

No.

Is the change a dependency upgrade?

No.

How was this patch tested?

Pass existing tests.

@wecharyu
Copy link
Contributor Author

wecharyu commented Jan 6, 2025

@ayushtkn @zhangbutao Could you please take a look?

Copy link

sonarqubecloud bot commented Jan 8, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants