https://github.com/apache/spark
Revision c7fd233e906f5df28ceb15aeadcd2d7267d04da5 authored by Ajith on 26 March 2019, 00:07:30 UTC, committed by Sean Owen on 26 March 2019, 00:07:51 UTC
## What changes were proposed in this pull request?

As per https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html
``Class loaders that support concurrent loading of classes are known as parallel capable class loaders and are required to register themselves at their class initialization time by invoking the ClassLoader.registerAsParallelCapable method. Note that the ClassLoader class is registered as parallel capable by default. However, its subclasses still need to register themselves if they are parallel capable. ``
 i.e we can have finer class loading locks by registering classloaders as parallel capable.  (Refer to deadlock due to macro lock  https://issues.apache.org/jira/browse/SPARK-26961).
All the classloaders we have are wrapper of URLClassLoader which by itself is parallel capable.
But this cannot be achieved by scala code due to static registration Refer https://github.com/scala/bug/issues/11429

## How was this patch tested?

All Existing UT must pass

Closes #24126 from ajithme/driverlock.

Authored-by: Ajith <ajith2489@gmail.com>
Signed-off-by: Sean Owen <sean.owen@databricks.com>
(cherry picked from commit b61dce23d2ee7ca95770bc7c390029aae8c65f7e)
Signed-off-by: Sean Owen <sean.owen@databricks.com>
1 parent 6e4cd88
History
Tip revision: c7fd233e906f5df28ceb15aeadcd2d7267d04da5 authored by Ajith on 26 March 2019, 00:07:30 UTC
[SPARK-26961][CORE] Enable parallel classloading capability
Tip revision: c7fd233

README.md

back to top