Apache Flink is an open source stream processing framework witch becomes more popular, because of Its great advantigies.

To get started you should visit the link bellow. (Newer version might be available)

https://ci.apache.org/projects/flink/flink-docs-release-1.3/quickstart/setup_quickstart.html

This tutorial is very useful to understand how to use Flink API. You write a program on Java or Scala using Flink API and then upload this program to Flink cluster for execution.

The above tutorial will give you better idea how Flink works, but it’s not so practical for developing. You have to open one terminal window to start Flink server (start-local.sh). Then to open another to run “nc” server. (nc -l 9999). Then you have to open the Flink log file to see the output (tail log/flink-*-jobmanager-*.log).

For developing is much easier to use the full functions of you favorite IDE (IntelliJ is recommended for Developing Flink programs).

For fist start you can use the Maven archetype Flink Quickstart. As writen in the tutorial bellow, just have run the following program in order to create Maven project. Then you just have to Import the created project into IntelliJ IDE.

mvn archetype:generate \
-DarchetypeGroupId=org.apache.flink \
-DarchetypeArtifactId=flink-quickstart-java \
-DarchetypeVersion=1.3.2

Note: To set up scala project, just change flink-quickstart-java to flink-quickstart-scala in the above command.

https://ci.apache.org/projects/flink/flink-docs-release-1.3/quickstart/java_api_quickstart.html

Probably the biggest advantage of this using Flink Quickstart archetype is that you can run Flink programs form the IDE and also to see the output in the console there.

 

Apache Flink – Getting Started

Leave a Reply

Your email address will not be published.