hadoop icon indicating copy to clipboard operation
hadoop copied to clipboard

HADOOP-19733. S3A: load credentials providers using configured classloader

Open brandonvin opened this issue 6 months ago • 2 comments

Description of PR

Follow-up to HADOOP-18993 and HADOOP-19733 before it.

With fs.s3a.classloader.isolation set to false in a Spark application, it was still impossible to load a credentials provider class from the Spark application jar.

fs.s3a.classloader.isolation works by saving a reference to the intended classloader in the Configuration.

However, loading credentials providers goes through S3AUtils#getInstanceFromReflection, which always used the classloader that loaded S3AUtils. It should use Configuration's classloader.

How was this patch tested?

Unit tests in org.apache.hadoop.fs.s3a.ITestS3AFileSystemIsolatedClassloader.

Manual testing in a Spark application.

For code changes:

  • [x] Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
  • [x] 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?

brandonvin avatar Oct 23 '25 04:10 brandonvin

:broken_heart: -1 overall

Vote Subsystem Runtime Logfile Comment
+0 :ok: reexec 0m 20s Docker mode activated.
_ Prechecks _
+1 :green_heart: dupname 0m 0s No case conflicting files found.
+0 :ok: codespell 0m 0s codespell was not available.
+0 :ok: detsecrets 0m 0s 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 24m 19s trunk passed
+1 :green_heart: compile 0m 24s trunk passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 :green_heart: compile 0m 24s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 :green_heart: checkstyle 0m 20s trunk passed
+1 :green_heart: mvnsite 0m 30s trunk passed
+1 :green_heart: javadoc 0m 25s trunk passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 :green_heart: javadoc 0m 18s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
-1 :x: spotbugs 0m 47s /branch-spotbugs-hadoop-tools_hadoop-aws-warnings.html hadoop-tools/hadoop-aws in trunk has 188 extant spotbugs warnings.
+1 :green_heart: shadedclient 14m 51s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 :green_heart: mvninstall 0m 21s the patch passed
+1 :green_heart: compile 0m 20s the patch passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 :green_heart: javac 0m 20s the patch passed
+1 :green_heart: compile 0m 20s the patch passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 :green_heart: javac 0m 20s the patch passed
+1 :green_heart: blanks 0m 0s The patch has no blanks issues.
-0 :warning: checkstyle 0m 11s /results-checkstyle-hadoop-tools_hadoop-aws.txt hadoop-tools/hadoop-aws: The patch generated 31 new + 4 unchanged - 0 fixed = 35 total (was 4)
+1 :green_heart: mvnsite 0m 21s the patch passed
+1 :green_heart: javadoc 0m 16s the patch passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 :green_heart: javadoc 0m 15s the patch passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
-1 :x: spotbugs 0m 47s /new-spotbugs-hadoop-tools_hadoop-aws.html hadoop-tools/hadoop-aws generated 2 new + 188 unchanged - 0 fixed = 190 total (was 188)
+1 :green_heart: shadedclient 15m 9s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 :x: unit 1m 57s /patch-unit-hadoop-tools_hadoop-aws.txt hadoop-aws in the patch passed.
+1 :green_heart: asflicense 0m 19s The patch does not generate ASF License warnings.
63m 28s
Reason Tests
SpotBugs module:hadoop-tools/hadoop-aws
Nullcheck of conf at line 655 of value previously dereferenced in org.apache.hadoop.fs.s3a.S3AUtils.getInstanceFromReflection(String, Configuration, URI, Class, String, String) At S3AUtils.java:655 of value previously dereferenced in org.apache.hadoop.fs.s3a.S3AUtils.getInstanceFromReflection(String, Configuration, URI, Class, String, String) At S3AUtils.java:[line 645]
Non-virtual method call in org.apache.hadoop.fs.s3a.auth.SignerFactory.createSigner(String, String) passes null for non-null parameter of org.apache.hadoop.fs.s3a.S3AUtils.getInstanceFromReflection(String, Configuration, URI, Class, String, String) At SignerFactory.java:String) passes null for non-null parameter of org.apache.hadoop.fs.s3a.S3AUtils.getInstanceFromReflection(String, Configuration, URI, Class, String, String) At SignerFactory.java:[line 125]
Failed junit tests hadoop.fs.s3a.auth.TestSignerManager
Subsystem Report/Notes
Docker ClientAPI=1.51 ServerAPI=1.51 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8048/1/artifact/out/Dockerfile
GITHUB PR https://github.com/apache/hadoop/pull/8048
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 573c49df2825 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 032c335082f24aef12ee3e002ae1cfd9c5f40507
Default Java Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8048/1/testReport/
Max. process+thread count 610 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-aws U: hadoop-tools/hadoop-aws
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8048/1/console
versions git=2.25.1 maven=3.9.11 spotbugs=4.9.7
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

hadoop-yetus avatar Oct 23 '25 05:10 hadoop-yetus

:broken_heart: -1 overall

Vote Subsystem Runtime Logfile Comment
+0 :ok: reexec 0m 21s 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 25m 39s trunk passed
+1 :green_heart: compile 0m 23s trunk passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 :green_heart: compile 0m 24s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 :green_heart: checkstyle 0m 17s trunk passed
+1 :green_heart: mvnsite 0m 27s trunk passed
+1 :green_heart: javadoc 0m 23s trunk passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 :green_heart: javadoc 0m 19s trunk passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
-1 :x: spotbugs 0m 47s /branch-spotbugs-hadoop-tools_hadoop-aws-warnings.html hadoop-tools/hadoop-aws in trunk has 188 extant spotbugs warnings.
+1 :green_heart: shadedclient 14m 50s branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 :green_heart: mvninstall 0m 21s the patch passed
+1 :green_heart: compile 0m 20s the patch passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 :green_heart: javac 0m 20s the patch passed
+1 :green_heart: compile 0m 23s the patch passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
+1 :green_heart: javac 0m 23s the patch passed
+1 :green_heart: blanks 0m 0s The patch has no blanks issues.
-0 :warning: checkstyle 0m 10s /results-checkstyle-hadoop-tools_hadoop-aws.txt hadoop-tools/hadoop-aws: The patch generated 12 new + 4 unchanged - 0 fixed = 16 total (was 4)
+1 :green_heart: mvnsite 0m 23s the patch passed
+1 :green_heart: javadoc 0m 16s the patch passed with JDK Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04
+1 :green_heart: javadoc 0m 15s the patch passed with JDK Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
-1 :x: spotbugs 0m 46s /new-spotbugs-hadoop-tools_hadoop-aws.html hadoop-tools/hadoop-aws generated 2 new + 188 unchanged - 0 fixed = 190 total (was 188)
+1 :green_heart: shadedclient 14m 2s patch has no errors when building and testing our client artifacts.
_ Other Tests _
-1 :x: unit 2m 0s /patch-unit-hadoop-tools_hadoop-aws.txt hadoop-aws in the patch passed.
+1 :green_heart: asflicense 0m 20s The patch does not generate ASF License warnings.
63m 47s
Reason Tests
SpotBugs module:hadoop-tools/hadoop-aws
Nullcheck of conf at line 655 of value previously dereferenced in org.apache.hadoop.fs.s3a.S3AUtils.getInstanceFromReflection(String, Configuration, URI, Class, String, String) At S3AUtils.java:655 of value previously dereferenced in org.apache.hadoop.fs.s3a.S3AUtils.getInstanceFromReflection(String, Configuration, URI, Class, String, String) At S3AUtils.java:[line 645]
Non-virtual method call in org.apache.hadoop.fs.s3a.auth.SignerFactory.createSigner(String, String) passes null for non-null parameter of org.apache.hadoop.fs.s3a.S3AUtils.getInstanceFromReflection(String, Configuration, URI, Class, String, String) At SignerFactory.java:String) passes null for non-null parameter of org.apache.hadoop.fs.s3a.S3AUtils.getInstanceFromReflection(String, Configuration, URI, Class, String, String) At SignerFactory.java:[line 125]
Failed junit tests hadoop.fs.s3a.auth.TestSignerManager
Subsystem Report/Notes
Docker ClientAPI=1.51 ServerAPI=1.51 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8048/2/artifact/out/Dockerfile
GITHUB PR https://github.com/apache/hadoop/pull/8048
Optional Tests dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets
uname Linux 55f7cbac0d20 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/bin/hadoop.sh
git revision trunk / 249aef5213fa039d252e7f7ae03c060b6c87d94f
Default Java Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
Multi-JDK versions /usr/lib/jvm/java-21-openjdk-amd64:Ubuntu-21.0.7+6-Ubuntu-0ubuntu120.04 /usr/lib/jvm/java-17-openjdk-amd64:Ubuntu-17.0.15+6-Ubuntu-0ubuntu120.04
Test Results https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8048/2/testReport/
Max. process+thread count 616 (vs. ulimit of 5500)
modules C: hadoop-tools/hadoop-aws U: hadoop-tools/hadoop-aws
Console output https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-8048/2/console
versions git=2.25.1 maven=3.9.11 spotbugs=4.9.7
Powered by Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

hadoop-yetus avatar Oct 23 '25 05:10 hadoop-yetus