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

UnionDStream stream should express the requirements in the same way as TransformedDStream

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 1.2.0
    • Component/s: DStreams
    • Labels:
      None

      Description

      In class TransformedDStream:
      require(parents.length > 0, "List of DStreams to transform is empty")
      require(parents.map(_.ssc).distinct.size == 1, "Some of the DStreams have different contexts")
      require(parents.map(_.slideDuration).distinct.size == 1,
      "Some of the DStreams have different slide durations")

      In class UnionDStream:
      if (parents.length == 0)

      { throw new IllegalArgumentException("Empty array of parents") }

      if (parents.map(_.ssc).distinct.size > 1)

      { throw new IllegalArgumentException("Array of parents have different StreamingContexts") }

      if (parents.map(_.slideDuration).distinct.size > 1)

      { throw new IllegalArgumentException("Array of parents have different slide times") }

      The function is the same, but the realization is not. I think they shoule be the same.

        Attachments

          Activity

            People

            • Assignee:
              tdas Tathagata Das
              Reporter:
              waterman Yadong Qi
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: