SHARE
TWEET

Untitled

deflorator1980 Nov 10th, 2017 170 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. object Parsing {
  2.   def main(args: Array[String]) {
  3.         val sc = new SparkContext(new SparkConf().setAppName("Book").setMaster("local[4]"))
  4.         sc.textFile("README_SPARK.md").flatMap(l => l.split(" ")).map(w => (w, 1)).reduceByKey(_+_).map(p => p.swap).sortByKey(false).take(5).foreach(println)
  5.   }
  6. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top