flink source code compilation

 

 

1、
安装准备:
[root@master flink-dist]# mvn --version
Apache Maven 3.2.5
[root@master flink-dist]# scala -version
Scala code runner version 2.12.6 --
[root@master flink-dist]# python -V
Python 2.7.5
[root@master git]# /usr/local/git/bin/git version
git version 2.8.4
[root@master git]# pip -V
pip 19.3.1 from /usr/lib/python2.7/site-packages/pip (python 2.7)

2, download the source code

CD / usr / local / Git / bin / Git
// download the source code
/ usr / local / git / bin / git clone https://github.com/apache/flink.git

Note: After downloading the source code project in git commands under the current directory (the directory name flink).


1.9 // pulling branch
CD Flink; Git-FETCH Origin Release 1.9
Git 1.9 Origin Checkout -b-Release / Release 1.9-
// construct binary distribution
mvn clean install -DskipTests -Dfas

Pit 1: compilation process there will be three jar package can not be found, and a related flink-examples of oss. Temporarily comment out in pom.xml.

Pit 2: Compile error may occur when the following compile command in the sub-project, and then compile the total project, there may be multiple sub-projects were required to manually compile
this example, the sub-item refers to / usr / local / git / bin / flink / flink-libraries / flink- cep

cd /usr/local/git/bin/flink/flink-libraries/flink-cep
mvn clean install -DskipTests -Dfas

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.0.0:single (opt) on project flink-dist_2.11:
Failed to create assembly: Error adding file to archive: /usr/local/git/bin/flink/flink-dist/../flink-libraries/flink-cep/target/flink-cep_2.11-1.9-SNAPSHOT.jar -> [Help 1]

Guess you like

Origin www.cnblogs.com/bjxdd/p/12128832.html