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

ASF GitHub Bot commented on HUDI-2321:
--------------------------------------

danny0405 commented on pull request #3505:
URL: https://github.com/apache/hudi/pull/3505#issuecomment-902383784


   Thanks @vinothchandar and @nsivabalan for the patience, this is a blocker 
for release 0.9 in my opinion.
   
   > ReflectionUtils.getClass() is used in many places in general.
   
   That is a bad news !!! It is risky to have wide range of use for the 
reflection, i have already fired 2 fix:
   1. 
https://github.com/apache/hudi/commit/ab2e0d0ba2697ba0750ec52fbb3b3a0187734a4b
   The reflection is not even thread safe for the underneath cache, a 
synchronized lock did solve the problem
   2. 
https://github.com/apache/hudi/commit/b7a0d76fc99144fc2eb223cda62ac9d67528c6a2
   The issue is actually caused by the ClassLoader, even though the 
`#setDefaults` is executed, if the `CACHED` class object comes from a different 
classloader, an NPE still throws.
   
   And this patch is intended to remove the `#setDefaults` from the 
configurations. In any case, there is no reason/not necessary to have wide 
range of use for the reflection for static configurations (comes from the 
static members). Any one can new the config from any thread and classloaders 
and the reflection `CACHE` does not really solve the conflicts.
   
   While this patch only fixes the cofiguration problem, there is risk for 
other code if the classloader changes unless HUDI supports explicit classloader.
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Fix ClassLoader error due to HoodieConfig$setDefaults() method call reflection
> ------------------------------------------------------------------------------
>
>                 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
>
>
> Fix ClassLoader error due to HoodieConfig$setDefaults() method call 
> reflection.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to