HDFS-17881: Hadoop file system can not browse the folder that has chi… - #8536
HDFS-17881: Hadoop file system can not browse the folder that has chi…#8536vt921102 wants to merge 1 commit into
Conversation
|
💔 -1 overall
This message was automatically generated. |
cb4f028 to
0864c91
Compare
|
💔 -1 overall
This message was automatically generated. |
302e17e to
5201a91
Compare
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
…heir names on Windows.
ABFS built list-status entry paths with File.separator, which is a
backslash on Windows. Path("\name:x") then treats "\name" as a URI
scheme, so listing a directory whose children contain a colon failed
with URISyntaxException. The separator here is part of an ABFS/URI
path, not a local filesystem path, so use a forward slash
unconditionally.
Contains content generated by Claude.
Generated-by: Claude Opus 5
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
@Hexiaoqiao @shfshihuafeng would you have time to take a look at this one? It is a one-line ABFS fix for HDFS-17881. All checks are green: Backports are prepared for the release branches: #8692 (branch-3.5) and Thanks! |
|
@cnauroth @steveloughran would you be able to review this as well? The change is HDFS-17881: All checks are green: One process question: the JIRA is filed under the HDFS project with component Thanks! |
|
* as noted, I'm not working. taking august off and doing something completely different from mid sept. sorry
only worry about this pr, asking for other branches is a distraction. the backports are just that, backports of whatever is in trunk, and shouldn't be different except where some incompatiblity (like junit) force it. get this one, submit those PRs with a declaration of which azure endpoints you reran the hadoop azure itests against (i.e. |
Description of PR
Fixes HDFS-17881.
AbfsClient.getVersionedFileStatusFromEntry()built the entry path asnew Path(File.separator + entry.name()). On WindowsFile.separatoris abackslash, so for a child entry named
FestSpecial:the string handed toPathis\FestSpecial:.Pathlooks for the first:before the first/; finding no/, it treats\FestSpecialas a URI scheme and listingfails:
The separator here is part of an ABFS/URI path, not a local filesystem path,
so it must always be
/. Linux was unaffected becauseFile.separatorisalready
/there.Backports: #8692 (branch-3.5), #8693 (branch-3.4).
How was this patch tested?
New unit test
TestAbfsClient#testGetVersionedFileStatusFromEntryUsesForwardSlash,asserting the entry path is built with
/independently of the platform'sFile.separator. It fails on Windows before the fix and is a regression guardon every platform afterwards. Yetus reported
+1 unit — hadoop-azure in the patch passedon the pre-rebase revision; CI is re-running after the rebaseonto current trunk.
Manually reproduced and verified against Azure Data Lake Storage using the
test_hadoop_azure.zipreproducer attached to the JIRA (AbfsListStatusOAuthTest.java).Integration test endpoint declaration: TODO — see
hadoop-tools/hadoop-azure/src/site/markdown/testing_azure.md.For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles? (not applicable)AI Tooling
If an AI tool was used:
Contains content generated by Claude in creating the unit test.