環境搭建 & 打包
環境搭建:
- 進入$otter_home目錄
- 執行:mvn clean install
- 導入maven項目。如果eclipse下報"Missing artifact com.oracle:ojdbc14:jar:10.2.0.3.0",修改$otter_home/pom.xml中"${user.dir}/lib/ojdbc14-10.2.0.3.0.jar"為絕對路徑,比如"d:/lib/ojdbc14-10.2.0.3.0.jar"
打包:
- 執行:mvn clean install -Dmaven.test.skip -Denv=release
- 釋出包位置:$otter_home/target
https://github.com/alibaba/otter#%E9%A1%B9%E7%9B%AE%E8%83%8C%E6%99%AF https://github.com/alibaba/otter#%E9%A1%B9%E7%9B%AE%E8%83%8C%E6%99%AF 項目背景
阿裡巴巴B2B公司,因為業務的特性,賣家主要集中在國内,買家主要集中在國外,是以衍生出了杭州和美國異地機房的需求,同時為了提升使用者體驗,整個機房的架構為雙A,兩邊均可寫,由此誕生了otter這樣一個産品。
otter第一版本可追溯到04~05年,此次外部開源的版本為第4版,開發時間從2011年7月份一直持續到現在,目前阿裡巴巴B2B内部的本地/異地機房的同步需求基本全上了otte4。
目前同步規模:
- 同步資料量6億
- 檔案同步1.5TB(2000w張圖檔)
- 涉及200+個資料庫執行個體之間的同步
- 80+台機器的叢集規模
https://github.com/alibaba/otter#%E9%A1%B9%E7%9B%AE%E4%BB%8B%E7%BB%8D https://github.com/alibaba/otter#%E9%A1%B9%E7%9B%AE%E4%BB%8B%E7%BB%8D 項目介紹
名稱:otter ['ɒtə(r)]
譯意: 水獺,資料搬運工
語言: 純java開發
定位: 基于資料庫增量日志解析,準實時同步到本機房或異地機房的mysql/oracle資料庫. 一個分布式資料庫同步系統
https://github.com/alibaba/otter#%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86 https://github.com/alibaba/otter#%E5%B7%A5%E4%BD%9C%E5%8E%9F%E7%90%86 工作原理
![](https://img.laitimes.com/img/__Qf2AjLwojIjJCLyojI0JCLicmbw5SMhJzMhBTO3M2Y4EWMwImYzcjM0QWOmJTM5MjY1EzNw8CX5d2bs92Yl1iclB3bsVmdlR2LcNWaw9CXt92Yu4GZjlGbh5yYjV3Lc9CX6MHc0RHaiojIsJye.png)
原理描述:
1. 基于Canal開源産品,擷取資料庫增量日志資料。 什麼是Canal, 請
點選2. 典型管理系統架構,manager(web管理)+node(工作節點)
a. manager運作時推送同步配置到node節點
b. node節點将同步狀态回報到manager上
3. 基于zookeeper,解決分布式狀态排程的,允許多node節點之間協同工作.
https://github.com/alibaba/otter#%E4%BB%80%E4%B9%88%E6%98%AFcanal- https://github.com/alibaba/otter#%E4%BB%80%E4%B9%88%E6%98%AFcanal- 什麼是canal?
otter之前開源的一個子項目,開源連結位址:
http://github.com/alibaba/canalhttps://github.com/alibaba/otter#introduction https://github.com/alibaba/otter#introduction Introduction
See the page for introduction:
.
https://github.com/alibaba/otter#quickstart https://github.com/alibaba/otter#quickstart QuickStart
See the page for quick start:
https://github.com/alibaba/otter#adminguide https://github.com/alibaba/otter#adminguide AdminGuide
See the page for admin deploy guide :
https://github.com/alibaba/otter#%E7%9B%B8%E5%85%B3%E6%96%87%E6%A1%A3 https://github.com/alibaba/otter#%E7%9B%B8%E5%85%B3%E6%96%87%E6%A1%A3 相關文檔
See the page for 文檔:
相關PPT&PDFhttps://github.com/alibaba/otter#%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98 https://github.com/alibaba/otter#%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98 常見問題
See the page for FAQ:
FAQhttps://github.com/alibaba/otter#%E7%89%88%E6%9C%AC%E7%9B%B8%E5%85%B3- https://github.com/alibaba/otter#%E7%89%88%E6%9C%AC%E7%9B%B8%E5%85%B3- 版本相關:
1. 建議版本:4.2.15 (otter開源版本從内部演變而來,是以初始版本直接從4.x開始)
2. 下載下傳釋出包:
download3. maven依賴 : 暫無
https://github.com/alibaba/otter#%E7%9B%B8%E5%85%B3%E5%BC%80%E6%BA%90 相關開源
- 阿裡巴巴mysql資料庫binlog的增量訂閱&消費元件:
- 阿裡巴巴去Oracle資料遷移同步工具(目标支援MySQL/DRDS): http://github.com/alibaba/yugong
https://github.com/alibaba/otter#%E9%97%AE%E9%A2%98%E5%8F%8D%E9%A6%88 https://github.com/alibaba/otter#%E9%97%AE%E9%A2%98%E5%8F%8D%E9%A6%88 問題回報
https://github.com/alibaba/otter#%E6%B3%A8%E6%84%8Fcanalotter-qq%E8%AE%A8%E8%AE%BA%E7%BE%A4%E5%B7%B2%E7%BB%8F%E5%BB%BA%E7%AB%8B%E7%BE%A4%E5%8F%B7161559791-%E6%AC%A2%E8%BF%8E%E5%8A%A0%E5%85%A5%E8%BF%9B%E8%A1%8C%E6%8A%80%E6%9C%AF%E8%AE%A8%E8%AE%BA https://github.com/alibaba/otter#%E6%B3%A8%E6%84%8Fcanalotter-qq%E8%AE%A8%E8%AE%BA%E7%BE%A4%E5%B7%B2%E7%BB%8F%E5%BB%BA%E7%AB%8B%E7%BE%A4%E5%8F%B7161559791-%E6%AC%A2%E8%BF%8E%E5%8A%A0%E5%85%A5%E8%BF%9B%E8%A1%8C%E6%8A%80%E6%9C%AF%E8%AE%A8%E8%AE%BA 注意:canal&otter QQ讨論群已經建立,群号:161559791 ,歡迎加入進行技術讨論。
1. qq交流群: 161559791
2. 郵件交流: [email protected]
3. 新浪微網誌: agapple0002
4. 報告issue:
issues