HDFS-17881. Hadoop file system cannot browse folders with colons in their names on Windows - #8693
HDFS-17881. Hadoop file system cannot browse folders with colons in their names on Windows#8693vt921102 wants to merge 1 commit into
Conversation
|
🎊 +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>
c96bb4c to
244e06b
Compare
|
🎊 +1 overall
This message was automatically generated. |
|
@Hexiaoqiao @shfshihuafeng would you have time to take a look at this backport? It is a one-line ABFS fix for HDFS-17881.
The GitHub Actions Thanks! |
|
@cnauroth @steveloughran would you be able to review this backport as well? The HDFS-17881: Targeting Thanks! |
|
Backpoports don't need review; they just verify things work, especially the move to junit4 tests |
Description of PR
Backport of HDFS-17881 to
branch-3.4, targeting 3.4.4. Trunk PR: #8536.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.The production change is identical to the trunk patch. The test needed adaptation because
branch-3.4is on JUnit 4 withAssertions.assertThat, itsAbfsDfsClientconstructor takes 6 arguments, and itsAbfsClientContextBuilderhas nowithFileSystemId. A plain cherry-pick of the trunk commit therefore conflicts inTestAbfsClient.java, which is why this is a separate PR rather than a clean cherry-pick.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 overallon the previousrevision, including
+1 unit — hadoop-azure in the patch passed, validated onboth JDK 8 and JDK 11; CI is re-running on the amended commit.
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.Note on the
Buildcheck:.github/workflows/build_and_test.ymlwas added totrunk by HADOOP-19858 on 2026-04-22, after
branch-3.4was cut, so no suchworkflow run can exist for this branch and the check reports
action_required.This is the case for every PR against
branch-3.4/branch-3.5. The ApacheCI checks (Yetus, jenkins/pr-merge) are the meaningful ones here.
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.