xiaoyuyao commented on a change in pull request #942: HDDS-1587. Support
dynamically adding delegated classes from to isolated class loader.
URL: https://github.com/apache/hadoop/pull/942#discussion_r292721104
##########
File path:
hadoop-ozone/ozonefs/src/main/java/org/apache/hadoop/fs/ozone/FilteredClassLoader.java
##########
@@ -57,6 +57,12 @@ public FilteredClassLoader(URL[] urls, ClassLoader parent) {
delegatedClasses.add("org.apache.hadoop.fs.ozone.OzoneFSStorageStatistics");
delegatedClasses.add("org.apache.hadoop.fs.ozone.Statistic");
delegatedClasses.add("org.apache.hadoop.fs.Seekable");
+ String[] dynamicDelegatedClasses =
+ System.getProperty("HADOOP_OZONE_DELEGATED_CLASSES").split(";");
+ for (String delegatedClass : dynamicDelegatedClasses) {
+ delegatedClasses.add(delegatedClass);
+ }
Review comment:
You can replace the code L60-64 with
delegatedClasses.addAll(
getTrimmedStringCollection(System.getenv("HADOOP_OZONE_DELEGATED_CLASSES")));
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]