WaterDrop on spark/flink(v2.x 支持spark/flink)

(注:flink版本>=1.9.0,spark版本>=2.x.x)

使用場景

  • 海量數據ETL
  • 海量數據聚合
  • 多源數據處理

特性

  • 簡單易用,靈活配置,無需開發
  • 實時流式處理
  • 高性能
  • 海量數據處理能力
  • 模塊化和插件化,易於擴展
  • 支持利用SQL做數據處理和聚合

工作流程

input/Source[數據源輸入] -> Filter/Transform[數據處理] -> Output/Sink[結果輸出]

v2.x 和 v1.x 區別

備註:Waterdrop v1.x 與 v2.x 還有一個很大的區別,就是配置文件中,input改名爲source, filter改名爲transform, output改名爲sink。

# v1.x 的配置文件:
input {}
filter {}
output {}

# v2.x 的配置文件:
source {} # input -> source
transform {} # filter -> transform
sink {} # output -> sink

爲何要研發 WaterDrop 2.x

在2017年的夏天,InterestingLab 團隊爲了大幅提升海量、分佈式數據計算程序的開發效率和運行穩定性,開源了支持Spark流式和離線批計算的Waterdrop v1.x。 直到2019年的冬天,這兩年的時間裏,Waterdrop逐漸被國內多個一二線互聯網公司以及衆多的規模較小的創業公司應用到生產環境,持續爲其產生價值和收益。 在Github上,目前此項目的Star + Fork 數也超過了1000+,它的能力和價值得到了充分的認可在。

InterestingLab 堅信,只有真正爲用戶產生價值的開源項目,纔是好的開源項目,這與那些爲了彰顯自身技術實力,瘋狂堆砌功能和高端技術的開源項目不同,它們很少考慮用戶真正需要的是什麼。 然後,時代是在進步的,InterestingLab也有深深的危機感,無法停留在當前的成績上不前進。

在2019年的夏天,InterestingLab 做出了一個重要的決策 —— 在Waterdrop上儘快支持Flink,讓Flink的用戶也能夠用上Waterdrop,感受到它帶來的實實在在的便利。 終於,在2020年的春節前夕,InterestingLab 正式對外開放了Waterdrop v2.x,一個同時支持Spark(Spark >= 2.2)和Flink(Flink >=1.9)的版本,希望它能幫助到國內龐大的Flink社區用戶。

在此特此感謝,Facebook Presto項目,Presto項目是一個非常優秀的開源OLAP查詢引擎,提供了豐富的插件化能力。 Waterdrop項目正式學習了它的插件化體系架構之後,在Spark和Flink上研發出的一套插件化體系架構,爲Spark和Flink計算程序的插件化開發插上了翅膀。

WaterDrop 2.x 通用配置

一個完整的Waterdrop配置包含envsourcetransformsink, 即:

    env {
        ...
    }
    source {
        ...
    }
    transform {
        ...
    }
    sink {
        ...
    }

env是flink任務的相關的配置,例如設置時間爲event-time還是process-time

  env {
    execution.parallelism = 1 #設置任務的整體並行度爲1
    execution.checkpoint.interval = 10000 #設置任務checkpoint的頻率
    execution.checkpoint.data-uri = "hdfs://localhost:9000/checkpoint" #設置checkpoint的路徑
  }

v2.0.0 插件

                                            

完整配置文件案例

######
###### This config file is a demonstration of streaming processing in waterdrop config
######

env {
  # You can set flink configuration here
  execution.parallelism = 1
  #execution.checkpoint.interval = 10000
  #execution.checkpoint.data-uri = "hdfs://localhost:9000/checkpoint"
}

source {
  # This is a example source plugin **only for test and demonstrate the feature source plugin**
    FakeSourceStream {
      result_table_name = "fake"
      field_name = "name,age"
    }

  # If you would like to get more information about how to configure waterdrop and see full list of source plugins,
  # please go to https://interestinglab.github.io/waterdrop/#/zh-cn/configuration/base
}

transform {
    sql {
      sql = "select name,age from fake"
    }

  # If you would like to get more information about how to configure waterdrop and see full list of transform plugins,
  # please go to https://interestinglab.github.io/waterdrop/#/zh-cn/configuration/base
}

sink {
  ConsoleSink {}

  # If you would like to get more information about how to configure waterdrop and see full list of sink plugins,
  # please go to https://interestinglab.github.io/waterdrop/#/zh-cn/configuration/base
}

 

官網:https://interestinglab.github.io/waterdrop

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