Skip to content

HDFS-17881. Hadoop file system cannot browse folders with colons in their names on Windows. - #8692

Open
vt921102 wants to merge 1 commit into
apache:branch-3.5from
vt921102:HDFS-17881-branch-3.5
Open

HDFS-17881. Hadoop file system cannot browse folders with colons in their names on Windows.#8692
vt921102 wants to merge 1 commit into
apache:branch-3.5from
vt921102:HDFS-17881-branch-3.5

Conversation

@vt921102

@vt921102 vt921102 commented Aug 19, 2026

Copy link
Copy Markdown

Description of PR

Backport of HDFS-17881 to branch-3.5, targeting 3.5.1. Trunk PR: #8536.

AbfsClient.getVersionedFileStatusFromEntry() built the entry path as
new Path(File.separator + entry.name()). On Windows File.separator is a
backslash, so for a child entry named FestSpecial: the string handed to
Path is \FestSpecial:. Path looks for the first : before the first
/; finding no /, it treats \FestSpecial as a URI scheme and listing
fails:

java.net.URISyntaxException: Illegal character in scheme name at index 0: \FestSpecial:

The separator here is part of an ABFS/URI path, not a local filesystem path,
so it must always be /. Linux was unaffected because File.separator is
already / there.

This is a clean cherry-pick of the trunk commit — the patch is identical.

How was this patch tested?

New unit test TestAbfsClient#testGetVersionedFileStatusFromEntryUsesForwardSlash,
asserting the entry path is built with / independently of the platform's
File.separator. It fails on Windows before the fix and is a regression guard
on every platform afterwards. Yetus reported +1 overall on the pre-rebase
revision, including +1 unit — hadoop-azure in the patch passed; CI is
re-running after the rebase onto the current branch-3.5 tip.

Manually reproduced and verified against Azure Data Lake Storage using the
test_hadoop_azure.zip reproducer 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 Build check: .github/workflows/build_and_test.yml was added to
trunk by HADOOP-19858 on 2026-04-22, after branch-3.5 was cut, so no such
workflow 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 Apache
CI checks (Yetus, jenkins/pr-merge) are the meaningful ones here.

For code changes:

  • Does the title of this PR start with the corresponding JIRA issue id?
  • Object storage: Have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0? (no new dependencies)
  • If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files? (not applicable)

AI Tooling

If an AI tool was used:

Contains content generated by Claude in creating the unit test.

@hadoop-yetus

Copy link
Copy Markdown

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 12m 36s 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.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ branch-3.5 Compile Tests _
+1 💚 mvninstall 42m 42s branch-3.5 passed
+1 💚 compile 1m 6s branch-3.5 passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 compile 1m 6s branch-3.5 passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 checkstyle 1m 3s branch-3.5 passed
+1 💚 mvnsite 1m 10s branch-3.5 passed
+1 💚 javadoc 1m 4s branch-3.5 passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javadoc 1m 1s branch-3.5 passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 spotbugs 1m 37s branch-3.5 passed
+1 💚 shadedclient 29m 24s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 35s the patch passed
+1 💚 compile 0m 33s the patch passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javac 0m 33s the patch passed
+1 💚 compile 0m 33s the patch passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 javac 0m 33s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 26s the patch passed
+1 💚 mvnsite 0m 38s the patch passed
+1 💚 javadoc 0m 30s the patch passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javadoc 0m 30s the patch passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 spotbugs 1m 15s the patch passed
+1 💚 shadedclient 28m 34s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 2m 12s hadoop-azure in the patch passed.
+1 💚 asflicense 0m 36s The patch does not generate ASF License warnings.
131m 13s
Subsystem Report/Notes
Docker ClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8692/1/artifact/out/Dockerfile
GITHUB PR #8692
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 6139b357a02b 5.15.0-181-generic #191-Ubuntu SMP Fri May 22 19:09:02 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision branch-3.5 / 91a2cb5
Default Java Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.11+10-1-24.04.2-Ubuntu /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8692/1/testReport/
Max. process+thread count 615 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-azure U: hadoop-tools/hadoop-azure
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8692/1/console
versions git=2.43.0 maven=3.9.15 spotbugs=4.9.7
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

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>
@hadoop-yetus

Copy link
Copy Markdown

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 35s 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.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ branch-3.5 Compile Tests _
+1 💚 mvninstall 42m 40s branch-3.5 passed
+1 💚 compile 1m 6s branch-3.5 passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 compile 1m 6s branch-3.5 passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 checkstyle 1m 1s branch-3.5 passed
+1 💚 mvnsite 1m 11s branch-3.5 passed
+1 💚 javadoc 1m 5s branch-3.5 passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javadoc 1m 2s branch-3.5 passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 spotbugs 1m 37s branch-3.5 passed
+1 💚 shadedclient 29m 26s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 36s the patch passed
+1 💚 compile 0m 34s the patch passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javac 0m 34s the patch passed
+1 💚 compile 0m 35s the patch passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 javac 0m 35s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 24s the patch passed
+1 💚 mvnsite 0m 38s the patch passed
+1 💚 javadoc 0m 30s the patch passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚 javadoc 0m 29s the patch passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚 spotbugs 1m 13s the patch passed
+1 💚 shadedclient 28m 26s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 2m 11s hadoop-azure in the patch passed.
+1 💚 asflicense 0m 36s The patch does not generate ASF License warnings.
119m 8s
Subsystem Report/Notes
Docker ClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8692/2/artifact/out/Dockerfile
GITHUB PR #8692
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 40e70fe6afd8 5.15.0-181-generic #191-Ubuntu SMP Fri May 22 19:09:02 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision branch-3.5 / 2da4b5d
Default Java Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.11+10-1-24.04.2-Ubuntu /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8692/2/testReport/
Max. process+thread count 637 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-azure U: hadoop-tools/hadoop-azure
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8692/2/console
versions git=2.43.0 maven=3.9.15 spotbugs=4.9.7
Powered by Apache Yetus 0.14.1 https://yetus.apache.org

This message was automatically generated.

@vt921102

Copy link
Copy Markdown
Author

@Hexiaoqiao @shfshihuafeng would you have time to take a look at this backport?
The trunk PR is #8536.

It is a one-line ABFS fix for HDFS-17881.
AbfsClient.getVersionedFileStatusFromEntry() built the list-status entry path
with File.separator, which is a backslash on Windows, so a child entry whose
name contains a colon was parsed as a URI scheme and listing failed with
URISyntaxException. It is now always a forward slash, with a unit test
covering the regression.

Apache Yetus is +1 and continuous-integration/jenkins/pr-merge is green.

The GitHub Actions Build check reports action_required because
.github/workflows/build_and_test.yml was added to trunk by HADOOP-19858 on
2026-04-22, after branch-3.5 was cut. No run of that workflow can exist for
this branch, so the check cannot be satisfied; this affects every PR against
branch-3.4/branch-3.5.

Thanks!

@vt921102

Copy link
Copy Markdown
Author

@cnauroth @steveloughran would you be able to review this backport as well? The
change is entirely in hadoop-tools/hadoop-azure, so it is probably closer to
your area than to HDFS. Trunk PR is #8536.

HDFS-17881:
AbfsClient.getVersionedFileStatusFromEntry() built the list-status entry path
with File.separator. On Windows that is a backslash, so Path treated the
segment before the first colon as a URI scheme and listing a directory whose
children contain a colon failed with URISyntaxException. It is now always a
forward slash, with a unit test covering the regression.

Targeting branch-3.5. Apache Yetus is +1 and jenkins/pr-merge is green; the
GitHub Actions Build check cannot be satisfied on this branch, as explained
above.

Thanks!

@steveloughran

Copy link
Copy Markdown
Contributor

Sorry,

I'm not working on Hadoop any more, taking a break before going on a different direction in my life.

  1. See if you can get any of the Microsoft Committers to review
    2 ask on Hadoop common dev.

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