apache/spark — pull request #3152 by watermen (2014-11-07 07:39:55+00:00)
Title: [SPARK-4294][Streaming] The same function should have the same realization

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.