Re: Best way to randomly distribute elements

2015-06-19 Thread abellet
qual weights. > Thank you > > > Himanshu > > > If you reply to this email, your message will be added to the discussion > below: > http://apache-spark-user-list.1001560.n3.nabble.com/Best-way-to-

Re: Best way to randomly distribute elements

2015-06-18 Thread Himanshu Mehra
elements. RDD.randomSplit(Array(0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, )) will create 10 partitions of randomly selected elements with equal weights. Thank you Himanshu -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/Best-way-to-randomly-distribute

Re: Best way to randomly distribute elements

2015-06-18 Thread ayan guha
with the current number of > partitions - but it seems to me that this moves only some of the elements, > and in a deterministic way. > > I know this will be an expensive operation but I only need to perform it > every once in a while. > > Thanks a lot! > > > > --

Re: Best way to randomly distribute elements

2015-06-18 Thread Guillaume Pitel
ery once in a while. Thanks a lot! -- View this message in context: http://apache-spark-user-list.1001560.n3.nabble.com/Best-way-to-randomly-distribute-elements-tp23391.html Sent from the Apache Spark User List mailing list archive at Na

Best way to randomly distribute elements

2015-06-18 Thread abellet
/Best-way-to-randomly-distribute-elements-tp23391.html Sent from the Apache Spark User List mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@spark.apache.org For additional commands, e-mail: user-h