Thanks Saisai. That makes sense. Just seems redundant to have both. ᐧ On Mon, May 11, 2015 at 10:36 PM, Saisai Shao <sai.sai.s...@gmail.com> wrote:
> DStream.union can only union two DStream, one is itself. While > StreamingContext.union can union an array of DStreams, internally > DStream.union is a special case of StreamingContext.union: > > def union(that: DStream[T]): DStream[T] = new UnionDStream[T](Array(this, > that)) > > So there's no difference, if you want to union more than two DStreams, > just use the one in StreamingContext, otherwise, both two APIs are fine. > > > 2015-05-12 6:49 GMT+08:00 Vadim Bichutskiy <vadim.bichuts...@gmail.com>: > >> Can someone explain to me the difference between DStream union and >> StreamingContext union? >> When do you use one vs the other? >> >> Thanks, >> Vadim >> ᐧ >> > >