[ https://issues.apache.org/jira/browse/HUDI-2321?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Danny Chen updated HUDI-2321: ----------------------------- Description: Based on the discussion on stackoverflow: https://stackoverflow.com/questions/1771679/difference-between-threads-context-class-loader-and-normal-classloader The {{Thread.currentThread().getContextClassLoader()}} should never be used because the context classloader is not immutable, user can overwrite it when thread switches, it is also nullable. The objection here: https://stackoverflow.com/a/36228195 says the the {Thread.currentThread().getContextClassLoader()}} is a JDK design error and the context classloader is never suggested to be used. The API that needs classloader should ask the user to set up the right classloader. was:Fix ClassLoader error due to HoodieConfig$setDefaults() method call reflection. > Use the caller classloader for ReflectionUtils > ---------------------------------------------- > > Key: HUDI-2321 > URL: https://issues.apache.org/jira/browse/HUDI-2321 > Project: Apache Hudi > Issue Type: Bug > Components: configs > Reporter: Zheng yunhong > Priority: Major > Labels: pull-request-available > Fix For: 0.10.0 > > > Based on the discussion on stackoverflow: > https://stackoverflow.com/questions/1771679/difference-between-threads-context-class-loader-and-normal-classloader > The {{Thread.currentThread().getContextClassLoader()}} should never be used > because the context classloader is not immutable, user can overwrite it when > thread switches, it is also nullable. > The objection here: https://stackoverflow.com/a/36228195 says the the > {Thread.currentThread().getContextClassLoader()}} is a JDK design error and > the context classloader is never suggested to be used. The API that needs > classloader should ask the user to set up the right classloader. -- This message was sent by Atlassian Jira (v8.3.4#803005)