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 <[email protected]> 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: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
