9th Lesson Notes-Thorough combat INTELLIJ Spark program development under IDEA

Source: Internet
Author: User

The development of Spark program under the idea of complete combat IntelliJ
Download IntelliJ Idea
Download git
Spark source download: Git clone git://github.com/apache/spark.git
Import Maven Project

IntelliJ Idea Launch Wizard sacal download need to download, this is idea download, and the system layer is not the same
4. Specify jdk1.8.x and Scala2.10.4
5.file->project stucture To set up project Lib core is to add spark jar
6. Add Spark jar dependency, spark1.6.0-bin-hadop2.6.tgz Spark-assemblyu-1.6.0-hadoop2.6.0.jar

7. Create a Scala project and choose the Scala approach

Copy the code execution on eclipse yesterday, normal

AD Click Ranking
Rank processing: Wordcountordered=pairs.reducebykey (_+_). Map (pair=> (pair._2,pair._1)). Sortbykey (FALSE). Map (Pair=> ( pair._1,pair._2))
Reducebykey the same key totals, key and value are sorted after swapping, and then swapped back.
50 minutes

9th Lesson Notes-Thorough combat INTELLIJ Spark program development under IDEA

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.