lepton #spark #scala
# 快速构建 Flink 项目
{% tabs first="方式1", second="方式2", third="方式3" %}
{% content "first" %}
```bash
mvn archetype:generate \
-DarchetypeGroupId=org.apache.flink \
-DarchetypeArtifactId=flink-quickstart-scala \
-DarchetypeVersion=1.8.0
```
{% content "second" %}
```bash
curl https://flink.apache.org/q/quickstart-scala.sh | bash -s 1.8.0
```
{% content "third" %}
![idea 中创建 Flink 项目](./image/create_flink_project_in_idea.png)
{% endtabs %}
# Flink 快速入门
{% tabs first="batch", second="stream" %}
{% content "first" %}
[WordCount-Batch](https://github.com/apache/flink/blob/master/flink-examples/flink-examples-batch/src/main/scala/org/apache/flink/examples/scala/wordcount/WordCount.scala)
{% content "second" %}
[WordCount-Stream](https://github.com/apache/flink/blob/master/flink-examples/flink-examples-streaming/src/main/scala/org/apache/flink/streaming/scala/examples/wordcount/WordCount.scala)
{% endtabs %}