You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by NicoK <gi...@git.apache.org> on 2016/11/07 10:52:18 UTC
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
GitHub user NicoK opened a pull request:
https://github.com/apache/flink/pull/2764
[FLINK-5008] Update quickstart documentation
This PR updates the outdated quickstart guides regarding IDE setup and the first example.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/NicoK/flink FLINK-5008
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/2764.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2764
----
commit 7c4a8426df3596d7a9dc923eb9225f150d078776
Author: Nico Kruber <ni...@data-artisans.com>
Date: 2016-11-03T15:19:49Z
[FLINK-5008] update IDE setup documentation
* IntelliJ setup is simpler with the new version 2016.2.5
* Eclipse (and Scala IDE) setups do not work anymore using the current Flink codebase. This is due to the old Eclipse in Scala IDE 3.0.3 and due to Scala version incompatabilities in Scala IDE 4.4.1 as well as the setup using the update site and a manual Eclipse installation.
commit 2d29fe4800f0772b0cf817b4979758a7e7f8e7ca
Author: Nico Kruber <ni...@data-artisans.com>
Date: 2016-11-03T16:49:13Z
[FLINK-5008] do not require "." to be in the path
the example in the "
commit aa6d2c60c9e076adee9fc1de23bd7cf246254273
Author: Nico Kruber <ni...@data-artisans.com>
Date: 2016-11-04T14:26:01Z
[FLINK-5008] update the SocketWindowWordCount example
This changes the sliding window to a tumbling window which
is easier for a first-time example.
commit 1ff11c2227a0a21689b6b571dcc83160fd4d9c86
Author: Nico Kruber <ni...@data-artisans.com>
Date: 2016-11-04T14:28:22Z
[FLINK-5008] update the setup_quickstart guide's example
The description was based on an old version of the actual example
implementation and needed update. The new version includes more
explanations and updates the output from the current implementation.
commit ea817034932a060b5769e564f91800f3bd57ae7f
Author: Nico Kruber <ni...@data-artisans.com>
Date: 2016-11-04T14:51:28Z
[FLINK-5008] also update the README.md regarding the IDE setup
(see a841afe5fc)
commit c85319ef33cfe20245907adfd9bb52599c922616
Author: Nico Kruber <ni...@data-artisans.com>
Date: 2016-11-04T15:12:11Z
[FLINK-5008] also update the Scala example
see 5970eb92db
----
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink issue #2764: [FLINK-5008] Update quickstart documentation
Posted by NicoK <gi...@git.apache.org>.
Github user NicoK commented on the issue:
https://github.com/apache/flink/pull/2764
I tried with several versions of Eclipse and Scala IDE, even with the one claimed to work. Unfortunately, I got none of them to work.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/2764#discussion_r92395568
--- Diff: docs/internals/ide_setup.md ---
@@ -25,104 +25,56 @@ under the License.
* Replaced by the TOC
{:toc}
-## Eclipse
-
-A brief guide how to set up Eclipse for development of the Flink core.
-Flink uses mixed Scala/Java projects, which pose a challenge to some IDEs.
-Below is the setup guide that works best from our personal experience.
-
-For Eclipse users, we currently recomment the Scala IDE 3.0.3, as the most robust solution.
-
-
-### Eclipse Scala IDE 3.0.3
-
-**NOTE:** While this version of the Scala IDE is not the newest, we have found it to be the most reliably working
-version for complex projects like Flink. One restriction is, though, that it works only with Java 7, not with Java 8.
-
-**Note:** Before following this setup, make sure to run the build from the command line once
-(`mvn clean package -DskipTests`)
-
-1. Download the Scala IDE (preferred) or install the plugin to Eclipse Kepler. See section below for download links
- and instructions.
-2. Add the "macroparadise" compiler plugin to the Scala compiler.
- Open "Window" -> "Preferences" -> "Scala" -> "Compiler" -> "Advanced" and put into the "Xplugin" field the path to
- the *macroparadise* jar file (typically "/home/*-your-user-*/.m2/repository/org/scalamacros/paradise_2.10.4/2.0.1/paradise_2.10.4-2.0.1.jar").
- Note: If you do not have the jar file, you probably did not ran the command line build.
-3. Import the Flink Maven projects ("File" -> "Import" -> "Maven" -> "Existing Maven Projects")
-4. During the import, Eclipse will ask to automatically install additional Maven build helper plugins.
-5. Close the "flink-java8" project. Since Eclipse Kepler does not support Java 8, you cannot develop this project.
-
-
-#### Download links for Scala IDE 3.0.3
-
-The Scala IDE 3.0.3 is a previous stable release, and download links are a bit hidden.
-
-The pre-packaged Scala IDE can be downloaded from the following links:
-
-* [Linux (64 bit)](http://downloads.typesafe.com/scalaide-pack/3.0.3.vfinal-210-20140327/scala-SDK-3.0.3-2.10-linux.gtk.x86_64.tar.gz)
-* [Linux (32 bit)](http://downloads.typesafe.com/scalaide-pack/3.0.3.vfinal-210-20140327/scala-SDK-3.0.3-2.10-linux.gtk.x86.tar.gz)
-* [MaxOS X Cocoa (64 bit)](http://downloads.typesafe.com/scalaide-pack/3.0.3.vfinal-210-20140327/scala-SDK-3.0.3-2.10-macosx.cocoa.x86_64.zip)
-* [MaxOS X Cocoa (32 bit)](http://downloads.typesafe.com/scalaide-pack/3.0.3.vfinal-210-20140327/scala-SDK-3.0.3-2.10-macosx.cocoa.x86.zip)
-* [Windows (64 bit)](http://downloads.typesafe.com/scalaide-pack/3.0.3.vfinal-210-20140327/scala-SDK-3.0.3-2.10-win32.win32.x86_64.zip)
-* [Windows (32 bit)](http://downloads.typesafe.com/scalaide-pack/3.0.3.vfinal-210-20140327/scala-SDK-3.0.3-2.10-win32.win32.x86.zip)
-
-Alternatively, you can download Eclipse Kepler from [https://eclipse.org/downloads/packages/release/Kepler/SR2](https://eclipse.org/downloads/packages/release/Kepler/SR2)
-and manually add the Scala and Maven plugins by plugin site at [http://scala-ide.org/download/prev-stable.html](http://scala-ide.org/download/prev-stable.html).
+The sections below describe how to import the Flink project into an IDE
+for the development of Flink itself. For writing Flink programs, please
+refer to the [Java API]({{ site.baseurl }}/quickstart/java_api_quickstart.html)
+and the [Scala API]({{ site.baseurl }}/quickstart/scala_api_quickstart.html)
+quickstart guides.
-* Either use the update site to install the plugin ("Help" -> "Install new Software")
-* Or download the [zip file](http://download.scala-ide.org/sdk/helium/e38/scala211/stable/update-site.zip), unpack it, and move the contents of the
- "plugins" and "features" folders into the equally named folders of the Eclipse root directory
-
-**NOTE:** It might happen that some modules do not build in Eclipse correctly (even if the maven build succeeds).
-To fix this, right-click in the corresponding Eclipse project and choose "Properties" and than "Maven".
-Uncheck the box labeled "Resolve dependencies from Workspace projects", click "Apply" and then "OK". "
-
-
-### Eclipse Scala IDE 4.0.0
-
-**NOTE: From personal experience, the use of the Scala IDE 4.0.0 performs worse than previous versions for complex projects like Flink.**
-**Version 4.0.0 does not handle mixed Java/Scala projects as robustly and it frequently raises incorrect import and type errors.**
-
-*Note:* Before following this setup, make sure to run the build from the command line once
-(`mvn clean package -DskipTests`)
-
-1. Download the Scala IDE: [http://scala-ide.org/download/sdk.html](http://scala-ide.org/download/sdk.html)
-2. Import the Flink Maven projects (File -> Import -> Maven -> Existing Maven Projects)
-3. While importing the Flink project, the IDE may ask you to install an additional maven build helper plugin.
-4. After the import, you need to set the Scala version of your projects to Scala 2.10 (from the default 2.11).
- To do that, select all projects that contain Scala code (marked by the small *S* on the project icon),
- right click and select "Scala -> Set the Scala Installation" and pick "2.10.4".
- Currently, the project to which that is relevant are "flink-runtime", "flink-scala", "flink-scala-examples",
- "flink-streaming-example", "flink-streaming-scala", "flink-tests", "flink-test-utils", and "flink-yarn".
-5. Depending on your version of the Scala IDE, you may need to add the "macroparadise" compiler plugin to the
- Scala compiler. Open "Window" -> "Preferences" -> "Scala" -> "Compiler" -> "Advanced" and put into the "Xplugin" field
- the path to the *macroparadise* jar file (typically "/home/*-your-user-*/.m2/repository/org/scalamacros/paradise_2.10.4/2.0.1/paradise_2.10.4-2.0.1.jar")
-6. In order to compile the "flink-java-8" project, you may need to add a Java 8 execution environment.
- See [this post](http://stackoverflow.com/questions/25391207/how-do-i-add-execution-environment-1-8-to-eclipse-luna)
- for details.
+**NOTE:** Whenever something is not working in your IDE, try with the maven
+command line first (`mvn clean package -DskipTests`) as it might be your IDE
+that has a bug or is not properly set up.
## IntelliJ IDEA
A brief guide on how to set up IntelliJ IDEA IDE for development of the Flink core.
As Eclipse is known to have issues with mixed Scala and Java projects, more and more contributers are migrating to IntelliJ IDEA.
-The following documentation describes the steps to setup IntelliJ IDEA 14.0.3 (https://www.jetbrains.com/idea/download/) with the Flink sources.
-
-Prior to doing anything, make sure that the Flink project is built at least once from the terminal:
-`mvn clean package -DskipTests`
+The following documentation describes the steps to setup IntelliJ IDEA 2016.2.5
+([https://www.jetbrains.com/idea/download/](https://www.jetbrains.com/idea/download/))
+with the Flink sources.
### Installing the Scala plugin
-1. Go to IntelliJ plugins settings (File -> Settings -> Plugins) and click on "Install Jetbrains plugin...".
+
+The IntelliJ installation setup offers to install the Scala plugin.
+If it is not installed, follow these instructions before importing Flink
+to enable support for Scala projects and files:
+
+1. Go to IntelliJ plugins settings (File -> Settings -> Plugins) and
+ click on "Install Jetbrains plugin...".
2. Select and install the "Scala" plugin.
3. Restart IntelliJ
-### Installing the Scala compiler plugin
-1. Go to IntelliJ scala compiler settings (File -> Settings -> Build, Execution, Deployment -> Compiler -> Scala Compiler) and click on "Install Jetbrains plugin...".
-2. Click on the green plus icon on the right to add a compiler plugin
-3. Point to the paradise jar: ~/.m2/repository/org/scalamacros/paradise_2.10.4/2.0.1/paradise_2.10.4-2.0.1.jar If there is no such file, this means that you should build Flink from the terminal as explained above.
-
### Importing Flink
1. Start IntelliJ IDEA and choose "Import Project"
2. Select the root folder of the Flink repository
--- End diff --
Maybe mention that the repository has be be cloned with git first (referring to the Apache repo)?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/2764#discussion_r92405057
--- Diff: docs/quickstart/setup_quickstart.md ---
@@ -55,7 +69,10 @@ Check the __JobManager's web frontend__ at [http://localhost:8081](http://localh
## Run Example
-Now, we are going to run the [SocketWindowWordCount example](https://github.com/apache/flink/blob/master/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/socket/SocketWindowWordCount.java) and read text from a socket and count the number of distinct words.
+Now, we are going to run the
+[SocketWindowWordCount example](https://github.com/apache/flink/blob/master/flink-examples/flink-examples-streaming/src/main/java/org/apache/flink/streaming/examples/socket/SocketWindowWordCount.java)
+and read text from a socket and count the number of distinct words per sliding
--- End diff --
Sliding window is changed to Tumbling window below
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/2764#discussion_r92392722
--- Diff: docs/internals/ide_setup.md ---
@@ -25,104 +25,56 @@ under the License.
* Replaced by the TOC
{:toc}
-## Eclipse
-
-A brief guide how to set up Eclipse for development of the Flink core.
-Flink uses mixed Scala/Java projects, which pose a challenge to some IDEs.
-Below is the setup guide that works best from our personal experience.
-
-For Eclipse users, we currently recomment the Scala IDE 3.0.3, as the most robust solution.
-
-
-### Eclipse Scala IDE 3.0.3
-
-**NOTE:** While this version of the Scala IDE is not the newest, we have found it to be the most reliably working
-version for complex projects like Flink. One restriction is, though, that it works only with Java 7, not with Java 8.
-
-**Note:** Before following this setup, make sure to run the build from the command line once
-(`mvn clean package -DskipTests`)
-
-1. Download the Scala IDE (preferred) or install the plugin to Eclipse Kepler. See section below for download links
- and instructions.
-2. Add the "macroparadise" compiler plugin to the Scala compiler.
- Open "Window" -> "Preferences" -> "Scala" -> "Compiler" -> "Advanced" and put into the "Xplugin" field the path to
- the *macroparadise* jar file (typically "/home/*-your-user-*/.m2/repository/org/scalamacros/paradise_2.10.4/2.0.1/paradise_2.10.4-2.0.1.jar").
- Note: If you do not have the jar file, you probably did not ran the command line build.
-3. Import the Flink Maven projects ("File" -> "Import" -> "Maven" -> "Existing Maven Projects")
-4. During the import, Eclipse will ask to automatically install additional Maven build helper plugins.
-5. Close the "flink-java8" project. Since Eclipse Kepler does not support Java 8, you cannot develop this project.
-
-
-#### Download links for Scala IDE 3.0.3
-
-The Scala IDE 3.0.3 is a previous stable release, and download links are a bit hidden.
-
-The pre-packaged Scala IDE can be downloaded from the following links:
-
-* [Linux (64 bit)](http://downloads.typesafe.com/scalaide-pack/3.0.3.vfinal-210-20140327/scala-SDK-3.0.3-2.10-linux.gtk.x86_64.tar.gz)
-* [Linux (32 bit)](http://downloads.typesafe.com/scalaide-pack/3.0.3.vfinal-210-20140327/scala-SDK-3.0.3-2.10-linux.gtk.x86.tar.gz)
-* [MaxOS X Cocoa (64 bit)](http://downloads.typesafe.com/scalaide-pack/3.0.3.vfinal-210-20140327/scala-SDK-3.0.3-2.10-macosx.cocoa.x86_64.zip)
-* [MaxOS X Cocoa (32 bit)](http://downloads.typesafe.com/scalaide-pack/3.0.3.vfinal-210-20140327/scala-SDK-3.0.3-2.10-macosx.cocoa.x86.zip)
-* [Windows (64 bit)](http://downloads.typesafe.com/scalaide-pack/3.0.3.vfinal-210-20140327/scala-SDK-3.0.3-2.10-win32.win32.x86_64.zip)
-* [Windows (32 bit)](http://downloads.typesafe.com/scalaide-pack/3.0.3.vfinal-210-20140327/scala-SDK-3.0.3-2.10-win32.win32.x86.zip)
-
-Alternatively, you can download Eclipse Kepler from [https://eclipse.org/downloads/packages/release/Kepler/SR2](https://eclipse.org/downloads/packages/release/Kepler/SR2)
-and manually add the Scala and Maven plugins by plugin site at [http://scala-ide.org/download/prev-stable.html](http://scala-ide.org/download/prev-stable.html).
+The sections below describe how to import the Flink project into an IDE
+for the development of Flink itself. For writing Flink programs, please
+refer to the [Java API]({{ site.baseurl }}/quickstart/java_api_quickstart.html)
+and the [Scala API]({{ site.baseurl }}/quickstart/scala_api_quickstart.html)
+quickstart guides.
-* Either use the update site to install the plugin ("Help" -> "Install new Software")
-* Or download the [zip file](http://download.scala-ide.org/sdk/helium/e38/scala211/stable/update-site.zip), unpack it, and move the contents of the
- "plugins" and "features" folders into the equally named folders of the Eclipse root directory
-
-**NOTE:** It might happen that some modules do not build in Eclipse correctly (even if the maven build succeeds).
-To fix this, right-click in the corresponding Eclipse project and choose "Properties" and than "Maven".
-Uncheck the box labeled "Resolve dependencies from Workspace projects", click "Apply" and then "OK". "
-
-
-### Eclipse Scala IDE 4.0.0
-
-**NOTE: From personal experience, the use of the Scala IDE 4.0.0 performs worse than previous versions for complex projects like Flink.**
-**Version 4.0.0 does not handle mixed Java/Scala projects as robustly and it frequently raises incorrect import and type errors.**
-
-*Note:* Before following this setup, make sure to run the build from the command line once
-(`mvn clean package -DskipTests`)
-
-1. Download the Scala IDE: [http://scala-ide.org/download/sdk.html](http://scala-ide.org/download/sdk.html)
-2. Import the Flink Maven projects (File -> Import -> Maven -> Existing Maven Projects)
-3. While importing the Flink project, the IDE may ask you to install an additional maven build helper plugin.
-4. After the import, you need to set the Scala version of your projects to Scala 2.10 (from the default 2.11).
- To do that, select all projects that contain Scala code (marked by the small *S* on the project icon),
- right click and select "Scala -> Set the Scala Installation" and pick "2.10.4".
- Currently, the project to which that is relevant are "flink-runtime", "flink-scala", "flink-scala-examples",
- "flink-streaming-example", "flink-streaming-scala", "flink-tests", "flink-test-utils", and "flink-yarn".
-5. Depending on your version of the Scala IDE, you may need to add the "macroparadise" compiler plugin to the
- Scala compiler. Open "Window" -> "Preferences" -> "Scala" -> "Compiler" -> "Advanced" and put into the "Xplugin" field
- the path to the *macroparadise* jar file (typically "/home/*-your-user-*/.m2/repository/org/scalamacros/paradise_2.10.4/2.0.1/paradise_2.10.4-2.0.1.jar")
-6. In order to compile the "flink-java-8" project, you may need to add a Java 8 execution environment.
- See [this post](http://stackoverflow.com/questions/25391207/how-do-i-add-execution-environment-1-8-to-eclipse-luna)
- for details.
+**NOTE:** Whenever something is not working in your IDE, try with the maven
--- End diff --
"first"? before what?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink issue #2764: [FLINK-5008] Update quickstart documentation
Posted by NicoK <gi...@git.apache.org>.
Github user NicoK commented on the issue:
https://github.com/apache/flink/pull/2764
Developing Flink programs still works with Eclipse (tested with Eclipse 4.6.1 and Scala IDE 4.4.1 for Scala 2.11). Alongside testing the quickstarts, I also updated them as promised and made a switch for showing unstable vs. stable documentation which differs slightly in setting up the example projects and getting Flink binaries. Please, have a look.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink issue #2764: [FLINK-5008] Update quickstart documentation
Posted by StephanEwen <gi...@git.apache.org>.
Github user StephanEwen commented on the issue:
https://github.com/apache/flink/pull/2764
From my experience (having been an Eclipse user until one year ago), it is possible to develop a Flink Java Program in Eclipse. Developing Flink Scala programs is tricky.
Developing the Flink Code base in Eclipse is virtually impossible, because mixed Java/Scala projects work extremely bad.
Does it make sense to differentiate between developing the code base and developing applications?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink issue #2764: [FLINK-5008] Update quickstart documentation
Posted by NicoK <gi...@git.apache.org>.
Github user NicoK commented on the issue:
https://github.com/apache/flink/pull/2764
I wasn't able to test the Scala SBT path though, so this may need some additional love by someone with a working SBT environment
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/2764#discussion_r92392183
--- Diff: README.md ---
@@ -104,25 +104,11 @@ Check out our [Setting up IntelliJ](https://github.com/apache/flink/blob/master/
### Eclipse Scala IDE
-For Eclipse users, we recommend using Scala IDE 3.0.3, based on Eclipse Kepler. While this is a slightly older version,
-we found it to be the version that works most robustly for a complex project like Flink.
-
-Further details, and a guide to newer Scala IDE versions can be found in the
-[How to setup Eclipse](https://github.com/apache/flink/blob/master/docs/internals/ide_setup.md#eclipse) docs.
-
-**Note:** Before following this setup, make sure to run the build from the command line once
-(`mvn clean install -DskipTests`, see above)
-
-1. Download the Scala IDE (preferred) or install the plugin to Eclipse Kepler. See
- [How to setup Eclipse](https://github.com/apache/flink/blob/master/docs/internals/ide_setup.md#eclipse) for download links and instructions.
-2. Add the "macroparadise" compiler plugin to the Scala compiler.
- Open "Window" -> "Preferences" -> "Scala" -> "Compiler" -> "Advanced" and put into the "Xplugin" field the path to
- the *macroparadise* jar file (typically "/home/*-your-user-*/.m2/repository/org/scalamacros/paradise_2.10.4/2.0.1/paradise_2.10.4-2.0.1.jar").
- Note: If you do not have the jar file, you probably did not run the command line build.
-3. Import the Flink Maven projects ("File" -> "Import" -> "Maven" -> "Existing Maven Projects")
-4. During the import, Eclipse will ask to automatically install additional Maven build helper plugins.
-5. Close the "flink-java8" project. Since Eclipse Kepler does not support Java 8, you cannot develop this project.
+**NOTE:** From our experience, this setup does not work with Flink
--- End diff --
In the beginning of this paragraph it says "The Flink committers use IntelliJ IDEA and Eclipse IDE to develop the Flink codebase.". This should be changed as well since we cannot help to get a working setup.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/2764#discussion_r92399079
--- Diff: docs/quickstart/java_api_quickstart.md ---
@@ -46,39 +46,79 @@ Use one of the following commands to __create a project__:
{% highlight bash %}
$ mvn archetype:generate \
-DarchetypeGroupId=org.apache.flink \
- -DarchetypeArtifactId=flink-quickstart-java \
+ -DarchetypeArtifactId=flink-quickstart-java \{% unless site.is_stable %}
+ -DarchetypeCatalog=https://repository.apache.org/content/repositories/snapshots/ \{% endunless %}
-DarchetypeVersion={{site.version}}
{% endhighlight %}
This allows you to <strong>name your newly created project</strong>. It will interactively ask you for the groupId, artifactId, and package name.
</div>
<div class="tab-pane" id="quickstart-script">
{% highlight bash %}
+{% if site.is_stable %}
$ curl https://flink.apache.org/q/quickstart.sh | bash
+{% else %}
+ $ curl https://flink.apache.org/q/quickstart-SNAPSHOT.sh | bash
+{% endif %}
{% endhighlight %}
</div>
</div>
## Inspect Project
-There will be a new directory in your working directory. If you've used the _curl_ approach, the directory is called `quickstart`. Otherwise, it has the name of your artifactId.
+There will be a new directory in your working directory. If you've used
+the _curl_ approach, the directory is called `quickstart`. Otherwise,
+it has the name of your `artifactId`:
+
+{% highlight bash %}
+$ tree quickstart/
+quickstart/
+\u251c\u2500\u2500 pom.xml
+\u2514\u2500\u2500 src
+ \u2514\u2500\u2500 main
+ \u251c\u2500\u2500 java
+ \u2502�� \u2514\u2500\u2500 org
+ \u2502�� \u2514\u2500\u2500 myorg
+ \u2502�� \u2514\u2500\u2500 quickstart
+ \u2502�� \u251c\u2500\u2500 BatchJob.java
+ \u2502�� \u251c\u2500\u2500 SocketTextStreamWordCount.java
+ \u2502�� \u251c\u2500\u2500 StreamingJob.java
+ \u2502�� \u2514\u2500\u2500 WordCount.java
+ \u2514\u2500\u2500 resources
+ \u2514\u2500\u2500 log4j.properties
+{% endhighlight %}
The sample project is a __Maven project__, which contains four classes. _StreamingJob_ and _BatchJob_ are basic skeleton programs, _SocketTextStreamWordCount_ is a working streaming example and _WordCountJob_ is a working batch example. Please note that the _main_ method of all classes allow you to start Flink in a development/testing mode.
-We recommend you __import this project into your IDE__ to develop and test it. If you use Eclipse, the [m2e plugin](http://www.eclipse.org/m2e/) allows to [import Maven projects](http://books.sonatype.com/m2eclipse-book/reference/creating-sect-importing-projects.html#fig-creating-import). Some Eclipse bundles include that plugin by default, others require you to install it manually. The IntelliJ IDE also supports Maven projects out of the box.
+We recommend you __import this project into your IDE__ to develop and
+test it. If you use Eclipse, the [m2e plugin](http://www.eclipse.org/m2e/)
+allows to [import Maven projects](http://books.sonatype.com/m2eclipse-book/reference/creating-sect-importing-projects.html#fig-creating-import).
+Some Eclipse bundles include that plugin by default, others require you
+to install it manually. The IntelliJ IDE supports Maven projects out of
+the box.
-A note to Mac OS X users: The default JVM heapsize for Java is too small for Flink. You have to manually increase it. Choose "Run Configurations" -> Arguments and write into the "VM Arguments" box: "-Xmx800m" in Eclipse.
+*A note to Mac OS X users*: The default JVM heapsize for Java is too
+small for Flink. You have to manually increase it. In Eclipse, choose
--- End diff --
Is that only the case for Eclipse users?
If yes, it should be mentioned. If not, we should give instructions to increase the heapsize for IntelliJ as well.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/2764#discussion_r92398312
--- Diff: docs/quickstart/java_api_quickstart.md ---
@@ -46,39 +46,79 @@ Use one of the following commands to __create a project__:
{% highlight bash %}
$ mvn archetype:generate \
-DarchetypeGroupId=org.apache.flink \
- -DarchetypeArtifactId=flink-quickstart-java \
+ -DarchetypeArtifactId=flink-quickstart-java \{% unless site.is_stable %}
+ -DarchetypeCatalog=https://repository.apache.org/content/repositories/snapshots/ \{% endunless %}
-DarchetypeVersion={{site.version}}
{% endhighlight %}
This allows you to <strong>name your newly created project</strong>. It will interactively ask you for the groupId, artifactId, and package name.
</div>
<div class="tab-pane" id="quickstart-script">
{% highlight bash %}
+{% if site.is_stable %}
$ curl https://flink.apache.org/q/quickstart.sh | bash
+{% else %}
+ $ curl https://flink.apache.org/q/quickstart-SNAPSHOT.sh | bash
+{% endif %}
{% endhighlight %}
</div>
</div>
## Inspect Project
-There will be a new directory in your working directory. If you've used the _curl_ approach, the directory is called `quickstart`. Otherwise, it has the name of your artifactId.
+There will be a new directory in your working directory. If you've used
+the _curl_ approach, the directory is called `quickstart`. Otherwise,
--- End diff --
"the _curl_ approach" -> "the _curl_ shortcut"?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/2764#discussion_r92392410
--- Diff: docs/internals/ide_setup.md ---
@@ -25,104 +25,56 @@ under the License.
* Replaced by the TOC
{:toc}
-## Eclipse
-
-A brief guide how to set up Eclipse for development of the Flink core.
-Flink uses mixed Scala/Java projects, which pose a challenge to some IDEs.
-Below is the setup guide that works best from our personal experience.
-
-For Eclipse users, we currently recomment the Scala IDE 3.0.3, as the most robust solution.
-
-
-### Eclipse Scala IDE 3.0.3
-
-**NOTE:** While this version of the Scala IDE is not the newest, we have found it to be the most reliably working
-version for complex projects like Flink. One restriction is, though, that it works only with Java 7, not with Java 8.
-
-**Note:** Before following this setup, make sure to run the build from the command line once
-(`mvn clean package -DskipTests`)
-
-1. Download the Scala IDE (preferred) or install the plugin to Eclipse Kepler. See section below for download links
- and instructions.
-2. Add the "macroparadise" compiler plugin to the Scala compiler.
- Open "Window" -> "Preferences" -> "Scala" -> "Compiler" -> "Advanced" and put into the "Xplugin" field the path to
- the *macroparadise* jar file (typically "/home/*-your-user-*/.m2/repository/org/scalamacros/paradise_2.10.4/2.0.1/paradise_2.10.4-2.0.1.jar").
- Note: If you do not have the jar file, you probably did not ran the command line build.
-3. Import the Flink Maven projects ("File" -> "Import" -> "Maven" -> "Existing Maven Projects")
-4. During the import, Eclipse will ask to automatically install additional Maven build helper plugins.
-5. Close the "flink-java8" project. Since Eclipse Kepler does not support Java 8, you cannot develop this project.
-
-
-#### Download links for Scala IDE 3.0.3
-
-The Scala IDE 3.0.3 is a previous stable release, and download links are a bit hidden.
-
-The pre-packaged Scala IDE can be downloaded from the following links:
-
-* [Linux (64 bit)](http://downloads.typesafe.com/scalaide-pack/3.0.3.vfinal-210-20140327/scala-SDK-3.0.3-2.10-linux.gtk.x86_64.tar.gz)
-* [Linux (32 bit)](http://downloads.typesafe.com/scalaide-pack/3.0.3.vfinal-210-20140327/scala-SDK-3.0.3-2.10-linux.gtk.x86.tar.gz)
-* [MaxOS X Cocoa (64 bit)](http://downloads.typesafe.com/scalaide-pack/3.0.3.vfinal-210-20140327/scala-SDK-3.0.3-2.10-macosx.cocoa.x86_64.zip)
-* [MaxOS X Cocoa (32 bit)](http://downloads.typesafe.com/scalaide-pack/3.0.3.vfinal-210-20140327/scala-SDK-3.0.3-2.10-macosx.cocoa.x86.zip)
-* [Windows (64 bit)](http://downloads.typesafe.com/scalaide-pack/3.0.3.vfinal-210-20140327/scala-SDK-3.0.3-2.10-win32.win32.x86_64.zip)
-* [Windows (32 bit)](http://downloads.typesafe.com/scalaide-pack/3.0.3.vfinal-210-20140327/scala-SDK-3.0.3-2.10-win32.win32.x86.zip)
-
-Alternatively, you can download Eclipse Kepler from [https://eclipse.org/downloads/packages/release/Kepler/SR2](https://eclipse.org/downloads/packages/release/Kepler/SR2)
-and manually add the Scala and Maven plugins by plugin site at [http://scala-ide.org/download/prev-stable.html](http://scala-ide.org/download/prev-stable.html).
+The sections below describe how to import the Flink project into an IDE
+for the development of Flink itself. For writing Flink programs, please
+refer to the [Java API]({{ site.baseurl }}/quickstart/java_api_quickstart.html)
+and the [Scala API]({{ site.baseurl }}/quickstart/scala_api_quickstart.html)
+quickstart guides.
-* Either use the update site to install the plugin ("Help" -> "Install new Software")
-* Or download the [zip file](http://download.scala-ide.org/sdk/helium/e38/scala211/stable/update-site.zip), unpack it, and move the contents of the
- "plugins" and "features" folders into the equally named folders of the Eclipse root directory
-
-**NOTE:** It might happen that some modules do not build in Eclipse correctly (even if the maven build succeeds).
-To fix this, right-click in the corresponding Eclipse project and choose "Properties" and than "Maven".
-Uncheck the box labeled "Resolve dependencies from Workspace projects", click "Apply" and then "OK". "
-
-
-### Eclipse Scala IDE 4.0.0
-
-**NOTE: From personal experience, the use of the Scala IDE 4.0.0 performs worse than previous versions for complex projects like Flink.**
-**Version 4.0.0 does not handle mixed Java/Scala projects as robustly and it frequently raises incorrect import and type errors.**
-
-*Note:* Before following this setup, make sure to run the build from the command line once
-(`mvn clean package -DskipTests`)
-
-1. Download the Scala IDE: [http://scala-ide.org/download/sdk.html](http://scala-ide.org/download/sdk.html)
-2. Import the Flink Maven projects (File -> Import -> Maven -> Existing Maven Projects)
-3. While importing the Flink project, the IDE may ask you to install an additional maven build helper plugin.
-4. After the import, you need to set the Scala version of your projects to Scala 2.10 (from the default 2.11).
- To do that, select all projects that contain Scala code (marked by the small *S* on the project icon),
- right click and select "Scala -> Set the Scala Installation" and pick "2.10.4".
- Currently, the project to which that is relevant are "flink-runtime", "flink-scala", "flink-scala-examples",
- "flink-streaming-example", "flink-streaming-scala", "flink-tests", "flink-test-utils", and "flink-yarn".
-5. Depending on your version of the Scala IDE, you may need to add the "macroparadise" compiler plugin to the
- Scala compiler. Open "Window" -> "Preferences" -> "Scala" -> "Compiler" -> "Advanced" and put into the "Xplugin" field
- the path to the *macroparadise* jar file (typically "/home/*-your-user-*/.m2/repository/org/scalamacros/paradise_2.10.4/2.0.1/paradise_2.10.4-2.0.1.jar")
-6. In order to compile the "flink-java-8" project, you may need to add a Java 8 execution environment.
- See [this post](http://stackoverflow.com/questions/25391207/how-do-i-add-execution-environment-1-8-to-eclipse-luna)
- for details.
+**NOTE:** Whenever something is not working in your IDE, try with the maven
--- End diff --
"maven" -> "Maven"
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by NicoK <gi...@git.apache.org>.
Github user NicoK commented on a diff in the pull request:
https://github.com/apache/flink/pull/2764#discussion_r92608012
--- Diff: docs/quickstart/run_example_quickstart.md ---
@@ -90,23 +92,23 @@ use it in our program. Edit the `dependencies` section so that it looks like thi
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
- <artifactId>flink-streaming-java_2.10</artifactId>
+ <artifactId>flink-streaming-java_2.11</artifactId>
--- End diff --
yes, for Flink-1.2 at least
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/2764#discussion_r92400684
--- Diff: docs/quickstart/scala_api_quickstart.md ---
@@ -136,49 +136,82 @@ Use one of the following commands to __create a project__:
{% highlight bash %}
$ mvn archetype:generate \
-DarchetypeGroupId=org.apache.flink \
- -DarchetypeArtifactId=flink-quickstart-scala \
+ -DarchetypeArtifactId=flink-quickstart-scala \{% unless site.is_stable %}
+ -DarchetypeCatalog=https://repository.apache.org/content/repositories/snapshots/ \{% endunless %}
-DarchetypeVersion={{site.version}}
{% endhighlight %}
This allows you to <strong>name your newly created project</strong>. It will interactively ask you for the groupId, artifactId, and package name.
</div>
<div class="tab-pane" id="quickstart-script">
{% highlight bash %}
-$ curl https://flink.apache.org/q/quickstart-scala.sh | bash
+{% if site.is_stable %}
+ $ curl https://flink.apache.org/q/quickstart-scala.sh | bash
+{% else %}
+ $ curl https://flink.apache.org/q/quickstart-scala-SNAPSHOT.sh | bash
+{% endif %}
{% endhighlight %}
</div>
</div>
### Inspect Project
-There will be a new directory in your working directory. If you've used the _curl_ approach, the directory is called `quickstart`. Otherwise, it has the name of your artifactId.
+There will be a new directory in your working directory. If you've used
+the _curl_ approach, the directory is called `quickstart`. Otherwise,
--- End diff --
"approach" -> "shortcut"?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink issue #2764: [FLINK-5008] Update quickstart documentation
Posted by vasia <gi...@git.apache.org>.
Github user vasia commented on the issue:
https://github.com/apache/flink/pull/2764
Sorry, no input from me regarding Eclipse. I've given up on it about a year ago ;)
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink issue #2764: [FLINK-5008] Update quickstart documentation
Posted by thvasilo <gi...@git.apache.org>.
Github user thvasilo commented on the issue:
https://github.com/apache/flink/pull/2764
Hello @NicoK , do you think you can include [FLINK-5087](https://issues.apache.org/jira/browse/FLINK-5087) in this PR, or should we create a new one?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink issue #2764: [FLINK-5008] Update quickstart documentation
Posted by uce <gi...@git.apache.org>.
Github user uce commented on the issue:
https://github.com/apache/flink/pull/2764
@thvasilo I think that should be handled in a separate PR.
@StephanEwen Yes, I think this is a good differentiation to make in the docs. If it is not possible to write Flink programs with Eclipse, then we have a problem. I really hope that it is possible and we should check this. @NicoK Did you try to write a Flink program with Eclipse, for example using quick starts?
I think it's fine to drop the docs for Flink core dev with Eclipse if it is not possible to get it done in a straight forward manner. @vasia Do you have any input on this?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/2764#discussion_r92400994
--- Diff: docs/quickstart/scala_api_quickstart.md ---
@@ -194,7 +227,9 @@ data 1
is 1
~~~
-The following code shows the WordCount implementation from the Quickstart which processes some text lines with two operators (FlatMap and Reduce), and prints the resulting words and counts to std-out.
+The following code shows the `WordCount` implementation from the
+Quickstart which processes some text lines with two operators (FlatMap
+and Reduce), and prints the resulting words and counts to std-out.
--- End diff --
sum / reduce: See comment above
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by NicoK <gi...@git.apache.org>.
Github user NicoK commented on a diff in the pull request:
https://github.com/apache/flink/pull/2764#discussion_r92611981
--- Diff: docs/quickstart/java_api_quickstart.md ---
@@ -46,39 +46,79 @@ Use one of the following commands to __create a project__:
{% highlight bash %}
$ mvn archetype:generate \
-DarchetypeGroupId=org.apache.flink \
- -DarchetypeArtifactId=flink-quickstart-java \
+ -DarchetypeArtifactId=flink-quickstart-java \{% unless site.is_stable %}
+ -DarchetypeCatalog=https://repository.apache.org/content/repositories/snapshots/ \{% endunless %}
-DarchetypeVersion={{site.version}}
{% endhighlight %}
This allows you to <strong>name your newly created project</strong>. It will interactively ask you for the groupId, artifactId, and package name.
</div>
<div class="tab-pane" id="quickstart-script">
{% highlight bash %}
+{% if site.is_stable %}
$ curl https://flink.apache.org/q/quickstart.sh | bash
+{% else %}
+ $ curl https://flink.apache.org/q/quickstart-SNAPSHOT.sh | bash
+{% endif %}
{% endhighlight %}
</div>
</div>
## Inspect Project
-There will be a new directory in your working directory. If you've used the _curl_ approach, the directory is called `quickstart`. Otherwise, it has the name of your artifactId.
+There will be a new directory in your working directory. If you've used
+the _curl_ approach, the directory is called `quickstart`. Otherwise,
--- End diff --
yes, that's what it does (internally) but wouldn't you say, a user not knowing these sees the two ways of creating the repo as two "approaches" and would be rather confused calling it a "shortcut"? - it could be made explicit but then we could argue why the script is needed in the first place... (the user will copy the command anyway)
however I did not change that and did not intend to
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by NicoK <gi...@git.apache.org>.
Github user NicoK commented on a diff in the pull request:
https://github.com/apache/flink/pull/2764#discussion_r92619301
--- Diff: README.md ---
@@ -104,25 +104,11 @@ Check out our [Setting up IntelliJ](https://github.com/apache/flink/blob/master/
### Eclipse Scala IDE
-For Eclipse users, we recommend using Scala IDE 3.0.3, based on Eclipse Kepler. While this is a slightly older version,
-we found it to be the version that works most robustly for a complex project like Flink.
-
-Further details, and a guide to newer Scala IDE versions can be found in the
-[How to setup Eclipse](https://github.com/apache/flink/blob/master/docs/internals/ide_setup.md#eclipse) docs.
-
-**Note:** Before following this setup, make sure to run the build from the command line once
-(`mvn clean install -DskipTests`, see above)
-
-1. Download the Scala IDE (preferred) or install the plugin to Eclipse Kepler. See
- [How to setup Eclipse](https://github.com/apache/flink/blob/master/docs/internals/ide_setup.md#eclipse) for download links and instructions.
-2. Add the "macroparadise" compiler plugin to the Scala compiler.
- Open "Window" -> "Preferences" -> "Scala" -> "Compiler" -> "Advanced" and put into the "Xplugin" field the path to
- the *macroparadise* jar file (typically "/home/*-your-user-*/.m2/repository/org/scalamacros/paradise_2.10.4/2.0.1/paradise_2.10.4-2.0.1.jar").
- Note: If you do not have the jar file, you probably did not run the command line build.
-3. Import the Flink Maven projects ("File" -> "Import" -> "Maven" -> "Existing Maven Projects")
-4. During the import, Eclipse will ask to automatically install additional Maven build helper plugins.
-5. Close the "flink-java8" project. Since Eclipse Kepler does not support Java 8, you cannot develop this project.
+**NOTE:** From our experience, this setup does not work with Flink
--- End diff --
nice spotting this - changed that now
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/2764#discussion_r92399626
--- Diff: docs/quickstart/java_api_quickstart.md ---
@@ -46,39 +46,79 @@ Use one of the following commands to __create a project__:
{% highlight bash %}
$ mvn archetype:generate \
-DarchetypeGroupId=org.apache.flink \
- -DarchetypeArtifactId=flink-quickstart-java \
+ -DarchetypeArtifactId=flink-quickstart-java \{% unless site.is_stable %}
+ -DarchetypeCatalog=https://repository.apache.org/content/repositories/snapshots/ \{% endunless %}
-DarchetypeVersion={{site.version}}
{% endhighlight %}
This allows you to <strong>name your newly created project</strong>. It will interactively ask you for the groupId, artifactId, and package name.
</div>
<div class="tab-pane" id="quickstart-script">
{% highlight bash %}
+{% if site.is_stable %}
$ curl https://flink.apache.org/q/quickstart.sh | bash
+{% else %}
+ $ curl https://flink.apache.org/q/quickstart-SNAPSHOT.sh | bash
+{% endif %}
{% endhighlight %}
</div>
</div>
## Inspect Project
-There will be a new directory in your working directory. If you've used the _curl_ approach, the directory is called `quickstart`. Otherwise, it has the name of your artifactId.
+There will be a new directory in your working directory. If you've used
+the _curl_ approach, the directory is called `quickstart`. Otherwise,
+it has the name of your `artifactId`:
+
+{% highlight bash %}
+$ tree quickstart/
+quickstart/
+\u251c\u2500\u2500 pom.xml
+\u2514\u2500\u2500 src
+ \u2514\u2500\u2500 main
+ \u251c\u2500\u2500 java
+ \u2502�� \u2514\u2500\u2500 org
+ \u2502�� \u2514\u2500\u2500 myorg
+ \u2502�� \u2514\u2500\u2500 quickstart
+ \u2502�� \u251c\u2500\u2500 BatchJob.java
+ \u2502�� \u251c\u2500\u2500 SocketTextStreamWordCount.java
+ \u2502�� \u251c\u2500\u2500 StreamingJob.java
+ \u2502�� \u2514\u2500\u2500 WordCount.java
+ \u2514\u2500\u2500 resources
+ \u2514\u2500\u2500 log4j.properties
+{% endhighlight %}
The sample project is a __Maven project__, which contains four classes. _StreamingJob_ and _BatchJob_ are basic skeleton programs, _SocketTextStreamWordCount_ is a working streaming example and _WordCountJob_ is a working batch example. Please note that the _main_ method of all classes allow you to start Flink in a development/testing mode.
-We recommend you __import this project into your IDE__ to develop and test it. If you use Eclipse, the [m2e plugin](http://www.eclipse.org/m2e/) allows to [import Maven projects](http://books.sonatype.com/m2eclipse-book/reference/creating-sect-importing-projects.html#fig-creating-import). Some Eclipse bundles include that plugin by default, others require you to install it manually. The IntelliJ IDE also supports Maven projects out of the box.
+We recommend you __import this project into your IDE__ to develop and
+test it. If you use Eclipse, the [m2e plugin](http://www.eclipse.org/m2e/)
+allows to [import Maven projects](http://books.sonatype.com/m2eclipse-book/reference/creating-sect-importing-projects.html#fig-creating-import).
+Some Eclipse bundles include that plugin by default, others require you
+to install it manually. The IntelliJ IDE supports Maven projects out of
+the box.
-A note to Mac OS X users: The default JVM heapsize for Java is too small for Flink. You have to manually increase it. Choose "Run Configurations" -> Arguments and write into the "VM Arguments" box: "-Xmx800m" in Eclipse.
+*A note to Mac OS X users*: The default JVM heapsize for Java is too
+small for Flink. You have to manually increase it. In Eclipse, choose
+`Run Configurations -> Arguments` and write into the `VM Arguments`
+box: `-Xmx800m`.
## Build Project
-If you want to __build your project__, go to your project directory and issue the `mvn clean install -Pbuild-jar` command. You will __find a jar__ that runs on every Flink cluster in __target/your-artifact-id-{{ site.version }}.jar__. There is also a fat-jar, __target/your-artifact-id-{{ site.version }}-flink-fat-jar.jar__. This
+If you want to __build your project__, go to your project directory and
+issue the `mvn clean install -Pbuild-jar` command. You will
+__find a jar__ that runs on every Flink cluster in
--- End diff --
"every Flink cluster" -> "every Flink cluster with a compatible version"? Or rephrase the sentence.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by NicoK <gi...@git.apache.org>.
Github user NicoK commented on a diff in the pull request:
https://github.com/apache/flink/pull/2764#discussion_r92608383
--- Diff: docs/quickstart/java_api_quickstart.md ---
@@ -46,39 +46,79 @@ Use one of the following commands to __create a project__:
{% highlight bash %}
$ mvn archetype:generate \
-DarchetypeGroupId=org.apache.flink \
- -DarchetypeArtifactId=flink-quickstart-java \
+ -DarchetypeArtifactId=flink-quickstart-java \{% unless site.is_stable %}
+ -DarchetypeCatalog=https://repository.apache.org/content/repositories/snapshots/ \{% endunless %}
-DarchetypeVersion={{site.version}}
{% endhighlight %}
This allows you to <strong>name your newly created project</strong>. It will interactively ask you for the groupId, artifactId, and package name.
</div>
<div class="tab-pane" id="quickstart-script">
{% highlight bash %}
+{% if site.is_stable %}
$ curl https://flink.apache.org/q/quickstart.sh | bash
+{% else %}
+ $ curl https://flink.apache.org/q/quickstart-SNAPSHOT.sh | bash
+{% endif %}
{% endhighlight %}
</div>
</div>
## Inspect Project
-There will be a new directory in your working directory. If you've used the _curl_ approach, the directory is called `quickstart`. Otherwise, it has the name of your artifactId.
+There will be a new directory in your working directory. If you've used
+the _curl_ approach, the directory is called `quickstart`. Otherwise,
--- End diff --
shortcut doesn't sound right - at least to the user not knowing what is happening behind the script, you can consider the two options two different approaches of creating a quickstart project
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink issue #2764: [FLINK-5008] Update quickstart documentation
Posted by greghogan <gi...@git.apache.org>.
Github user greghogan commented on the issue:
https://github.com/apache/flink/pull/2764
I haven't yet looked at this PR in detail but it looks to have some much needed cleanup for the documentation.
Are we certain we need to abandon Eclipse as a viable IDE for Flink developers? The only thing worse than no support is a broken promise of support but have we tested later releases of the Scala IDE?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/2764#discussion_r92398867
--- Diff: docs/quickstart/java_api_quickstart.md ---
@@ -46,39 +46,79 @@ Use one of the following commands to __create a project__:
{% highlight bash %}
$ mvn archetype:generate \
-DarchetypeGroupId=org.apache.flink \
- -DarchetypeArtifactId=flink-quickstart-java \
+ -DarchetypeArtifactId=flink-quickstart-java \{% unless site.is_stable %}
+ -DarchetypeCatalog=https://repository.apache.org/content/repositories/snapshots/ \{% endunless %}
-DarchetypeVersion={{site.version}}
{% endhighlight %}
This allows you to <strong>name your newly created project</strong>. It will interactively ask you for the groupId, artifactId, and package name.
</div>
<div class="tab-pane" id="quickstart-script">
{% highlight bash %}
+{% if site.is_stable %}
$ curl https://flink.apache.org/q/quickstart.sh | bash
+{% else %}
+ $ curl https://flink.apache.org/q/quickstart-SNAPSHOT.sh | bash
+{% endif %}
{% endhighlight %}
</div>
</div>
## Inspect Project
-There will be a new directory in your working directory. If you've used the _curl_ approach, the directory is called `quickstart`. Otherwise, it has the name of your artifactId.
+There will be a new directory in your working directory. If you've used
+the _curl_ approach, the directory is called `quickstart`. Otherwise,
+it has the name of your `artifactId`:
+
+{% highlight bash %}
+$ tree quickstart/
+quickstart/
+\u251c\u2500\u2500 pom.xml
+\u2514\u2500\u2500 src
+ \u2514\u2500\u2500 main
+ \u251c\u2500\u2500 java
+ \u2502�� \u2514\u2500\u2500 org
+ \u2502�� \u2514\u2500\u2500 myorg
+ \u2502�� \u2514\u2500\u2500 quickstart
+ \u2502�� \u251c\u2500\u2500 BatchJob.java
+ \u2502�� \u251c\u2500\u2500 SocketTextStreamWordCount.java
+ \u2502�� \u251c\u2500\u2500 StreamingJob.java
+ \u2502�� \u2514\u2500\u2500 WordCount.java
+ \u2514\u2500\u2500 resources
+ \u2514\u2500\u2500 log4j.properties
+{% endhighlight %}
The sample project is a __Maven project__, which contains four classes. _StreamingJob_ and _BatchJob_ are basic skeleton programs, _SocketTextStreamWordCount_ is a working streaming example and _WordCountJob_ is a working batch example. Please note that the _main_ method of all classes allow you to start Flink in a development/testing mode.
-We recommend you __import this project into your IDE__ to develop and test it. If you use Eclipse, the [m2e plugin](http://www.eclipse.org/m2e/) allows to [import Maven projects](http://books.sonatype.com/m2eclipse-book/reference/creating-sect-importing-projects.html#fig-creating-import). Some Eclipse bundles include that plugin by default, others require you to install it manually. The IntelliJ IDE also supports Maven projects out of the box.
+We recommend you __import this project into your IDE__ to develop and
+test it. If you use Eclipse, the [m2e plugin](http://www.eclipse.org/m2e/)
+allows to [import Maven projects](http://books.sonatype.com/m2eclipse-book/reference/creating-sect-importing-projects.html#fig-creating-import).
+Some Eclipse bundles include that plugin by default, others require you
+to install it manually. The IntelliJ IDE supports Maven projects out of
+the box.
-A note to Mac OS X users: The default JVM heapsize for Java is too small for Flink. You have to manually increase it. Choose "Run Configurations" -> Arguments and write into the "VM Arguments" box: "-Xmx800m" in Eclipse.
+*A note to Mac OS X users*: The default JVM heapsize for Java is too
--- End diff --
Isn't the latest version called "macOS"?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink issue #2764: [FLINK-5008] Update quickstart documentation
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on the issue:
https://github.com/apache/flink/pull/2764
Thanks for the update @NicoK!
Merging this PR
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/2764#discussion_r92400095
--- Diff: docs/quickstart/java_api_quickstart.md ---
@@ -94,7 +134,9 @@ data 1
is 1
~~~
-The following code shows the WordCount implementation from the Quickstart which processes some text lines with two operators (FlatMap and Reduce), and prints the resulting words and counts to std-out.
+The following code shows the `WordCount` implementation from the
+Quickstart which processes some text lines with two operators (FlatMap
+and Reduce), and prints the resulting words and counts to std-out.
--- End diff --
The code does not show a `Reduce` but only `sum` which is executed as `Reduce`. Would be good to clarify this. Otherwise it might be confusing for readers.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/2764#discussion_r92400903
--- Diff: docs/quickstart/scala_api_quickstart.md ---
@@ -136,49 +136,82 @@ Use one of the following commands to __create a project__:
{% highlight bash %}
$ mvn archetype:generate \
-DarchetypeGroupId=org.apache.flink \
- -DarchetypeArtifactId=flink-quickstart-scala \
+ -DarchetypeArtifactId=flink-quickstart-scala \{% unless site.is_stable %}
+ -DarchetypeCatalog=https://repository.apache.org/content/repositories/snapshots/ \{% endunless %}
-DarchetypeVersion={{site.version}}
{% endhighlight %}
This allows you to <strong>name your newly created project</strong>. It will interactively ask you for the groupId, artifactId, and package name.
</div>
<div class="tab-pane" id="quickstart-script">
{% highlight bash %}
-$ curl https://flink.apache.org/q/quickstart-scala.sh | bash
+{% if site.is_stable %}
+ $ curl https://flink.apache.org/q/quickstart-scala.sh | bash
+{% else %}
+ $ curl https://flink.apache.org/q/quickstart-scala-SNAPSHOT.sh | bash
+{% endif %}
{% endhighlight %}
</div>
</div>
### Inspect Project
-There will be a new directory in your working directory. If you've used the _curl_ approach, the directory is called `quickstart`. Otherwise, it has the name of your artifactId.
+There will be a new directory in your working directory. If you've used
+the _curl_ approach, the directory is called `quickstart`. Otherwise,
+it has the name of your `artifactId`:
+
+{% highlight bash %}
+$ tree quickstart/
+quickstart/
+\u251c\u2500\u2500 pom.xml
+\u2514\u2500\u2500 src
+ \u2514\u2500\u2500 main
+ \u251c\u2500\u2500 resources
+ \u2502�� \u2514\u2500\u2500 log4j.properties
+ \u2514\u2500\u2500 scala
+ \u2514\u2500\u2500 org
+ \u2514\u2500\u2500 myorg
+ \u2514\u2500\u2500 quickstart
+ \u251c\u2500\u2500 BatchJob.scala
+ \u251c\u2500\u2500 SocketTextStreamWordCount.scala
+ \u251c\u2500\u2500 StreamingJob.scala
+ \u2514\u2500\u2500 WordCount.scala
+{% endhighlight %}
The sample project is a __Maven project__, which contains four classes. _StreamingJob_ and _BatchJob_ are basic skeleton programs, _SocketTextStreamWordCount_ is a working streaming example and _WordCountJob_ is a working batch example. Please note that the _main_ method of all classes allow you to start Flink in a development/testing mode.
We recommend you __import this project into your IDE__. For Eclipse, you need the following plugins, which you can install from the provided Eclipse Update Sites:
* _Eclipse 4.x_
- * [Scala IDE](http://download.scala-ide.org/sdk/e38/scala210/stable/site)
+ * [Scala IDE](http://download.scala-ide.org/sdk/lithium/e44/scala211/stable/site)
* [m2eclipse-scala](http://alchim31.free.fr/m2e-scala/update-site)
- * [Build Helper Maven Plugin](https://repository.sonatype.org/content/repositories/forge-sites/m2e-extras/0.15.0/N/0.15.0.201206251206/)
-* _Eclipse 3.7_
- * [Scala IDE](http://download.scala-ide.org/sdk/e37/scala210/stable/site)
+ * [Build Helper Maven Plugin](https://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-buildhelper/0.15.0/N/0.15.0.201207090124/)
+* _Eclipse 3.8_
+ * [Scala IDE for Scala 2.11](http://download.scala-ide.org/sdk/helium/e38/scala211/stable/site) or [Scala IDE for Scala 2.10](http://download.scala-ide.org/sdk/helium/e38/scala210/stable/site)
* [m2eclipse-scala](http://alchim31.free.fr/m2e-scala/update-site)
* [Build Helper Maven Plugin](https://repository.sonatype.org/content/repositories/forge-sites/m2e-extras/0.14.0/N/0.14.0.201109282148/)
-The IntelliJ IDE also supports Maven and offers a plugin for Scala development.
+The IntelliJ IDE supports Maven out of the box and offers a plugin for
+Scala development.
### Build Project
-If you want to __build your project__, go to your project directory and issue the `mvn clean package -Pbuild-jar` command. You will __find a jar__ that runs on every Flink cluster in __target/your-artifact-id-{{ site.version }}.jar__. There is also a fat-jar, __target/your-artifact-id-{{ site.version }}-flink-fat-jar.jar__. This
+If you want to __build your project__, go to your project directory and
+issue the `mvn clean package -Pbuild-jar` command. You will
+__find a jar__ that runs on every Flink cluster in
--- End diff --
every Flink cluster (see above)
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink issue #2764: [FLINK-5008] Update quickstart documentation
Posted by thvasilo <gi...@git.apache.org>.
Github user thvasilo commented on the issue:
https://github.com/apache/flink/pull/2764
IIRC @vasia is using Eclipse to develop, maybe she can chime in.
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/2764#discussion_r92404579
--- Diff: docs/quickstart/setup_quickstart.md ---
@@ -88,7 +111,9 @@ Now, we are going to run the [SocketWindowWordCount example](https://github.com/
</div>
</div>
-* Counts are printed to `stdout`. Monitor the JobManager's output file and write some text in `nc`:
+* Words are counted in time windows of 5 seconds (processing time, tumbling
+ windows) and are printed to `stdout`. Monitor the JobManager's output file
+ and write some text in `nc` (input is sent per line after hitting <RETURN>):
--- End diff --
"input is sent per line" -> "input is sent to Flink line by line"
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/2764#discussion_r92400793
--- Diff: docs/quickstart/scala_api_quickstart.md ---
@@ -136,49 +136,82 @@ Use one of the following commands to __create a project__:
{% highlight bash %}
$ mvn archetype:generate \
-DarchetypeGroupId=org.apache.flink \
- -DarchetypeArtifactId=flink-quickstart-scala \
+ -DarchetypeArtifactId=flink-quickstart-scala \{% unless site.is_stable %}
+ -DarchetypeCatalog=https://repository.apache.org/content/repositories/snapshots/ \{% endunless %}
-DarchetypeVersion={{site.version}}
{% endhighlight %}
This allows you to <strong>name your newly created project</strong>. It will interactively ask you for the groupId, artifactId, and package name.
</div>
<div class="tab-pane" id="quickstart-script">
{% highlight bash %}
-$ curl https://flink.apache.org/q/quickstart-scala.sh | bash
+{% if site.is_stable %}
+ $ curl https://flink.apache.org/q/quickstart-scala.sh | bash
+{% else %}
+ $ curl https://flink.apache.org/q/quickstart-scala-SNAPSHOT.sh | bash
+{% endif %}
{% endhighlight %}
</div>
</div>
### Inspect Project
-There will be a new directory in your working directory. If you've used the _curl_ approach, the directory is called `quickstart`. Otherwise, it has the name of your artifactId.
+There will be a new directory in your working directory. If you've used
+the _curl_ approach, the directory is called `quickstart`. Otherwise,
+it has the name of your `artifactId`:
+
+{% highlight bash %}
+$ tree quickstart/
+quickstart/
+\u251c\u2500\u2500 pom.xml
+\u2514\u2500\u2500 src
+ \u2514\u2500\u2500 main
+ \u251c\u2500\u2500 resources
+ \u2502�� \u2514\u2500\u2500 log4j.properties
+ \u2514\u2500\u2500 scala
+ \u2514\u2500\u2500 org
+ \u2514\u2500\u2500 myorg
+ \u2514\u2500\u2500 quickstart
+ \u251c\u2500\u2500 BatchJob.scala
+ \u251c\u2500\u2500 SocketTextStreamWordCount.scala
+ \u251c\u2500\u2500 StreamingJob.scala
+ \u2514\u2500\u2500 WordCount.scala
+{% endhighlight %}
The sample project is a __Maven project__, which contains four classes. _StreamingJob_ and _BatchJob_ are basic skeleton programs, _SocketTextStreamWordCount_ is a working streaming example and _WordCountJob_ is a working batch example. Please note that the _main_ method of all classes allow you to start Flink in a development/testing mode.
We recommend you __import this project into your IDE__. For Eclipse, you need the following plugins, which you can install from the provided Eclipse Update Sites:
* _Eclipse 4.x_
- * [Scala IDE](http://download.scala-ide.org/sdk/e38/scala210/stable/site)
+ * [Scala IDE](http://download.scala-ide.org/sdk/lithium/e44/scala211/stable/site)
* [m2eclipse-scala](http://alchim31.free.fr/m2e-scala/update-site)
- * [Build Helper Maven Plugin](https://repository.sonatype.org/content/repositories/forge-sites/m2e-extras/0.15.0/N/0.15.0.201206251206/)
-* _Eclipse 3.7_
- * [Scala IDE](http://download.scala-ide.org/sdk/e37/scala210/stable/site)
+ * [Build Helper Maven Plugin](https://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-buildhelper/0.15.0/N/0.15.0.201207090124/)
+* _Eclipse 3.8_
+ * [Scala IDE for Scala 2.11](http://download.scala-ide.org/sdk/helium/e38/scala211/stable/site) or [Scala IDE for Scala 2.10](http://download.scala-ide.org/sdk/helium/e38/scala210/stable/site)
* [m2eclipse-scala](http://alchim31.free.fr/m2e-scala/update-site)
* [Build Helper Maven Plugin](https://repository.sonatype.org/content/repositories/forge-sites/m2e-extras/0.14.0/N/0.14.0.201109282148/)
-The IntelliJ IDE also supports Maven and offers a plugin for Scala development.
+The IntelliJ IDE supports Maven out of the box and offers a plugin for
+Scala development.
### Build Project
-If you want to __build your project__, go to your project directory and issue the `mvn clean package -Pbuild-jar` command. You will __find a jar__ that runs on every Flink cluster in __target/your-artifact-id-{{ site.version }}.jar__. There is also a fat-jar, __target/your-artifact-id-{{ site.version }}-flink-fat-jar.jar__. This
+If you want to __build your project__, go to your project directory and
+issue the `mvn clean package -Pbuild-jar` command. You will
+__find a jar__ that runs on every Flink cluster in
+__target/original-your-artifact-id-your-version.jar__. There is also a
+fat-jar, __target/your-artifact-id-your-version.jar__. This
also contains all dependencies that get added to the maven project.
--- End diff --
maven -> Maven
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink issue #2764: [FLINK-5008] Update quickstart documentation
Posted by NicoK <gi...@git.apache.org>.
Github user NicoK commented on the issue:
https://github.com/apache/flink/pull/2764
I'll look into writing Flink programs with Eclipse and update the documentation if needed
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/flink/pull/2764
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/2764#discussion_r92399649
--- Diff: docs/quickstart/java_api_quickstart.md ---
@@ -46,39 +46,79 @@ Use one of the following commands to __create a project__:
{% highlight bash %}
$ mvn archetype:generate \
-DarchetypeGroupId=org.apache.flink \
- -DarchetypeArtifactId=flink-quickstart-java \
+ -DarchetypeArtifactId=flink-quickstart-java \{% unless site.is_stable %}
+ -DarchetypeCatalog=https://repository.apache.org/content/repositories/snapshots/ \{% endunless %}
-DarchetypeVersion={{site.version}}
{% endhighlight %}
This allows you to <strong>name your newly created project</strong>. It will interactively ask you for the groupId, artifactId, and package name.
</div>
<div class="tab-pane" id="quickstart-script">
{% highlight bash %}
+{% if site.is_stable %}
$ curl https://flink.apache.org/q/quickstart.sh | bash
+{% else %}
+ $ curl https://flink.apache.org/q/quickstart-SNAPSHOT.sh | bash
+{% endif %}
{% endhighlight %}
</div>
</div>
## Inspect Project
-There will be a new directory in your working directory. If you've used the _curl_ approach, the directory is called `quickstart`. Otherwise, it has the name of your artifactId.
+There will be a new directory in your working directory. If you've used
+the _curl_ approach, the directory is called `quickstart`. Otherwise,
+it has the name of your `artifactId`:
+
+{% highlight bash %}
+$ tree quickstart/
+quickstart/
+\u251c\u2500\u2500 pom.xml
+\u2514\u2500\u2500 src
+ \u2514\u2500\u2500 main
+ \u251c\u2500\u2500 java
+ \u2502�� \u2514\u2500\u2500 org
+ \u2502�� \u2514\u2500\u2500 myorg
+ \u2502�� \u2514\u2500\u2500 quickstart
+ \u2502�� \u251c\u2500\u2500 BatchJob.java
+ \u2502�� \u251c\u2500\u2500 SocketTextStreamWordCount.java
+ \u2502�� \u251c\u2500\u2500 StreamingJob.java
+ \u2502�� \u2514\u2500\u2500 WordCount.java
+ \u2514\u2500\u2500 resources
+ \u2514\u2500\u2500 log4j.properties
+{% endhighlight %}
The sample project is a __Maven project__, which contains four classes. _StreamingJob_ and _BatchJob_ are basic skeleton programs, _SocketTextStreamWordCount_ is a working streaming example and _WordCountJob_ is a working batch example. Please note that the _main_ method of all classes allow you to start Flink in a development/testing mode.
-We recommend you __import this project into your IDE__ to develop and test it. If you use Eclipse, the [m2e plugin](http://www.eclipse.org/m2e/) allows to [import Maven projects](http://books.sonatype.com/m2eclipse-book/reference/creating-sect-importing-projects.html#fig-creating-import). Some Eclipse bundles include that plugin by default, others require you to install it manually. The IntelliJ IDE also supports Maven projects out of the box.
+We recommend you __import this project into your IDE__ to develop and
+test it. If you use Eclipse, the [m2e plugin](http://www.eclipse.org/m2e/)
+allows to [import Maven projects](http://books.sonatype.com/m2eclipse-book/reference/creating-sect-importing-projects.html#fig-creating-import).
+Some Eclipse bundles include that plugin by default, others require you
+to install it manually. The IntelliJ IDE supports Maven projects out of
+the box.
-A note to Mac OS X users: The default JVM heapsize for Java is too small for Flink. You have to manually increase it. Choose "Run Configurations" -> Arguments and write into the "VM Arguments" box: "-Xmx800m" in Eclipse.
+*A note to Mac OS X users*: The default JVM heapsize for Java is too
+small for Flink. You have to manually increase it. In Eclipse, choose
+`Run Configurations -> Arguments` and write into the `VM Arguments`
+box: `-Xmx800m`.
## Build Project
-If you want to __build your project__, go to your project directory and issue the `mvn clean install -Pbuild-jar` command. You will __find a jar__ that runs on every Flink cluster in __target/your-artifact-id-{{ site.version }}.jar__. There is also a fat-jar, __target/your-artifact-id-{{ site.version }}-flink-fat-jar.jar__. This
+If you want to __build your project__, go to your project directory and
+issue the `mvn clean install -Pbuild-jar` command. You will
+__find a jar__ that runs on every Flink cluster in
+__target/original-your-artifact-id-your-version.jar__. There is also a
+fat-jar, __target/your-artifact-id-your-version.jar__. This
also contains all dependencies that get added to the maven project.
--- End diff --
"maven" -> "Maven"
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] flink pull request #2764: [FLINK-5008] Update quickstart documentation
Posted by fhueske <gi...@git.apache.org>.
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/2764#discussion_r92400530
--- Diff: docs/quickstart/run_example_quickstart.md ---
@@ -90,23 +92,23 @@ use it in our program. Edit the `dependencies` section so that it looks like thi
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
- <artifactId>flink-streaming-java_2.10</artifactId>
+ <artifactId>flink-streaming-java_2.11</artifactId>
--- End diff --
Why is this changed to Scala 2.11. Is this the default of the quickstarts?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---