flink 编译
· 2 min read
背景
了解flink的使用
编译
下载代码:
git clone https://github.com/apache/flink.git
cd flink
## 编译
./mvnw -Drat.skip=true -DskipTests=true package
启动
## 切换目录
cd build-target
## 启动
./bin/start-cluster.sh
## 执行例子
./bin/flink run ./examples/batch/WordCount.jar
## 打开网站
http://127.0.0.1:8081/#/overview
输出
./bin/flink run ./examples/batch/WordCount.jar
创建demo
mvn archetype:generate \
-DarchetypeGroupId=org.apache.flink \
-DarchetypeArtifactId=flink-walkthrough-datastream-java \
-DarchetypeVersion=1.18.0 \
-DgroupId=frauddetection \
-DartifactId=frauddetection \
-Dversion=0.1 \
-Dpackage=spendreport \
-DinteractiveMode=false
- 堆栈
filter:21, Example$1 (spendreport)
filter:18, Example$1 (spendreport)
processElement:38, StreamFilter (org.apache.flink.streaming.api.operators)
accept:-1, RecordProcessorUtils$$Lambda/0x00007f79f865e830 (org.apache.flink.streaming.runtime.io)
emitRecord:237, OneInputStreamTask$StreamTaskNetworkOutput (org.apache.flink.streaming.runtime.tasks)
processElement:146, AbstractStreamTaskNetworkInput (org.apache.flink.streaming.runtime.io)
emitNext:110, AbstractStreamTaskNetworkInput (org.apache.flink.streaming.runtime.io)
processInput:65, StreamOneInputProcessor (org.apache.flink.streaming.runtime.io)
processInput:562, StreamTask (org.apache.flink.streaming.runtime.tasks)
runDefaultAction:-1, StreamTask$$Lambda/0x00007f79f863ba10 (org.apache.flink.streaming.runtime.tasks)
runMailboxLoop:231, MailboxProcessor (org.apache.flink.streaming.runtime.tasks.mailbox)
runMailboxLoop:858, StreamTask (org.apache.flink.streaming.runtime.tasks)
invoke:807, StreamTask (org.apache.flink.streaming.runtime.tasks)
run:-1, Task$$Lambda/0x00007f79f8695ff8 (org.apache.flink.runtime.taskmanager)
runWithSystemExitMonitoring:953, Task (org.apache.flink.runtime.taskmanager)
restoreAndInvoke:932, Task (org.apache.flink.runtime.taskmanager)
doRun:746, Task (org.apache.flink.runtime.taskmanager)
run:562, Task (org.apache.flink.runtime.taskmanager)
runWith:1596, Thread (java.lang)
run:1583, Thread (java.lang)
相关阅读
- https://nightlies.apache.org/flink/flink-docs-master/zh/docs/dev/dataset/examples/
- [学习flink]https://github.com/Flink-zhisheng/flink-learning
- https://nightlies.apache.org/flink/flink-docs-master/zh/docs/internals/task_lifecycle/
- flink job 创建
- flink job 创建
- https://www.cnblogs.com/huanghanyu/p/12857971.html#_label1
- https://nightlies.apache.org/flink/flink-docs-release-1.18/docs/try-flink/datastream/
- maven 代理
- flink 执行
- flink 执行2
- flink 加载
- flink job提交
- flink 提交多个job
- flink 多个job 例子
- flink 多个main
- flink 多个main