目錄
- 叢集概況
- 玩轉Flink on Kubernetes
- WindowJoin
- SQL
BigData Manager簡介
BigData on Kubernetes

部署向導
運維管理
開發者IDE
簡介
Example illustrating a windowed stream join between two data streams.
The example works on two input streams with pairs (name, grade) and (name, salary) respectively. It joins the steams based on "name" within a configurable window. The example uses a built-in sample data generator that generates the steams of pairs at a configurable rate.
- Source1:name, grade
- Source2:name, salary
- Result:name, grade, salary
KubeCon: Flink on K8s目錄叢集概況玩轉Flink on Kubernetes
過程
建立Deployment
- 浏覽器打開
- 0) http://47.92.41.71:8080/app/
- 1) http://39.98.106.146:8080/app/
- 2) http://39.98.8.131:8080/app/
- 3) http://39.98.7.153:8080/app/
- 4) http://39.98.106.174:8080/app/
- 5) http://39.98.8.106:8080/app/
- 6) http://39.98.106.162:8080/app/
- 7) http://47.92.44.149:8080/app/
- 8) http://39.98.7.241:8080/app/
- 9) http://39.98.7.20:8080/app/
- Organization中輸入使用者名
- Configuration:
- Intepreter選擇Blink/JAR
- Blink Version: 3.2.1 / blink-3.2-SNAPSHOT
- Jar URI: hdfs:///example/flink-examples-WindowJoin.jar
- entryClass: org.apache.flink.streaming.examples.join.WindowJoin
- 點選Create Deployment
啟動job
如上圖操作
檢視結果
- 點選“Blink UI”,跳轉到Apache Flink的dashboard
- Jobs -> Running Jobs -> Windowed Join Example
- 結果日志檢視:Task Managers -> Path, ID -> Log
停止Job
- 回到Deployment頁面,點選Cancel(叢集資源有限,為了後續體驗,請一定停掉此job)
實時熱門商品, 每隔5分鐘輸出最近一小時内點選量最多的前 N 個商品(例子詳情,請移步
http://wuchong.me/blog/2018/11/07/use-flink-calculate-hot-items/,天池大賽的資料)
列名稱 | 說明 |
---|---|
使用者ID | 整數類型,加密後的使用者ID |
商品ID | 整數類型,加密後的商品ID |
商品類目ID | 整數類型,加密後的商品所屬類目ID |
行為類型 | 字元串,枚舉類型,包括(‘pv’, ‘buy’, ‘cart’, ‘fav’) |
時間戳 | 行為發生的時間戳,機關秒 |
-
- Intepreter選擇Blink/SQL
- Execution Mode:STREAM
- Artifact:HotItem
- Runtime Configuration:
- state.backend.type = rocksdb
- state.backend.rocksdb.ttl.ms = 129600000