Skip to content

Conversation

leosanqing
Copy link
Contributor

Description of PR

In the org.apache.hadoop.fs.cosn.CosNativeFileSystemStore#initCOSClient method, when the client is initialized, it only passes the access key and secret key, completely ignoring the session token. This causes all subsequent operations that rely on these temporary credentials to fail.
Furthermore, this re-initialization step seems unnecessary. Instead of creating a new client with incomplete credentials, the existing credential provider (which already contains the AK, SK, and token) should be passed down directly.

This is same as #7867 there were some conflicts. so I send up a separate pull request targeting branch-3.4.

How was this patch tested?

ITests are passed on my local env.

image

For code changes:

  • [✔] Does the title or this PR starts with the corresponding JIRA issue id (yes)?

@hadoop-yetus
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 19m 31s 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.
+0 🆗 xmllint 0m 0s xmllint was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 test4tests 0m 0s The patch appears to include 5 new or modified test files.
_ branch-3.4 Compile Tests _
+1 💚 mvninstall 41m 58s branch-3.4 passed
+1 💚 compile 0m 28s branch-3.4 passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 compile 0m 26s branch-3.4 passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 checkstyle 0m 26s branch-3.4 passed
+1 💚 mvnsite 0m 30s branch-3.4 passed
+1 💚 javadoc 0m 32s branch-3.4 passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 27s branch-3.4 passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 0m 45s branch-3.4 passed
+1 💚 shadedclient 36m 54s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚 mvninstall 0m 25s the patch passed
+1 💚 compile 0m 18s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javac 0m 18s the patch passed
+1 💚 compile 0m 17s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 javac 0m 17s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 0m 14s the patch passed
+1 💚 mvnsite 0m 20s the patch passed
+1 💚 javadoc 0m 20s the patch passed with JDK Ubuntu-11.0.27+6-post-Ubuntu-0ubuntu120.04
+1 💚 javadoc 0m 18s the patch passed with JDK Private Build-1.8.0_452-8u452-gaus1-0ubuntu120.04-b09
+1 💚 spotbugs 0m 43s the patch passed
+1 💚 shadedclient 37m 24s patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚 unit 0m 21s hadoop-cos in the patch passed.
+1 💚 asflicense 0m 35s The patch does not generate ASF License warnings.
145m 34s
Subsystem Report/Notes
Docker ClientAPI=1.51 ServerAPI=1.51 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7911/1/artifact/out/Dockerfile
GITHUB PR #7911
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient codespell detsecrets xmllint spotbugs checkstyle
uname Linux 5b677ee4dfa6 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision branch-3.4 / 7cf2573
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-7911/1/testReport/
Max. process+thread count 527 (vs. ulimit of 5500)
modules C: hadoop-cloud-storage-project/hadoop-cos U: hadoop-cloud-storage-project/hadoop-cos
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-7911/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.

@leosanqing
Copy link
Contributor Author

leosanqing commented Aug 28, 2025

@cnauroth hi, bro, I send a new pr to merge targeting brach-3.4. Previous conflicts are test dependencies. ITest's results are here. Could you help me to review this pr?
image

Copy link
Contributor

@cnauroth cnauroth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. I'll commit this shortly.

cnauroth pushed a commit that referenced this pull request Aug 29, 2025
@cnauroth
Copy link
Contributor

Thank you again @leosanqing . I committed this to branch-3.4.

@cnauroth cnauroth closed this Aug 29, 2025
@leosanqing
Copy link
Contributor Author

Thank you again @leosanqing . I committed this to branch-3.4.
Hey,thank you for your merging.

I'm not sure if branch-3.3 is still being maintained, but I have tested this PR against branch-3.3 in my local environment, and it passed. If you are still releasing new versions for 3.3, this could be merged into branch-3.3 as well, since it was the original branch where this COS feature was first introduced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants