編譯zeppelin0.9.0


  • 安裝 jdk (百度)
  • 安裝 maven
1、wget https://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz

2、sudo tar -zxf apache-maven-3.6.3-bin.tar.gz -C /usr/local/src 3、編輯 /etc/profile M2_HOME=/usr/local/src/apache-maven-3.6.3 export M2_HOME PATH=${PATH}:${M2_HOME}/bin export PATH 4、source /etc/profile 5、mvn -v 有顯示版本 表示成功,如果有問題 自行百度

下載源碼

1、git clone https://github.com/apache/zeppelin.git

2、切到 0.9.0 分支 
git checkout -b branch-0.9 origin/branch-0.9

bzip2: yum install bzip2

 

1、MAVEN 修改為阿里的鏡像

1、進入安裝maven的目錄下 

vi /usr/local/src/apache-maven-3.6.3/conf/settings.xml

2、 找到 mirors 標簽 添加 (在vim 模式下 /mirrors)
    <mirror>
      <id>alimaven</id>
      <mirrorOf>central</mirrorOf>
      <name>aliyun maven</name>
      <url>https://maven.aliyun.com/repository/central</url>
    </mirror>
    <mirror>
      <id>alimaven</id>
      <mirrorOf>central</mirrorOf>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
    </mirror>
    
3、:wq 保存推出

 

2、下載APACHE 相關包比較慢,替換成國內源

cd zeppelin/
1、rlang/pom.xml
- 標簽 spark.src.download.url 替換

https://mirrors.tuna.tsinghua.edu.cn/apache/spark/${spark.archive}/${spark.archive}.tgz

- spark.bin.download.url 替換

https://mirrors.tuna.tsinghua.edu.cn/apache/spark/${spark.archive}/${spark.archive}-bin-without-hadoop.tgz

2、spark/pom.xml 
- 替換 spark.src.download.ur

https://mirrors.tuna.tsinghua.edu.cn/apache/spark/${spark.archive}/${spark.archive}.tgz

- 替換 spark.bin.download.url

https://mirrors.tuna.tsinghua.edu.cn/apache/spark/${spark.archive}/${spark.archive}-bin-without-hadoop.tgz
3、flink/pom.xml
注意:本人沒找到 flink 1.10.0 版本的 國內鏡像地址, 所以替換成了1.10.1

- flink.version
1.10.1
- flink.bin.download.url
https://mirrors.tuna.tsinghua.edu.cn/apache/flink/flink-${flink.version}/flink-${flink.version}-bin-scala_${scala.binary.version}.tgz

4、 zeppelin-web/package.json

由於在root 權限下 build zeppelin-web會報錯 所有修改一下 
bower install --silent --allow-root
見圖片 

 

 

2.安裝node和npm(具體看別的文章這里不具體展開,這個是用來編譯zeppelin-web-angular模塊的)

 

3.安裝bzip2(后續安裝phantomjs 這個需要)

yum install bzip2

 

4.提前下載好node和npm到指定位置也可以當編譯到需要下載時停止編譯,然后手動下載后放入指定位置,共3個文件(與第二步不同,這步是用來編譯zeppelin-web模塊的)

  將node文件和npm文件 提前放入到指定的maven repository的倉庫中。具體版本 需要查看zeppelin目錄下的pom.xml文件

 

 

 

com/github/eirslett/node/12.3.1/node-12.3.1-linux-x64.tar.gz
com/github/eirslett/npm/6.9.0/npm-6.9.0.tgz

還有一個phantomjs-2.1.1-linux-x86_64.tar.bz2文件 放在 

/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2

 

5.修改一些配置

zeppelin-web/package.json 修改圖

 

"postinstall": "bower install --silent --allow-root",
"prebuild": "npm-run-all clean lint:once",
"build:dist": "npm-run-all prebuild && bower install --silent --allow-root && grunt pre-webpack-dist && webpack && grunt post-webpack-dist",
"build:ci": "npm-run-all prebuild &&  bower install --silent --allow-root && grunt pre-webpack-ci && webpack && grunt post-webpack-dist",

 

不確定是否必須要改

 

 

      <execution>
            <id>npm audit fix</id>
            <goals>
              <goal>npm</goal>
            </goals>
            <configuration>
              <skip>${web.e2e.enabled}</skip>
              <arguments>audit fix</arguments>
            </configuration>
          </execution>

 

6編譯zeppelin-web-angular模塊

 設置好 nodejs 和 npm 環境后 ,npm install && npm run build ,錯誤較多,需要自己排查

部分編譯

參考自: jeff 大佬的文章,文末尾 有鏈接

  • Zeppelin的核心模塊
mvn clean install -DskipTests -DskipRat -pl zeppelin-web,zeppelin-server -am # 編譯zeppelin核心模塊

cd zeppelin-plugins  # cd到zeppelin的插件模塊

mvn clean package -DskipTests  # 編譯zeppelin所有的插件模塊

 

 報錯信息

error Expected linebreaks to be 'LF' but found 'CRLF' linebreak-style

 

解決方法

在.eslintrc文件 rules 里面 配置

"linebreak-style": [0 ,"error", "windows"], 

 報錯信息

error Expected indentation of 10 spaces but found 8 indent

解決
修改.eslintrc.js文件rules字段下增加

"indent": ["off", 2]

  報錯信息 An accessor cannot be declared in an ambient context

 解決方法:

ng update --next @angular/cli --force

 

 報錯信息:warning Unexpected 'this' no-invali

 

解決方法:

 "no-invalid-this": 0,

 

bzip2


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM