bq. will return something like JavaPairRDD<Object, long>

The long component of the pair fits your description of index. What other
requirement does ZipWithIndex not provide you ?

Cheers

On Sun, Apr 12, 2015 at 1:16 PM, Jeetendra Gangele <gangele...@gmail.com>
wrote:

> Hi All I have an RDD JavaRDD<Object> and I want to convert it to
> JavaPairRDD<Index,Object>.. Index should be unique and it should maintain
> the order. For first object It should have 1 and then for second 2 like
> that.
>
> I tried using ZipWithIndex but it will return something like
> JavaPairRDD<Object, long>
> I wanted to use this RDD for lookup and join operation later in my
> workflow so ordering is important.
>
>
> Regards
> jeet
>

Reply via email to