Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions hadoop-ozone/common/src/main/bin/ozone-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,8 @@ else
exit 1
fi

# HADOOP_OZONE_DELEGATED_CLASSES defines a list of classes which will be loaded by default
# class loader of application instead of isolated class loader. With this way we can solve
# incompatible problem when using hadoop3.x + ozone with older hadoop version.
#export HADOOP_OZONE_DELEGATED_CLASSES=
Copy link
Contributor

@xiaoyuyao xiaoyuyao Jun 12, 2019

Choose a reason for hiding this comment

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

This may not work because we expect to expose an environment variable but the code in FilteredClassLoader only load a system property.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see.


Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

this.delegate = parent;
systemClassLoader = getSystemClassLoader();

Expand Down