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

Rename trackStateByKey to mapWithState

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.6.0
    • Component/s: DStreams
    • Labels:
      None

      Description

      Based on feedback from early users and personal experience attempting to explain it, the name trackStateByKey had two problem.

      • "trackState" is a completely new term which really does not give any intuition on what the operation is
      • the resultant data stream of objects returned by the function is called in docs as the "emitted" data for the lack of a better.

      "mapWithState" makes sense because the API is like a mapping function like (Key, Value) => T with State as an additional parameter. The resultant data stream is "mapped data". So both problems are solved.

        Attachments

          Activity

            People

            • Assignee:
              tdas Tathagata Das
              Reporter:
              tdas Tathagata Das
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: