hadoop icon indicating copy to clipboard operation
hadoop copied to clipboard

[HADOOP-18652][HADOOP-18856] Properly support root bucket paths in Path.suffix

Open FX196 opened this issue 9 months ago • 3 comments

Description of PR

The existing implementation of Path.suffix drops the scheme and authority of the path when it's a root path. For example, new Path("s3://foo").suffix("/bar") is expected to return a path for s3://foo/bar, but the current implementation returns /bar.

Originally, .suffix threw an NPE when called on a root path. https://github.com/apache/hadoop/pull/5653 made it so that no NPE was thrown, but unintentionally dropped the scheme and authority of the path.

This PR fixes the implementation such that .suffix works with root bucket paths. This will help resolve HADOOP-18856 as well.

How was this patch tested?

Added a new test

For code changes:

  • [x] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • [ ] 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?
  • [ ] If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?

FX196 avatar Mar 25 '25 20:03 FX196

:confetti_ball: +1 overall

Vote Subsystem Runtime Logfile Comment
+0 :ok: reexec 14m 17s Docker mode activated.
_ Prechecks _
+1 :green_heart: dupname 0m 0s No case conflicting files found.
+0 :ok: codespell 0m 1s codespell was not available.
+0 :ok: detsecrets 0m 1s detect-secrets was not available.
+1 :green_heart: @author 0m 0s The patch does not contain any @author tags.
+1 :green_heart: test4tests 0m 0s The patch appears to include 1 new or modified test files.
_ trunk Compile Tests _
+1 :green_heart: mvninstall 35m 43s trunk passed
+1 :green_heart: compile 15m 26s trunk passed with JDK Ubuntu-11.0.26+4-post-Ubuntu-1ubuntu120.04
+1 :green_heart: compile 13m 32s trunk passed with JDK Private Build-1.8.0_442-8u442-b06~us1-0ubuntu1~20.04-b06
+1 :green_heart: checkstyle 1m 16s trunk passed
+1 :green_heart: mvnsite 1m 35s trunk passed
+1 :green_heart: javadoc 1m 12s trunk passed with JDK Ubuntu-11.0.26+4-post-Ubuntu-1ubuntu120.04
+1 :green_heart: javadoc 0m 48s trunk passed with JDK Private Build-1.8.0_442-8u442-b06~us1-0ubuntu1~20.04-b06
+1 :green_heart: spotbugs 2m 24s trunk passed
+1 :green_heart: shadedclient 35m 21s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 :green_heart: mvninstall 0m 51s the patch passed
+1 :green_heart: compile 14m 51s the patch passed with JDK Ubuntu-11.0.26+4-post-Ubuntu-1ubuntu120.04
+1 :green_heart: javac 14m 50s the patch passed
+1 :green_heart: compile 13m 27s the patch passed with JDK Private Build-1.8.0_442-8u442-b06~us1-0ubuntu1~20.04-b06
+1 :green_heart: javac 13m 27s the patch passed
+1 :green_heart: blanks 0m 0s The patch has no blanks issues.
+1 :green_heart: checkstyle 1m 12s the patch passed
+1 :green_heart: mvnsite 1m 36s the patch passed
+1 :green_heart: javadoc 1m 11s the patch passed with JDK Ubuntu-11.0.26+4-post-Ubuntu-1ubuntu120.04
+1 :green_heart: javadoc 0m 53s the patch passed with JDK Private Build-1.8.0_442-8u442-b06~us1-0ubuntu1~20.04-b06
+1 :green_heart: spotbugs 2m 41s the patch passed
+1 :green_heart: shadedclient 36m 9s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 :green_heart: unit 15m 1s hadoop-common in the patch passed.
+1 :green_heart: asflicense 1m 3s The patch does not generate ASF License warnings.
211m 17s
Subsystem Report/Notes
Docker ClientAPI=1.48 ServerAPI=1.48 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7536/1/artifact/out/Dockerfile
GITHUB PR https://github.com/apache/hadoop/pull/7536
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux e8fa7c8d53ff 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 7a82257006f4158ce74a72104d23112bec55279a
Default Java Private Build-1.8.0_442-8u442-b06~us1-0ubuntu1~20.04-b06
Multi-JDK versions /usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-11.0.26+4-post-Ubuntu-1ubuntu120.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_442-8u442-b06~us1-0ubuntu1~20.04-b06
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7536/1/testReport/
Max. process+thread count 3148 (vs. ulimit of 5500)
modules C: hadoop-common-project/hadoop-common U: hadoop-common-project/hadoop-common
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7536/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.

hadoop-yetus avatar Mar 25 '25 23:03 hadoop-yetus

Hi @ayushtkn, would you be available to help take a look since you merged https://github.com/apache/hadoop/pull/5653?

FX196 avatar Apr 04 '25 20:04 FX196

Hi @jojochuang, could you help take a look?

FX196 avatar Apr 10 '25 06:04 FX196

We're closing this stale PR because it has been open for 100 days with no activity. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable. If you feel like this was a mistake, or you would like to continue working on it, please feel free to re-open it and ask for a committer to remove the stale tag and review again. Thanks all for your contribution.

github-actions[bot] avatar Sep 11 '25 00:09 github-actions[bot]