HADOOP-7856. Improve DiskChecker javadocs. - #8746
Open
sankalpsthakur wants to merge 1 commit into
Open
sankalpsthakur wants to merge 1 commit into
sankalpsthakur wants to merge 1 commit into
Conversation
Complete checkDir(File) javadocs and document that File-based access checks are not equivalent to FsPermission / FsAction#implies. Co-authored-by: Sankalp Thakur <sankalpsthakur@users.noreply.github.com>
|
💔 -1 overall
This message was automatically generated. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes HADOOP-7856
Description of PR
DiskChecker#checkDir(File)javadocs were incomplete (the original summary trailed off, and later checkstyle-only@param/@throwstext did not describe the method). Switching betweencheckDir(File)andcheckDir(LocalFileSystem, Path, FsPermission)can also surprise callers: File-based access checks reflect OS/filesystem writability, while HadoopFsPermission/FsAction#impliesonly inspect permission bits and can pass on a read-only filesystem.This change completes the
checkDirjavadocs and calls that distinction out explicitly. After HADOOP-8973 both overloads also useFilemethods for access; the FsPermission overload still additionally appliesexpectedpermission, so the two APIs remain not equivalent.Javadoc-only. No code behavior change.
How was this patch tested?
Host unit tests (OpenJDK 21,
./mvnw -pl hadoop-common-project/hadoop-common -am test -Dtest=TestDiskChecker,TestDiskCheckerWithDiskIo -Dmaven.test.failure.ignore=false):TestDiskChecker: Tests run: 14, Failures: 0, Errors: 0, Skipped: 0TestDiskCheckerWithDiskIo: Tests run: 5, Failures: 0, Errors: 0, Skipped: 0BUILD SUCCESS)Javadoc-only change; no runtime behavior change. Apache Yetus (
continuous-integration/jenkins/pr-merge) should run on this PR. The GitHub ActionsBuildworkflow may wait for maintainer approval on first-time fork PRs (ACTION_REQUIRED).For code changes:
AI Tooling
Contains content generated by Cursor Grok 4.6.
Contributor notes