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

Reconsider exposure of Json4s symbols in public ResourceInformation.toJson API

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.0
    • None
    • Spark Core
    • None

    Description

      Followup to discussion at https://github.com/apache/spark/pull/36885#discussion_r898644147

      Spark's `ResourceInformation` class exposes Json4s symbols in its public API (via the toJson method). 

      In the long run, I don't think that exposing third-party library symbols in our public APIs is a good idea. Perhaps we should make this API private or change it to require that users / implementors return an object which can be turned to JSON via Jackson ObjectMapper.

      In principle we still have some freedom to change this because the ResourceInformation class is marked as `@Evolving`

      I'm filing this ticket so that I can reference it in TODO code comments.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              joshrosen Josh Rosen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: