I am trying to use wholeTextFiles
of spark to read the directory, my file RDD contains (String,String)
where first String
is my filename and second my contents of the file.
I want to map this RDD to another one with just the contents of my file, how can I do it?
Thanks!
val file = sc.wholeTextFiles("./Desktop/093")
file.first
res0: (String, String) =
(file:/Users/Desktop/093/nc-no-na.clusters.093.001.txt,"199 197 5 5 168 0 0.932125 11101111000000110100000000000000000000000000001010100000011100001000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001101101111100000000000000000011100000000000000000000000000100000111011000000000000000000000000000000000000000000000000000000000000000011110010111001001110000000011100000000010000000000000000000000000010000000000000000000000000000000000000000011111111111101010111000000000000000000000000000000000000000000000000000000000000000001100000000000000000000000000000000000000000101110101110101011010000000000000000001100001100000011110000000000000000000011111011110011100...