Repository navigation
HADOOP-19815. Document Path trailing slash and URI resolution semantics - #8307
steveloughran merged 5 commits into
Conversation
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
My JIRA id is deepujain |
ctubbsii
left a comment
There was a problem hiding this comment.
+1 to the changes to the docs, and the addition of the test. However, it does not fully resolve the issue described in the JIRA issue. To fully resolve the issue, the FileSystem methods need to be fixed, because their trailing slashes do matter.
|
@ctubbsii thanks for the review. I have made additional changes. Please take another look when you have a moment. |
ctubbsii
left a comment
There was a problem hiding this comment.
I think this is an improvement, but I had a question about how API changes should be marked in my below comments.
|
💔 -1 overall
This message was automatically generated. |
|
I really hate yetus being so spammy. It makes it hard to follow the human conversation and makes trying to contribute to Hadoop, even as a reviewer or reporter, extremely painful. Its comments should be collapsed by default. |
|
@ctubbsii Thanks for approving the MR. |
f817f26 to
04e6c16
Compare
|
Rebased on trunk. Fixed bootstrap null-working-directory handling in RawLocalFileSystem and ViewFileSystem, and updated the local filesystem home-directory expectation for directory-form URIs. Ran the impacted targeted Maven tests locally and they passed. Ready for CI. |
04e6c16 to
2beb43c
Compare
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
2beb43c to
3d9e7dc
Compare
|
Rebased onto trunk and backed out the broader FileSystem URI changes that were causing the common/viewfs regressions. Kept the Path(String) vs Path(URI) docs/tests, and verified |
|
🎊 +1 overall
This message was automatically generated. |
|
@deepujain I would love for it to be merged and closed, but I am not a committer and don't have write access. |
|
CI is still green on the current head, and this branch has the narrowed scope plus prior approval. @steveloughran, when you have a moment, could you please take a look or point me to the right committer for this one? Happy to make any follow-up changes. |
steveloughran
left a comment
There was a problem hiding this comment.
move to assertj asserts to work with junit5 and backports
|
@steveloughran wrote:
What does this mean? It doesn't seem related to this PR. |
|
Applied the latest review follow-up by moving the updated |
|
Applied the latest review follow-up on July 10, 2026 by moving the updated |
d4741ce to
aa92e1e
Compare
|
Rebased cleanly onto current trunk at |
|
🎊 +1 overall
This message was automatically generated. |
|
Have you reached out on the Hadoop mailing lists, as mentioned above? I think Hadoop committers aren't watching the GitHub activity from outside contributors. |
73543f4 to
deb4fb9
Compare
|
Rebased onto trunk |
|
💔 -1 overall
This message was automatically generated. |
|
On |
|
FYI, I have sent a review request to the Hadoop developer mailing list, following the recommendation here. Thanks for pointing me to that channel. |
deb4fb9 to
eb60c57
Compare
|
💔 -1 overall
This message was automatically generated. |
eb60c57 to
943f933
Compare
|
💔 -1 overall
This message was automatically generated. |
…ash semantics. Signed-off-by: Deepak Jain <deepujain@gmail.com>
…slash semantics. Signed-off-by: Deepak Jain <deepujain@gmail.com>
Signed-off-by: Deepak Jain <deepujain@gmail.com>
Signed-off-by: Deepak Jain <deepujain@gmail.com>
6320053 to
79cb0b5
Compare
|
Restored the four existing commits on current trunk 2fc3bb2 after the fork branch lost its commit ancestry. The source tree at the intervening orphan commit matched the previous PR head; all four patches are unchanged according to Current head: 79cb0b50. Contains content generated by Codex. |
79cb0b5 to
8f68aa3
Compare
|
💔 -1 overall
This message was automatically generated. |
|
Jenkins build 16 reports one existing trunk SpotBugs warning: |
|
this is adding a spotbugs warning; please fix with a followup of some kind |
steveloughran
left a comment
There was a problem hiding this comment.
finally looking at this.
with the production code being nothing but a javadoc change, this is low risk production side.
looking at the tests, there's only one new test case, the others seem just a migration of some assertions to assertj, while others in the same test cases are still on junit.
I think those simple migration cases should be reverted, so this patch becomes just the javadocs + new test case. minimal and adds exactly what is needed.
It's not that I don't appreciate the assertj changes, it's just that I think they are a distraction here; it'd be better moving the entire classes to assertj in their own prs
| */ | ||
| @Test | ||
| @Timeout(value = 30) | ||
| public void testTrailingSlashAndUriResolve() throws URISyntaxException { |
There was a problem hiding this comment.
this is the main change then, a new test case? The others are a partial move of existing test cases to move from junit assert to assertj?
There was a problem hiding this comment.
Yes. Removed the partial assertion migrations in ba2c93d and restored all six ViewFS/ChRootedFS test files to the base. The diff now contains only the Path Javadocs and the new constructor/URI resolution testcase. TestPath passes: 24 tests, no failures or errors, 3 platform-specific skips. The description now matches this scope.
|
The follow-up is already in #8753 (HADOOP-19993), opened by @jojochuang and currently approved. It marks the two |
Signed-off-by: Deepak Jain <deepujain@gmail.com>
|
💔 -1 overall
This message was automatically generated. |
…cs (#8307) Contributed by Deepak Jain
Description of PR
Constructing a
Pathfrom a string removes a trailing slash, which can make a laterURI.resolve()resolve against the wrong directory for the caller's intent. For example, resolvingxagainstnew Path("hdfs://host/dir/").toUri()produceshdfs://host/x, while constructing the Path from a URI preserves the slash and produceshdfs://host/dir/x.This documents that distinction in
Pathand adds one regression test covering both constructors and their resolution results. Runtime behavior stays the same. Following review, the partial AssertJ migrations in the existing ViewFS and ChRootedFS tests have been removed.Fixes HADOOP-19815.
How was this patch tested?
On
ba2c93d6,TestPathpassed: 24 tests, 0 failures, 0 errors, 3 platform-specific skips. Validation ran in a disposable Linux container with Java 17 and Maven 3.9.15.git diff --checkalso passed. The six restored ViewFS/ChRootedFS test files match the base exactly; an independent scope review confirmed only the Javadocs and new testcase remain. Hosted CI will validate the pushed head separately.The existing trunk SpotBugs warning on
McpHttpServlet.requestHandleris tracked separately by HADOOP-19993 / #8753.For code changes:
AI Tooling
Contains content generated by Codex.