Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Incomplete
-
1.6.0
-
None
Description
Even though there is a semi-official support for custom metrics, in practice specifying either custom sink or custom source will lead to NoClassDefFound exceptions on executor side (but will be fine on driver side).
The initialization goes as:
1. CoarseGrainedExecutorBackend prepares SparkEnv for executor
2. SparkEnv initializes MetricSystem. In case of executor it also starts it
3. On `.start()` MetricsSystem parses configuration files and creates instances of sinks and sources. This is where the issue actually happens – it tries to instantiate classes which are not there yet – jars and files are downloaded downstream, in Executor
One of the possible solutions is to NOT start MetricSystem this fast, just like driver does, but postpone it until jar with user defined code is fetched and available on classpath.