Use SBT to compile Spark source in window environment

Source: Internet
Author: User

A few days ago with Maven compiled package spark, make the burn, all kinds of mistakes, endless, think is also drunk, so, in a different way, use SBT compile, see how the character!

First, download the spark source package from the website Spark website and extract it. I'm using the version 1.4.0 on this side.

Then, we need to put SBT configuration, configuration is very simple, is nothing more than sbt_home what, we can refer to the official website of the installation configuration manual.

In the command line mode of window to enter the spark source directory just extracted, we according to the official website prompt Command input:

sbt-pyarn-phadoop-2.3 Assembly

 

Then wait for the compilation to complete ...

Midway Error!!!

Look intently, Oh! It turns out that there is no git command, so I downloaded git from the GIT website and installed and configured the environment variables, which is also very simple.

Continue compiling, the mood is not good, so the command to play longer:

Sbt-pyarn-phadoop-2.6-phive-phive-thriftserver Assembly

A long waiting time ... Take a look at the authoritative guide to Hadoop ...

Failure, failure, and failure!

Back to the point of origin, and turned to maven. I found that Maven was prone to error when compiling the entire spark source code, and it was a bit of a hassle to find it. So, I decided to a small folder compiled, found that really can ah. Now compiling the Pom.xml in the small folder ...

Compile, talk about the root directory of the Pom.xml modification, delete unnecessary module, otherwise, MAVEN compile test time or error, just need to have the rest of the line.

  

Use SBT to compile Spark source in window environment

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.