提交 ba12a751 编写于 作者: S Stephan Ewen

[FLINK-4285] [docs] Update the setup quickstart guide with the new SocketWindowWordCount example

上级 8847955f
......@@ -56,7 +56,7 @@ Check the __JobManager's web frontend__ at [http://localhost:8081](http://localh
## Run Example
Now, we are going to run the [SocketTextStreamWordCount example](https://github.com/apache/flink/blob/release-1.0.0/flink-quickstart/flink-quickstart-java/src/main/resources/archetype-resources/src/main/java/SocketTextStreamWordCount.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.
* First of all, we use **netcat** to start local server via
......@@ -67,10 +67,8 @@ Now, we are going to run the [SocketTextStreamWordCount example](https://github.
* Submit the Flink program:
~~~bash
$ bin/flink run examples/streaming/SocketTextStreamWordCount.jar \
--hostname localhost \
--port 9000
Printing result to stdout. Use --output to specify output path.
$ bin/flink run examples/streaming/SocketWindowWordCount.jar --port 9000
03/08/2016 17:21:56 Job execution switched to status RUNNING.
03/08/2016 17:21:56 Source: Socket Stream -> Flat Map(1/1) switched to SCHEDULED
03/08/2016 17:21:56 Source: Socket Stream -> Flat Map(1/1) switched to DEPLOYING
......
......@@ -48,7 +48,7 @@ public class SocketWindowWordCount {
final ParameterTool params = ParameterTool.fromArgs(args);
port = params.getInt("port");
} catch (Exception e) {
System.err.println("No port specified. Please run 'WindowWordCount --port <port>', " +
System.err.println("No port specified. Please run 'SocketWindowWordCount --port <port>', " +
"where port is the address of the text server");
System.err.println("To start a simple text server, run 'netcat -l <port>' and type the input text " +
"into the command line");
......
......@@ -43,7 +43,7 @@ object SocketWindowWordCount {
ParameterTool.fromArgs(args).getInt("port")
} catch {
case e: Exception => {
System.err.println("No port specified. Please run 'WindowWordCount --port <port>', " +
System.err.println("No port specified. Please run 'SocketWindowWordCount --port <port>', " +
"where port is the address of the text server")
System.err.println("To start a simple text server, run 'netcat -l <port>' " +
"and type the input text into the command line")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册