-
Notifications
You must be signed in to change notification settings - Fork 28.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-44272][YARN] Path Inconsistency when Operating statCache withi…
…n Yarn Client ### What changes were proposed in this pull request? 1. Change `statCache.getOrElse` to `statCache.getOrElseUpdate` so that the corresponding FileStatus can be cached into `statCache` 2. Change the `Path` parameter `isPublic`, `checkPermissionOfOther`, and `ancestorsHaveExecutePermissions` to `URI`. 3. Add `getParentURI` method when we construct the parent URI. ### Why are the changes needed? We should not use `uri.getPath()` when constructing the Path which will not retain information like scheme. This means that `statCache` is not really taking any effect. For example, if uri is "file:/foo.invalid.com:8080/tmp/testing", then ``` uri.getPath -> /foo.invalid.com:8080/tmp/testing uri.toString -> file:/foo.invalid.com:8080/tmp/testing ``` Please also see more details from JIRA [ticket](https://issues.apache.org/jira/browse/SPARK-44272). ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Add additional UT to validate the FileStatus is cached as expected. Closes #41821 from shuwang21/fixcache. Lead-authored-by: Shu Wang <swang7@linkedin.com> Co-authored-by: Shu Wang <wangshu1990@gmail.com> Signed-off-by: Mridul Muralidharan <mridul<at>gmail.com>
- Loading branch information
1 parent
9b43a9f
commit 0879a25
Showing
2 changed files
with
83 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters