I don't think this is provided out of the box, but you can use toSeq on
your Iterable and if the Iterable is lazy, it should stay that way for the
Seq.
And then you can use sc.parallelize(my-iterable.toSeq) so you'll have your
RDD.

For the Iterable[Iterable[T]] you can flatten it and then create your RDD
from the corresponding Iterable.

Regards,

Olivier.


2014-10-21 5:07 GMT+02:00 Dai, Kevin <[email protected]>:

>  In addition, how to convert Iterable[Iterable[T]] to RDD[T]
>
>
>
> Thanks,
>
> Kevin.
>
>
>
> *From:* Dai, Kevin [mailto:[email protected]]
> *Sent:* 2014年10月21日 10:58
> *To:* [email protected]
> *Subject:* Convert Iterable to RDD
>
>
>
> Hi, All
>
>
>
> Is there any way to convert iterable to RDD?
>
>
>
> Thanks,
>
> Kevin.
>

Reply via email to