lsyldliu commented on PR #20003:
URL: https://github.com/apache/flink/pull/20003#issuecomment-1161703624

   In product, one job may use multiple different udf jar,  so in your way, 
here will be multiple CL existing at the same time. In 
[FLIP-91](https://cwiki.apache.org/confluence/display/FLINK/FLIP-91%3A+Support+SQL+Gateway)
 & 
[FLIP-223](https://cwiki.apache.org/confluence/display/FLINK/FLIP-223%3A+Support+HiveServer2+Endpoint),
 community will introduce gateway component which is a long running service, 
and responsible for compile and submit sql, the gateway also need to use this 
MutableURLClassLoader to add jar dynamically. If we create a new CL when add a 
jar every time, as the time go, there likely have a CL leak due to classloader 
is not guaranteed to be closed.
   
   Spark & Hive both also `MutableURLClassLoader` which expose the `addURL` 
method to support Add Jar for hive server. In addition, Spark also use the 
`MutableURLClassLoader` in `Executor` to load dependent jar  of the job during 
distribution execution phase.


-- 
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: issues-unsubscr...@flink.apache.org

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

Reply via email to