You can just call rdd.flatMap(_._2).collect

Get Outlook for Android<>

From: klrmowse <>
Sent: Saturday, April 7, 2018 1:29:34 PM
Subject: Re: [Spark 2.x Core] Adding to ArrayList inside rdd.foreach()

okie, well...

i'm working with a pair rdd <key, iterable(value)>

i need to extract the values and store them somehow (maybe a simple
Array??), which i later parallelize and reuse

since adding to a list is a no-no, what, if any, are the other options?
(Java Spark, btw)


Sent from:

To unsubscribe e-mail:

Reply via email to