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

HADOOP-18987 Various fixes to FileSystem API docs #6292

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

DieterDP-ng
Copy link
Contributor

Description of PR

This PR contains documentation updates to the Hadoop FileSystem API definition. No intention of the docs is changed, just inconsistencies, informal statements, typos etc.

How was this patch tested?

Not tested - only contains docs.

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 33s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ trunk Compile Tests _
+1 💚 mvninstall 42m 50s trunk passed
+1 💚 mvnsite 1m 25s trunk passed
+1 💚 shadedclient 75m 58s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 53s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 mvnsite 1m 14s the patch passed
+1 💚 shadedclient 32m 34s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 asflicense 0m 36s The patch does not generate ASF License warnings.
114m 7s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6292/1/artifact/out/Dockerfile
GITHUB PR #6292
Optional Tests dupname asflicense mvnsite codespell detsecrets markdownlint
uname Linux 5bc157b21b9e 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 423596f
Max. process+thread count 561 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6292/1/console
versions git=2.25.1 maven=3.6.3
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@steveloughran steveloughran self-assigned this Nov 23, 2023
@steveloughran steveloughran self-requested a review November 23, 2023 12:46
Copy link
Contributor

@steveloughran steveloughran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DIeter, your rigorousness is appreciated! The spec does try to balance some formal specification with python syntax so developers read it. We know that things like TLA+ don't work as nobody ever files bug reports against those files.

What is key is that there is that strong model underneath and that we can use the precond/postcond clauses to write our compliance tests. And we have somewhere to document how nobody understands what rename() does.

Made some minor suggestions

@@ -87,15 +87,14 @@ for example. output streams returned by the S3A FileSystem.

The stream MUST implement `Abortable` and `StreamCapabilities`.

```python
if unsupported:
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you restore this. yes, it bears more relation to the Z specification language of Ince93 etc, but if you tag as Python then IDEs cover it. And Github doesn't really handle any of the formal languages. Nor do most developers, which is why this uses a python-esque syntax.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I considered the python tags detrimental because my IDE (Intellij) had totally incorrect syntax highlights for these snippets, because they are not valid Python. Specifically, the FS' causes the IDE to think a string is being defined.
But I'm fine with re-applying the python tags.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know it's not well formed python, but neither are our java or xml snippets in the docs. consider it best-effort

@@ -432,7 +432,7 @@ of data which must be collected in a single RPC call.

#### Preconditions

exists(FS, path) else raise FileNotFoundException
if not exists(FS, path) : raise FileNotFoundException
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was using the concept exists() holds or raise FNFE, but if this suits then I'm not going to argue about details. The goal of this spec is for other people and tests, not mathematical purism.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either form is understandable imo, just thought the suggested form is more in line with the remainder of the docs which uses pythonesque code.

@@ -88,7 +88,7 @@ Get the status of a path
stat.length = len(FS.Files[p])
stat.isdir = False
stat.blockSize > 0
elif isDir(FS, p) :
elif isDirectory(FS, p) :
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isDir(FS, Path) is the function in the model; 'isDirectory()` path the published method in Filesystem.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, missed that. Also changed line 67 to reflect that.


The result provides access to the byte array defined by `FS.Files[p]`; whether that
The result provides access to the byte array defined by `FS'.Files[p]`; whether that
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

open() is not mutating; FS` = FS; therefore FS is all that is needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, I then misinterpreted

The suffix “’” (single quote) is used as the convention to indicate the state of the system after an operation

on https://hadoop.apache.org/docs/stable/hadoop-project-dist/hadoop-common/filesystem/notation.html

I'll add a small clarification there, and revert this.

@steveloughran
Copy link
Contributor

dieter, always best to not do a rebase and force push unless there's incompatible changes...makes it harder to see the diff. I know, I do it especially on long-lived PRs when other people (stevel for example) makes changes in the same place -but I know it causes pain for all. merge commits aren't so bad

Copy link
Contributor

@steveloughran steveloughran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 from me. thank your for your diligence!

@hadoop-yetus
Copy link

💔 -1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 11m 43s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ trunk Compile Tests _
-1 ❌ mvninstall 42m 49s /branch-mvninstall-root.txt root in trunk failed.
+1 💚 mvnsite 1m 25s trunk passed
+1 💚 shadedclient 75m 28s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 53s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 mvnsite 1m 13s the patch passed
+1 💚 shadedclient 32m 36s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 asflicense 0m 35s The patch does not generate ASF License warnings.
125m 26s
Subsystem Report/Notes
Docker ClientAPI=1.44 ServerAPI=1.44 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6292/2/artifact/out/Dockerfile
GITHUB PR #6292
Optional Tests dupname asflicense mvnsite codespell detsecrets markdownlint
uname Linux 6189bc58fd4a 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / a044705
Max. process+thread count 552 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6292/2/console
versions git=2.25.1 maven=3.6.3
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@steveloughran
Copy link
Contributor

@DieterDP-ng before I merge, what name do you want to be used in the commit message for credit?

@steveloughran
Copy link
Contributor

... never mind, found your full name on the JIRA.

@steveloughran steveloughran merged commit be13e94 into apache:trunk Feb 2, 2024
1 of 2 checks passed
asfgit pushed a commit that referenced this pull request Feb 2, 2024
@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 16m 49s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 markdownlint 0m 0s markdownlint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ trunk Compile Tests _
+1 💚 mvninstall 45m 41s trunk passed
+1 💚 mvnsite 1m 28s trunk passed
+1 💚 shadedclient 83m 43s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 54s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 mvnsite 1m 16s the patch passed
+1 💚 shadedclient 38m 13s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 asflicense 0m 35s The patch does not generate ASF License warnings.
144m 35s
Subsystem Report/Notes
Docker ClientAPI=1.44 ServerAPI=1.44 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6292/3/artifact/out/Dockerfile
GITHUB PR #6292
Optional Tests dupname asflicense mvnsite codespell detsecrets markdownlint
uname Linux eca6c7f34bf5 5.15.0-88-generic #98-Ubuntu SMP Mon Oct 2 15:18:56 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / ff10a23
Max. process+thread count 577 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-6292/3/console
versions git=2.25.1 maven=3.6.3
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

jiajunmao pushed a commit to jiajunmao/hadoop-MLEC that referenced this pull request Feb 6, 2024
slfan1989 pushed a commit that referenced this pull request Feb 10, 2024
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.

3 participants