Azkaban 3.0 分佈式安裝部署文檔

Azkaban 3.0 分佈式安裝部署文檔

一.簡介

Azkaban2.5支持兩種運行模式:

1.solo server mode:web executor在同一個進程中執行,適用於H2 DB

2.two server mode: web executor在不同的進程中執行(運行在同一服務器上)數據庫爲mysql

但是以上兩種情況都不適用於分佈式部署,1web對應多executors。這個情況在3.0以上得以修復。

Azkaban3.0在原有的兩種基礎上加入新的運行模式:

multiple executor mode:webexecutor可以運行在不同的服務器上,DB使用mysql

 

二.環境配置

由於azkaban3.0以上沒有相應的安裝包,需要從源碼進行編譯。編譯的環境需要安裝jdk8

項目是gradle項目。

三.編譯,安裝過程

1.git clone [email protected]:azkaban/azkaban.git azkaban源碼,當前爲3.24版本

2.進入azkaban 項目進行編譯 ./gradlew distTar

編譯結果爲:

 

azkaban-common : 常用工具類。

azkaban-db : 對應的sql腳本

azkaban-hadoop-secutity-plugin : hadoop 有關kerberos插件

azkaban-solo-server: webexecutor 一起的項目。

azkaban-web/executor-server:azkabanwebexecutorserver信息

azkaban-spi: azkaban存儲接口以及exception

3.在數據庫中執行azkaban-db下的sql

 sql:

asd

在數據庫中創建所有表 create-all. 執行結束後,再執行源碼下的upgrade.3.20 to 3.22.sql


4.在編譯成功後 azkaban-exec/web-server下目錄獲取tar文件

 asd

5.解壓 azkaban-exec     azkaban-web     azkaban-solo

solo下的conf拷貝至azkaban-exec下, azkaban-web下  刪除global.properties即可。

solo下的plugins拷貝至azkaban-exec下,否則會在執行工作流時出現以下錯誤:

 

這是由於azkaban需要校驗提交的用戶信息,將plugins/jobtypes/commonprivate.properties中把這個校驗關閉了
6.azkaban-exec  和  azkaban-web下創建logs文件夾,並將mysql-connect jar複製到lib文件夾下。

7.多個executor只需要配置鏈接到同一個數據庫就可以了。executor會自動查詢executor這張表中,但是默認active0,需要手動修改 active1.azkaban-web在啓動時纔會註冊這些executor。注意,添加了executor需要重啓web.

8.executor配置文件修改  /azkaban-web/conf/azkaban.properties:下添加:

#Multiple Executor Mode

#open it if you use the multiple executor mode

azkaban.use.multiple.executors=true

#azkaban.executorselector.filters=StaticRemainingFlowSize,MinimumFreeMemory,CpuStatus

azkaban.executorselector.filters=StaticRemainingFlowSize,CpuStatus

azkaban.executorselector.comparator.NumberOfAssignedFlowComparator=1

azkaban.executorselector.comparator.Memory=1

azkaban.executorselector.comparator.LastDispatched=1

azkaban.executorselector.comparator.CpuUsage=1

 

azkabanmode設置成多executor。其中第二層是過濾一些executor分配條件。

 

9.log4j文件拷貝至azkaban-exec  和  azkaban-web下否則會在啓動時出現

Exception: java.lang.StackOverflowError thrown from the UncaughtExceptionHandler in thread "main"

 

10.至此 按照azkaban webjetty keystore配置後就可使用了。。。PS.先啓動executor再啓動web.

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