flink原始碼編譯(windows環境)
前言
最新開始搗鼓flink,fucking the code之前,編譯是第一步。
編譯環境
win7 java maven
編譯步驟
https://ci.apache.org/projects/flink/flink-docs-release-1.6/start/building.html 官方文件搞起,如下:
Building Flink from Source
This page covers how to build Flink 1.6.1 from sources.
Build Flink
In addition you need Maven 3 and a JDK (Java Development Kit). Flink requires at least Java 8 to build.
NOTE: Maven 3.3.x can build Flink, but will not properly shade away certain dependencies. Maven 3.2.5 creates the libraries properly. To build unit tests use Java 8u51 or above to prevent failures in unit tests that use the PowerMock runner.
To clone from git, enter:
git clone https://github.com/apache/flink
The simplest way of building Flink is by running:
mvn clean install -DskipTests
This instructs Maven (mvn
) to first remove all existing builds (clean
) and then create a new Flink binary (install
).
To speed up the build you can skip tests, QA plugins, and JavaDocs:
mvn clean install -DskipTests -Dfast
The default build adds a Flink-specific JAR for Hadoop 2, to allow using Flink with HDFS and YARN.
Dependency Shading
Flink shades away some of the libraries it uses, in order to avoid version clashes with user programs that use different versions of these libraries. Among the shaded libraries are Google Guava, Asm, Apache Curator, Apache HTTP Components, Netty, and others.
The dependency shading mechanism was recently changed in Maven and requires users to build Flink slightly differently, depending on their Maven version:
Maven 3.0.x, 3.1.x, and 3.2.x It is sufficient to call mvn clean install -DskipTests
in the root directory of Flink code base.
Maven 3.3.x The build has to be done in two steps: First in the base directory, then in the distribution project:
mvn clean install -DskipTests
cd flink-dist
mvn clean install
Note: To check your Maven version, run mvn --version
.
Hadoop Versions
Info Most users do not need to do this manually. The download page contains binary packages for common Hadoop versions.
Flink has dependencies to HDFS and YARN which are both dependencies from Apache Hadoop. There exist many different versions of Hadoop (from both the upstream project and the different Hadoop distributions). If you are using a wrong combination of versions, exceptions can occur.
Hadoop is only supported from version 2.4.0 upwards. You can also specify a specific Hadoop version to build against:
mvn clean install -DskipTests -Dhadoop.version=2.6.1
Vendor-specific Versions 指定hadoop發行商
To build Flink against a vendor specific Hadoop version, issue the following command:
mvn clean install -DskipTests -Pvendor-repos -Dhadoop.version=2.6.1-cdh5.0.0
The -Pvendor-repos
activates a Maven build profile that includes the repositories of popular Hadoop vendors such as Cloudera, Hortonworks, or MapR.
Scala Versions
Info Users that purely use the Java APIs and libraries can ignore this section.
Flink has APIs, libraries, and runtime modules written in Scala. Users of the Scala API and libraries may have to match the Scala version of Flink with the Scala version of their projects (because Scala is not strictly backwards compatible).
Flink 1.4 currently builds only with Scala version 2.11.
We are working on supporting Scala 2.12, but certain breaking changes in Scala 2.12 make this a more involved effort. Please check out this JIRA issue for updates.
Encrypted File Systems
If your home directory is encrypted you might encounter a java.io.IOException: File name too long
exception. Some encrypted file systems, like encfs used by Ubuntu, do not allow long filenames, which is the cause of this error.
The workaround is to add:
<args>
<arg>-Xmax-classfile-name</arg>
<arg>128</arg>
</args>
in the compiler configuration of the pom.xml
file of the module causing the error. For example, if the error appears in the flink-yarn
module, the above code should be added under the <configuration>
tag of scala-maven-plugin
. See this issue for more information.
編譯結果
相關推薦
flink原始碼編譯(windows環境)
前言 最新開始搗鼓flink,fucking the code之前,編譯是第一步。 編譯環境 win7 java maven 編譯步驟 https://ci.apache.org/projects/flink/flink-docs-release-1.6/start/building.html 官方文件
flink源碼編譯(windows環境)
git html instr written bsp fail -name rect app 前言 最新開始搗鼓flink,fucking the code之前,編譯是第一步。 編譯環境 win7 java maven 編譯步驟 https://ci.apache.org
FFmpeg安裝(windows環境)
學習 程序 編碼 j2e 質量 進行 ffplay 滿足 隨機數 ?FFmpeg是什麽? ?FFmpeg組成 ?下載工具 ?安裝FFmpeg ?應用到j2ee項目 前言:學習視頻編碼,一定要知道雷霄驊(leixiaohua1020)的專欄 ,偉大的程序員,26歲去世。雷霄
Spring整合Redis做數據緩存(Windows環境)
端口號 init 技術分享 factory redis-cli @service tab long 配置 當我們一個項目的數據量很大的時候,就需要做一些緩存機制來減輕數據庫的壓力,提升應用程序的性能,對於java項目來說,最常用的緩存組件有Redis、Ehcache和Mem
git 學習筆記三 (windows環境)
clas 環境 check pre div nbsp windows name cnblogs 分支管理 查看分支 git branch 創建dev分支 git branch <name> 切換到dev分支 git checkout <name&
Android studio中Terminal中使用git(Windows環境)
默認 clone fig android RM 發現 mage body image 因為之前用的是Mac Pro,現在公司使用的是PC機,這2種系統AS的terminal使用還是有點不一樣。 1、下載git,進行安裝(下載地址: http://git-scm.com/
Tomcat學習—Tomcat的簡介和目錄以及配置文件介紹(Windows環境)
系統 並發 manager htm 輕量級 管理 集群 web.xml 虛擬目錄 今天學習TOMCAT,主要學習的是Tomcat的目錄結構,配置文件!1:Tomcat簡介Tomcat 服務器是一個免費的開放源代碼的Web 應用服務器,屬於輕量級應用服務器,在中小型系統和並發
Lua Busted 單元測試簡介(Windows 環境)
簡介 本文目標是在 Windows 環境下使用 Busted 進行 Lua 單元測試。 Busted 是一款 BDD 風格的 Lua 單元測試框架,支援 TAP 風格輸出。 環境 Lua 5.3.5 LuaRocks 3.0.2 Microsoft W
Jenkins配置HTML報告(Windows環境)
1.首先安裝外掛HTML Publisher,點選直接安裝 2.在任務中配置,構建後操作,新增Publish HTML reports 3.新增完成後,新增一項 4.HTML directory to archive 配置為專案構建完成後生成的
jmeter+maven 的簡單使用 記錄(Windows環境)
1.手動建立maven工程目錄結構,maven對目錄結構要求比較嚴格(pom.xml檔案一定要放在根目錄下) Maven --src --main --test --jmeter
Flask 安裝 (windows環境)
前提: 1.已安裝python版本(一般都是2.X) 2.已安裝easy_install python安裝,記得配置Python的環境變數,例如:我的直接在Path上加 G:\Python 驗證安裝Python成功:cmd 輸入python 或者python -V &n
(Windows環境)Pycharm切換使用Python2和Python3
(Windows環境)Pycharm切換使用Python2和Python3 1.安裝Python3 2.安裝Python2 3.環境變數配置 4.其他設定 4.1python.exe名稱修改 4.2pi
一文讀懂如何用python呼叫matlab函式(windows環境)
第一步配置環境; 要安裝引擎 API,請在作業系統提示符下執行以下命令,其中 matlabroot 是 MATLAB 資料夾的路徑。您可能需要管理員許可權才能執行這些命令。或者,使用在非預設位置安裝用於 Python 的 MATLAB 引擎 API 
Apollo 配置詳細步驟(Windows環境)
一. 準備工作 1.下載 apollo 安裝包 下載連結:http://activemq.apache.org/apollo/download.html 2.下載 java JDK 安裝包 ( apollo 依賴 java 環境) 下載連結:
Mycat入門(Windows環境)
Mycat(Windows環境)(1) 初入門 Mycat 是SQL叢集中介軟體,基於阿里開源的Cobar產品而研發,Cobar的穩定性、可靠性、優秀的架構和效能 1. MyCat準備 安裝 mysql 安裝jdk 1.8
Github使用記錄(windows環境)
根據實際需要,需要將本地的專案放到github上; 首先在本地已有的專案下,用git bash命令進入,然後執行:ssh-keygen -t rsa -C "你的遠端git郵箱地址"; 執行完之後找到C:/User/使用者名稱/.ssh/資料夾,其中有兩個檔案,一個是id
【JMeter4.0】安裝及執行(windows環境)
安裝 JDK安裝及配置 安裝對應版本的java環境,配置好環境變數。 版本對應關係參考下表: JMeter版本 JDK版本 4.0 1.8 or 1.9 3.2/3.3 1.8+ 3.0/3.1 1.7+ JDK環境變數配置: “我的
Pycharm安裝教程(Windows環境)
引題 當我們開始學習if else時,當我們程式碼更加複雜的時候。python互動式命令列和sublime和windows命令列 寫程式碼和執行麻煩。我們想要一個多合一(好像瑞士軍刀)功能的工具。 整合開發工具 IDE (integrate Developmen
大眾點評 cat 專案訪問監控 部署(windows環境)
1、直接下載zip壓縮包 專案下載 : https://github.com/dianping/cat 需要本地執行cat專案,作為伺服器,在執行的伺服器中檢視客戶端(需要被監控的專案)的訪問情況。下載的專案解壓縮後 script目錄下有“Cat技術入門總結-0.1.0.
vlc原始碼編譯(Ubuntu12.04LTS)
1.安裝依賴庫 sudo apt-get install git libtool build-essential pkg-config autoconf sudo apt-get build-dep vlc 2.vlc原始碼下載及編譯 wget ftp://ftp.videolan.or