spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Walrus theCat <walrusthe...@gmail.com>
Subject Re: interleave partitions?
Date Wed, 26 Mar 2014 19:02:22 GMT
Answering my own question here.  This may not be efficient, but this is
what I came up with:

rdd1.coalesce(N).glom.zip(rdd2.coalesce(N).glom).map { case(x,y) => x++y}


On Wed, Mar 26, 2014 at 11:11 AM, Walrus theCat <walrusthecat@gmail.com>wrote:

> Hi,
>
> I want to do something like this:
>
> rdd3 = rdd1.coalesce(N).partitions.zip(rdd2.coalesce(N).partitions)
>
> I realize the above will get me something like
> Array[(partition,partition)].
>
> I hope you see what I'm going for here -- any tips on how to accomplish
> this?
>
> Thanks
>

Mime
View raw message