Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-18115

Custom metrics Sink/Source prevent Executor from starting

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Incomplete
    • 1.6.0
    • None
    • Spark Core

    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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            omnomnom Kostya Golikov
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: