What is the computation you are doing in the foreachRDD, that is throwing
the exception?
One way to guard against is to do a take(1) to see if you get back any
data. If there is none, then don't do anything with the RDD.

TD

On Wed, Apr 8, 2015 at 1:08 PM, Vadim Bichutskiy <vadim.bichuts...@gmail.com
> wrote:

> When I call *transform* or *foreachRDD *on* DStream*, I keep getting an
> error that I have an empty RDD, which make sense since my batch interval
> maybe smaller than the rate at which new data are coming in. How to guard
> against it?
>
> Thanks,
> Vadim
> ᐧ
>

Reply via email to