Skip to content

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

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

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

Conversation

@vt921102

@vt921102 vt921102 commented Aug 19, 2026

Copy link
Copy Markdown

Description of PR

Backport of HDFS-17881 to branch-3.4, targeting 3.4.4. 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.

The production change is identical to the trunk patch. The test needed adaptation because branch-3.4 is on JUnit 4 with Assertions.assertThat, its AbfsDfsClient constructor takes 6 arguments, and its AbfsClientContextBuilder has no withFileSystemId. A plain cherry-pick of the trunk commit therefore conflicts in TestAbfsClient.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'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 previous
revision, including +1 unit — hadoop-azure in the patch passed, validated on
both 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.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.4 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 7m 17s 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.4 Compile Tests _
+1 💚 mvninstall 31m 27s branch-3.4 passed
+1 💚 compile 0m 33s branch-3.4 passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 compile 0m 34s branch-3.4 passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 0m 31s branch-3.4 passed
+1 💚 mvnsite 0m 38s branch-3.4 passed
+1 💚 javadoc 0m 36s branch-3.4 passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 36s branch-3.4 passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 0m 56s branch-3.4 passed
+1 💚 shadedclient 21m 11s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 19s the patch passed
+1 💚 compile 0m 21s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javac 0m 21s the patch passed
+1 💚 compile 0m 19s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 javac 0m 19s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 13s the patch passed
+1 💚 mvnsite 0m 21s the patch passed
+1 💚 javadoc 0m 19s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 17s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 0m 45s the patch passed
+1 💚 shadedclient 20m 31s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 2m 13s hadoop-azure in the patch passed.
+1 💚 asflicense 0m 26s The patch does not generate ASF License warnings.
91m 40s
Subsystem Report/Notes
Docker ClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8693/1/artifact/out/Dockerfile
GITHUB PR #8693
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux ece42748ccdb 5.15.0-179-generic #189-Ubuntu SMP Tue May 5 18:20:56 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision branch-3.4 / c96bb4c
Default Java Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8693/1/testReport/
Max. process+thread count 553 (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-8693/1/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 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 24s 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.4 Compile Tests _
+1 💚 mvninstall 30m 48s branch-3.4 passed
+1 💚 compile 0m 31s branch-3.4 passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 compile 0m 36s branch-3.4 passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 0m 31s branch-3.4 passed
+1 💚 mvnsite 0m 40s branch-3.4 passed
+1 💚 javadoc 0m 38s branch-3.4 passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 33s branch-3.4 passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 0m 53s branch-3.4 passed
+1 💚 shadedclient 21m 42s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 21s the patch passed
+1 💚 compile 0m 21s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javac 0m 21s the patch passed
+1 💚 compile 0m 19s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 javac 0m 19s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 14s the patch passed
+1 💚 mvnsite 0m 22s the patch passed
+1 💚 javadoc 0m 19s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 19s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 0m 44s the patch passed
+1 💚 shadedclient 20m 36s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 2m 15s hadoop-azure in the patch passed.
+1 💚 asflicense 0m 25s The patch does not generate ASF License warnings.
85m 4s
Subsystem Report/Notes
Docker ClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8693/2/artifact/out/Dockerfile
GITHUB PR #8693
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux b0a0739c7978 5.15.0-179-generic #189-Ubuntu SMP Tue May 5 18:20:56 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision branch-3.4 / 244e06b
Default Java Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8693/2/testReport/
Max. process+thread count 557 (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-8693/2/console
versions git=2.25.1 maven=3.6.3 spotbugs=4.2.2
Powered by Apache Yetus 0.14.0 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.4 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.4. 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

Backpoports don't need review; they just verify things work, especially the move to junit4 tests

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