Bundled Examples
Detailed examples of different Flink api
- DataStream applications (Java / Scala)
- DataSet applications (Java / Scala)
- Table API / SQL queries (Java / Scala)
Examples of the method of operation:
The easiest way is to run a local flink cluster ./bin/start-cluster.sh
complete start flink cluster, we run native code WordCount example you can:
./bin/flink run ./examples/batch/WordCount.jar
Other examples can also be used in this way to run
a path very example no built-in data file, we need to develop data
./bin/flink run ./examples/batch/WordCount.jar --input /path/to/some/text/data --output /path/to/result
If it is not the local data, such as data on hdfs, you need to add the file path prefix hdfs: //
Examples on the Web
You can also learn from some blog flink
- How to use Apache Flink built with state of the stream application , showing an event-driven application, the application uses DataStream API and two SQL queries to achieve flow analysis.
- Use Apache Flink, Elasticsearch and Kibana build real-time dashboard application , shows how to use Apache Flink, Elasticsearch and Kibana build dashboards for real-time streaming data analysis solutions.
- Ververica of Flink training website provides a number of examples. View hands-on part and exercises.