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

Kryo - Support multiple user registrators

    XMLWordPrintableJSON

Details

    Description

      Background: Currently when users need to have a custom serializer for their registered classes, they use the user registrator of Kryo using the spark.kryo.registrator configuration parameter.

      Problem: If the Spark user is an infrastructure itself, it may receive multiple such registrators but won't be able to register them.

      Important note: Currently the single registrator supported can't reach any state/configuration (it is instantiated by reflection with empty constructor)

      Using SparkEnv from user code isn't acceptable.

      Workaround:
      Create a wrapper registrator as a user, and have its implementation scan the class path for multiple classes.
      Caveat: this is inefficient and too complicated.

      Suggested solution - support multiple registrators + stay backward compatible
      Option 1:
      enhance the value of spark.kryo.registrator to support a comma separated list for class names. This will be backward compatible and won't add new parameters.
      Option 2:
      to be more logical, add spark.kryo.registrators new parameter, while keeping the code handling the old one.

      Attachments

        Issue Links

          Activity

            People

              Rotem Shaul Rotem Shaul
              Rotem Shaul Rotem Shaul
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 72h
                  72h
                  Remaining:
                  Remaining Estimate - 72h
                  72h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified