flink1.12在ubuntu下面的編譯記錄(轉載+自己整理+最終失敗)

git clone https://gitee.com/fastsource/flink

如何判斷當前版本是什麼型號呢?

看各種jar包的後綴名,如果是1.12就表示最新版本號是1.12了

flink-streaming-java_2.11-1.12-SNAPSHOT.jar

 

/home/appleyuchi/桌面/flink的配置實驗/flink/flink-runtime-web/pom.xml中

原來的 改成
<arguments>ci --cache-max=0 --no-save</arguments> install -g -registry=https://registry.npm.taobao.org --cache-max=0 --no-save

 

終端運行:

$ npm config set registry http://registry.npm.taobao.org/

$ mvn clean install -T 2C  -DskipTests -Dskip.npm -Dmaven.compile.fork=true

根據釘釘羣裏面的說法,flink編譯的時候是使用自帶的一個獨立的環境.

所以-Dskip.npm是用來防止本地nodejs/npm環境干擾的.

-T 2C的意思是機器開啓超線程工作.(我的電腦是四核八線程)

-Dmaven.compile.fork=true的意思是多核編譯.

到底是2C,1.5C還是1C在不同參考資料上有不通說法,下面進行實測,到底哪個快?

 

使用命令 耗時
mvn clean install -T 1C -DskipTests -Dskip.npm -Dmaven.compile.fork=true Total time: 15:54 min (Wall Clock)
mvn clean install -T 1.5C  -DskipTests -Dskip.npm -Dmaven.compile.fork=true Total time: 15:30 min (Wall Clock)
mvn clean install -T 2C  -DskipTests -Dskip.npm -Dmaven.compile.fork=true Total time: 13:52 min (Wall Clock)

注意:

多核優勢只能在編譯部分(CPU密集)發揮,

並不能在下載依賴部分(CPU I/O)發揮

上述評測是基於之前第一次已經下載過依賴包,所以能大大節省依賴部分消耗的時間

 

Wall Clock的含義可以參考[1]

測試過程中可以看到CPU佔有率:

 

編譯後發現webui不能打開,JIRA上被告知是不能有Dskip.npm

 

 

 

 

遇到下面的報錯

[ERROR] Node.js version v10.9.0 detected.
[ERROR] The Angular CLI requires a minimum Node.js version of either v10.13 or v12.0.

[ERROR] 
[ERROR] Please update your Node.js version or visit https://nodejs.org/ for additional instructions.
[ERROR] 
[ERROR] Aborted (core dumped)
[INFO] /home/appleyuchi/桌面/Flink超線程測試/flink/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/Lockable.java: Some input files use or override a deprecated API.
[ERROR] npm ERR! code ELIFECYCLE
[ERROR] npm ERR! errno 134
[ERROR] npm ERR! [email protected] build: `ng build --prod --base-href ./`
[ERROR] npm ERR! Exit status 134
[ERROR] npm ERR! 
[ERROR] npm ERR! Failed at the [email protected] build script.
[ERROR] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[INFO] /home/appleyuchi/桌面/Flink超線程測試/flink/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/sharedbuffer/Lockable.java: Recompile with -Xlint:deprecation for details.
[INFO] /home/appleyuchi/桌面/Flink超線程測試/flink/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java: Some input files use unchecked or unsafe operations.
[INFO] /home/appleyuchi/桌面/Flink超線程測試/flink/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java: Recompile with -Xlint:unchecked for details.
[INFO] 
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ flink-cep_2.11 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 57 resources
[INFO] Copying 3 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ flink-cep_2.11 ---
[ERROR] 
[ERROR] npm ERR! A complete log of this run can be found in:
[ERROR] npm ERR!     /home/appleyuchi/.npm/_logs/2020-06-15T06_16_37_162Z-debug.log
[INFO] ------------------------------------------------------------------------[ERROR] npm ERR! A complete log of this run can be found in:
[ERROR] npm ERR!     /home/appleyuchi/.npm/_logs/2020-06-15T06_16_37_162Z-debug.log
[INFO] ------------------------------------------------------------------------

根據[2]查詢v10.9.0對應的angular版本爲8.3.25

nvm install v10.9.0

切換到10.9.0版本

npm install -g @angular/[email protected]無法安裝core dumped

上面流程總共JIRA+釘釘騷擾了阿里四個人,總算是跑通了,反正騷擾一下總是可以的,恩.

 

Reference:

[1]CPU time與WALL time

[2]Is there a compatibility list for Angular / Angular-CLI and Node.js?

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章