val s = sc.parallelize(Array("foo", "bar", "baz"))

val c = s.flatMap(_.toIterator)

c.collect()
res8: Array[Char] = Array(f, o, o, b, a, r, b, a, z)

On Thu, Mar 19, 2015 at 8:46 AM, Michael Lewis <lewi...@me.com> wrote:
> Hi,
>
> I’m struggling to think of the best way to read a text file into an RDD[Char] 
> rather than [String]
>
> I can do:
>
> sc.textFile(….)  which gives me the Rdd[String],
>
> Can anyone suggest the most efficient way to create the RDD[Char] ? I’m sure 
> I’ve missed something simple…
>
> Regards,
> Mike
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
> For additional commands, e-mail: user-h...@spark.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org

Reply via email to