Github user uce commented on a diff in the pull request: https://github.com/apache/flink/pull/1774#discussion_r55375307 --- Diff: docs/quickstart/run_example_quickstart.md --- @@ -27,116 +27,360 @@ under the License. * This will be replaced by the TOC {:toc} -This guide walks you through the steps of executing an example program ([K-Means clustering](http://en.wikipedia.org/wiki/K-means_clustering)) on Flink. -On the way, you will see the a visualization of the program, the optimized execution plan, and track the progress of its execution. +In this guide we will start from scratch and fo from setting up a Flink project and running +a streaming analysis program on a Flink cluster. + +Wikipedia provides an IRC channel where all edits to the wiki are logged. We are going to +read this channel in Flink and count the number of bytes that each user edits within +a given window of time. This is easy enough to implement in a few minutes using Flink but it will +give you a good foundation from which to start building more complex analysis programs on your own. + +## Setting up a Maven Project + +We are going to use a Flink Maven Archetype for creating our project stucture. Please +see [Java API Quickstart]({{ site.baseurl }}/quickstart/java_api_quickstart.html) for more details +about this. For our purposes, the command to run is this: + +{% highlight bash %} +$ mvn archetype:generate\ + -DarchetypeGroupId=org.apache.flink\ + -DarchetypeArtifactId=flink-quickstart-java\ + -DarchetypeVersion=1.0.0\ + -DgroupId=wiki-edits\ + -DartifactId=wiki-edits\ + -Dversion=0.1\ + -Dpackage=wikiedits\ + -DinteractiveMode=false\ +{% endhighlight %} + +You can edit the `groupId`, `artifactId` and `package` if you like. With the above parameters, +maven will create a project structure that looks like this: + +{% highlight bash %} +$ tree wiki-edits +wiki-edits/ +âââ pom.xml +âââ src + âââ main + âââ java + â  âââ wikiedits + â  âââ Job.java + â  âââ SocketTextStreamWordCount.java + â  âââ WordCount.java + âââ resources + âââ log4j.properties +{% endhighlight %} + +There is our `pom.xml` file that already has the Flink dependencies added in the root directory and +several example Flink programs in `src/main/java`. We can delete the example programs, since +we are going to start from scratch: + +{% highlight bash %} +$ rm wiki-edits/src/main/java/wikiedits/*.java +{% endhighlight %} + +As a last step we need to add the Flink wikipedia connector as a dependency so that we can --- End diff -- Wikipedia capitalization
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---