Using IntelliJ idea to write Scala running in spark

Source: Internet
Author: User

Write a test code using Scala:

Object= {println ("helloWorld")      }}

Consider this test as a class, the project organization structure such as:

Then set the compile options:

The compiled jar package can then be found under the project folder:

Copied to the directory specified by Spark (built by yourself):

Start Spark, and then submit the task:

Spark-submit--class Test--master Spark://Localhost:7077/home/data/myjar/hello.jar

You can see the output information of execution from the console above, and we can also view the task information in the Web Manager:

The next thing left is to write the Scala program to implement its own algorithm.

Using IntelliJ idea to write Scala running in spark

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.