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

Fix multiple small bugs in JsonProtocol, impacting StorageLevel and Task/Executor resource requests

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0
    • 3.4.0
    • Spark Core, Web UI
    • None

    Description

      While working on SPARK-39489, I spotted three pre-existing bugs in JsonProtocol:

      • TaskResourceRequest loses precision for values < 0.5. The amount is a floating point number which is either between 0 and 0.5 or is a positive integer, but the read path assumes it is an integer.
      • ExecutorResourceRequest integer overflows for values larger than an integer because the write path writes longs but the read path assumes integers.
      • The OFF_HEAP storage level is not handled properly: the offHeap field isn't included in the JSON, so this StorageLevel cannot be round-tripped through JSON. This could cause the History Server to display inaccurate "off heap memory used" stats on the executors page.

      I'm submitting a separate PR to fix those issues.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: