You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/05/04 20:44:00 UTC
[jira] [Commented] (HADOOP-19833) fs.s3a.classloader.isolation=false configuration does not work - classloader not retrieved from Configuration object
[ https://issues.apache.org/jira/browse/HADOOP-19833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18078293#comment-18078293 ]
ASF GitHub Bot commented on HADOOP-19833:
-----------------------------------------
ajfabbri commented on code in PR #8303:
URL: https://github.com/apache/hadoop/pull/8303#discussion_r3184397078
##########
hadoop-tools/hadoop-aws/src/test/java/org/apache/hadoop/fs/s3a/ITestS3AFileSystemIsolatedClassloader.java:
##########
@@ -205,4 +205,29 @@ public void notIsolatedClassloader() throws IOException {
.isInstanceOf(CustomCredentialsProvider.class);
});
}
+
+ /**
+ * HADOOP-19833: When isolation=false, getInstanceFromReflection must use
+ * the context classloader (or conf's classloader) so that classes from the
+ * application classpath can be loaded. This test calls getInstanceFromReflection
+ * directly with isolation=false and verifies the custom class is instantiated.
+ */
+ @Test
+ public void testGetInstanceFromReflectionWithIsolationFalse() throws Exception {
Review Comment:
This PR currently only adds a test--it doesn't include any production logic changes. Please clarify if this is supposed to be a bug fix or not, and update the description of the PR and JIRA accordingly.
> fs.s3a.classloader.isolation=false configuration does not work - classloader not retrieved from Configuration object
> --------------------------------------------------------------------------------------------------------------------
>
> Key: HADOOP-19833
> URL: https://issues.apache.org/jira/browse/HADOOP-19833
> Project: Hadoop Common
> Issue Type: Bug
> Affects Versions: 3.4.0, 3.5.0, 3.4.1, 3.4.2, 3.4.3, 3.4.4, 3.5.1
> Reporter: Yunzhao Yang
> Priority: Minor
> Labels: pull-request-available
> Fix For: 3.4.0, 3.4.1, 3.4.2, 3.4.3, 3.4.4, 3.5.1
>
>
> The configuration {{fs.s3a.classloader.isolation=false (introduced from https://issues.apache.org/jira/browse/HADOOP-18993)}} does not work as intended. While the configuration is correctly set in the Hadoop Configuration object, the S3A classloader is never retrieved from the Hadoop Configuration object, resulting in classloader isolation always being enabled regardless of the {{fs.s3a.classloader.isolation}} value.
>
> The bug occurs in two steps:
> *Configuration is set correctly* - The isolation flag is properly stored in the Hadoop Configuration object. Code link: [https://github.com/apache/hadoop/blob/release-3.5.0-RC0/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AUtils.java#L1756]
> *Classloader is not retrieved from Configuration* - When creating instances, the classloader is not read from the Configuration object, instead it is always using the S3AUtils's classloader. Code link: [https://github.com/apache/hadoop/blob/release-3.5.0-RC0/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AUtils.java#L660]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org