daily pastebin goal
92%
SHARE
TWEET

Untitled

a guest Nov 24th, 2017 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. val orders = sc.textFile("/public/retail_db/orders")
  2.  
  3. // Previewing data
  4. orders.first
  5. orders.take(10).foreach(println)
  6. orders.count
  7.  
  8. // Use collect with care.
  9. // As it creates single threaded list from distributed RDD,
  10. // using collect on larger datasets can cause out of memory issues.
  11. orders.collect.foreach(println)
RAW Paste Data
Top