Hi,

On Wed, Jan 7, 2015 at 11:13 AM, Riginos Samaras <samarasrigi...@gmail.com>
wrote:

> exactly thats what I'm looking for, my code is like this:
> //code
>
> val users_map = users_file.map{ s =>
>
> val parts = s.split(",")
>
> (parts(0).toInt, parts(1))
>
> }.distinct
>
> //code
>
>
> but i get the error:
>
> error: value toMap is not a member of org.apache.spark.rdd.RDD[(Int,
> String)]
>
>               user_map.toMap
>
If you want to distribute the Map as a broadcast variable, it must not be
an RDD but a normal Scala map. Make your users_file a regular List, then it
should work.

Tobias

Reply via email to