Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. val a = sc.textFile("/user/cts367689/datagen.txt")
  2.  
  3. val b = a.map(x => (x.split(",")(0),x.split(",")(2),x.split(4))))
  4.  
  5. val c = b.filter(x => (x._3.toInt > 500))
  6.  
  7. c.foreach(x => println(x))
  8.  
  9. c.foreach {x => {println(x)}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement