[ 
https://issues.apache.org/jira/browse/HADOOP-18993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17813956#comment-17813956
 ] 

ASF GitHub Bot commented on HADOOP-18993:
-----------------------------------------

steveloughran commented on code in PR #6301:
URL: https://github.com/apache/hadoop/pull/6301#discussion_r1477078046


##########
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AUtils.java:
##########
@@ -1670,4 +1670,25 @@ public static String formatRange(long rangeStart, long 
rangeEnd) {
     return String.format("bytes=%d-%d", rangeStart, rangeEnd);
   }
 
+
+  /**
+   * If classloader isolation is {@code true}
+   * (through {@link Constants#AWS_S3_CLASSLOADER_ISOLATION}) or not
+   * explicitly set, then the classLoader of the input configuration object
+   * will be set to the input classloader, otherwise nothing will happen.
+   * @param conf configuration object.
+   * @param classLoader isolated classLoader.
+   */
+  static void isolateClassloader(Configuration conf, ClassLoader classLoader) {

Review Comment:
   let's rename this "maybeIsolateClassloader" to make clear it is conditional.
   





> Allow to not isolate S3AFileSystem classloader when needed
> ----------------------------------------------------------
>
>                 Key: HADOOP-18993
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18993
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: hadoop-thirdparty
>    Affects Versions: 3.3.6
>            Reporter: Antonio Murgia
>            Priority: Minor
>              Labels: pull-request-available
>
> In HADOOP-17372 the S3AFileSystem forces the configuration classloader to be 
> the same as the one that loaded S3AFileSystem. This leads to the 
> impossibility in Spark applications to load third party credentials providers 
> as user jars.
> I propose to add a configuration key 
> {{fs.s3a.extensions.isolated.classloader}} with a default value of {{true}} 
> that if set to {{false}} will not perform the classloader set.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to