flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject flink git commit: [FLINK-3592] [docs] Update setup quickstart
Date Tue, 08 Mar 2016 17:44:57 GMT
Repository: flink
Updated Branches:
  refs/heads/release-1.0 d4c2a47e2 -> bb9c1fa1f


[FLINK-3592] [docs] Update setup quickstart


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/bb9c1fa1
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/bb9c1fa1
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/bb9c1fa1

Branch: refs/heads/release-1.0
Commit: bb9c1fa1f39f3b2c2f38c71edc365e3691d2dbe3
Parents: d4c2a47
Author: Ufuk Celebi <uce@apache.org>
Authored: Tue Mar 8 18:40:51 2016 +0100
Committer: Ufuk Celebi <uce@apache.org>
Committed: Tue Mar 8 18:44:02 2016 +0100

----------------------------------------------------------------------
 docs/page/img/quickstart-setup/jobmanager-1.png | Bin 0 -> 118647 bytes
 docs/page/img/quickstart-setup/jobmanager-2.png | Bin 0 -> 136935 bytes
 docs/page/img/quickstart-setup/jobmanager-3.png | Bin 0 -> 184257 bytes
 docs/page/img/quickstart-setup/setup.gif        | Bin 0 -> 495692 bytes
 docs/quickstart/setup_quickstart.md             | 117 +++++++++++--------
 5 files changed, 70 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/bb9c1fa1/docs/page/img/quickstart-setup/jobmanager-1.png
----------------------------------------------------------------------
diff --git a/docs/page/img/quickstart-setup/jobmanager-1.png b/docs/page/img/quickstart-setup/jobmanager-1.png
new file mode 100644
index 0000000..c6ecfb1
Binary files /dev/null and b/docs/page/img/quickstart-setup/jobmanager-1.png differ

http://git-wip-us.apache.org/repos/asf/flink/blob/bb9c1fa1/docs/page/img/quickstart-setup/jobmanager-2.png
----------------------------------------------------------------------
diff --git a/docs/page/img/quickstart-setup/jobmanager-2.png b/docs/page/img/quickstart-setup/jobmanager-2.png
new file mode 100644
index 0000000..724f21e
Binary files /dev/null and b/docs/page/img/quickstart-setup/jobmanager-2.png differ

http://git-wip-us.apache.org/repos/asf/flink/blob/bb9c1fa1/docs/page/img/quickstart-setup/jobmanager-3.png
----------------------------------------------------------------------
diff --git a/docs/page/img/quickstart-setup/jobmanager-3.png b/docs/page/img/quickstart-setup/jobmanager-3.png
new file mode 100644
index 0000000..8572cf1
Binary files /dev/null and b/docs/page/img/quickstart-setup/jobmanager-3.png differ

http://git-wip-us.apache.org/repos/asf/flink/blob/bb9c1fa1/docs/page/img/quickstart-setup/setup.gif
----------------------------------------------------------------------
diff --git a/docs/page/img/quickstart-setup/setup.gif b/docs/page/img/quickstart-setup/setup.gif
new file mode 100644
index 0000000..bc9aad6
Binary files /dev/null and b/docs/page/img/quickstart-setup/setup.gif differ

http://git-wip-us.apache.org/repos/asf/flink/blob/bb9c1fa1/docs/quickstart/setup_quickstart.md
----------------------------------------------------------------------
diff --git a/docs/quickstart/setup_quickstart.md b/docs/quickstart/setup_quickstart.md
index 7e28148..94d41ac 100644
--- a/docs/quickstart/setup_quickstart.md
+++ b/docs/quickstart/setup_quickstart.md
@@ -27,42 +27,22 @@ under the License.
 * This will be replaced by the TOC
 {:toc}
 
-Get Flink up and running in a few simple steps.
-
-## Requirements
-
-Flink runs on __Linux, Mac OS X, and Windows__. To be able to run Flink, the
-only requirement is to have a working __Java 7.x__ (or higher)
-installation. Windows users, please take a look at the
-[Flink on Windows]({{ site.baseurl }}/setup/local_setup.html#flink-on-windows) guide which
describes
-how to run Flink on Windows for local setups.
-
-## Download
-Download the ready to run binary package. Choose the Flink distribution that __matches your
Hadoop version__. If you are unsure which version to choose or you just want to run locally,
pick the package for Hadoop 1.2.
-
-<ul class="nav nav-tabs">
-  <li class="active"><a href="#bin-hadoop1" data-toggle="tab">Hadoop 1.2</a></li>
-  <li><a href="#bin-hadoop2" data-toggle="tab">Hadoop 2 (YARN)</a></li>
-</ul>
-<p>
-<div class="tab-content text-center">
-  <div class="tab-pane active" id="bin-hadoop1">
-    <a class="btn btn-info btn-lg" onclick="_gaq.push(['_trackEvent','Action','download-quickstart-setup-1',this.href]);"
href="{{site.FLINK_DOWNLOAD_URL_HADOOP1_STABLE}}"><i class="icon-download"> </i>
Download Flink for Hadoop 1.2</a>
-  </div>
-  <div class="tab-pane" id="bin-hadoop2">
-    <a class="btn btn-info btn-lg" onclick="_gaq.push(['_trackEvent','Action','download-quickstart-setup-2',this.href]);"
href="{{site.FLINK_DOWNLOAD_URL_HADOOP2_STABLE}}"><i class="icon-download"> </i>
Download Flink for Hadoop 2</a>
-  </div>
-</div>
-</p>
+Get a Flink example program up and running in a few simple steps.
+
+## Setup: Download and Start
 
+Flink runs on __Linux, Mac OS X, and Windows__. To be able to run Flink, the only requirement
is to have a working __Java 7.x__ (or higher) installation. Windows users, please take a look
at the [Flink on Windows]({{ site.baseurl }}/setup/local_setup.html#flink-on-windows) guide
which describes how to run Flink on Windows for local setups.
 
-## Start
+### Download
+
+Download a binary from the [downloads page](http://flink.apache.org/downloads.html). You
can pick any Hadoop/Scala combination you like, for instance [Flink for Hadoop 2]({{ site.FLINK_DOWNLOAD_URL_HADOOP2_STABLE
}}).
+
+### Start a Local Flink Cluster
 
 1. Go to the download directory.
 2. Unpack the downloaded archive.
 3. Start Flink.
 
-
 ~~~bash
 $ cd ~/Downloads        # Go to download directory
 $ tar xzf flink-*.tgz   # Unpack the downloaded archive
@@ -70,37 +50,81 @@ $ cd flink-{{site.version}}
 $ bin/start-local.sh    # Start Flink
 ~~~
 
-Check the __JobManager's web frontend__ at [http://localhost:8081](http://localhost:8081)
and make
-sure everything is up and running.
+Check the __JobManager's web frontend__ at [http://localhost:8081](http://localhost:8081)
and make sure everything is up and running. The web frontend should report a single available
TaskManager instance.
+
+<a href="{{ site.baseurl }}/page/img/quickstart-setup/jobmanager-1.png" ><img class="img-responsive"
src="{{ site.baseurl }}/page/img/quickstart-setup/jobmanager-1.png" alt="JobManager: Overview"/></a>
 
 ## Run Example
 
-Run the __Word Count example__ to see Flink at work.
+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.
+
+* First of all, we use **netcat** to start local server via
+
+  ~~~bash
+  $ nc -l -p 9000
+  ~~~ 
 
-* __Download test data__:
+* Submit the Flink program:
 
   ~~~bash
-  $ wget -O hamlet.txt http://www.gutenberg.org/cache/epub/1787/pg1787.txt
+  $ bin/flink run examples/streaming/SocketTextStreamWordCount.jar \
+    --hostname localhost \
+    --port 9000
+  Printing result to stdout. Use --output to specify output path.
+  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
+  03/08/2016 17:21:56 Keyed Aggregation -> Sink: Unnamed(1/1) switched to SCHEDULED
+  03/08/2016 17:21:56 Keyed Aggregation -> Sink: Unnamed(1/1) switched to DEPLOYING
+  03/08/2016 17:21:56 Source: Socket Stream -> Flat Map(1/1) switched to RUNNING
+  03/08/2016 17:21:56 Keyed Aggregation -> Sink: Unnamed(1/1) switched to RUNNING
   ~~~
 
-* You now have a text file called _hamlet.txt_ in your working directory.
-* __Start the example program__:
+  The program connects to the socket and waits for input. You can check the web interface
to verify that the job is running as expected:
+
+  <div class="row">
+    <div class="col-sm-6">
+      <a href="{{ site.baseurl }}/page/img/quickstart-setup/jobmanager-2.png" ><img
class="img-responsive" src="{{ site.baseurl }}/page/img/quickstart-setup/jobmanager-2.png"
alt="JobManager: Overview (cont'd)"/></a>
+    </div>
+    <div class="col-sm-6">
+      <a href="{{ site.baseurl }}/page/img/quickstart-setup/jobmanager-3.png" ><img
class="img-responsive" src="{{ site.baseurl }}/page/img/quickstart-setup/jobmanager-3.png"
alt="JobManager: Running Jobs"/></a>
+    </div>
+  </div>
+
+* Counts are printed to `stdout`. Monitor the JobManager's output file and write some text
in `nc`:
 
   ~~~bash
-  $ bin/flink run ./examples/batch/WordCount.jar --input file://`pwd`/hamlet.txt --output
file://`pwd`/wordcount-result.txt
+  $ nc -l -p 9000
+  lorem ipsum
+  ipsum ipsum ipsum
+  bye
   ~~~
 
-* You will find a file called __wordcount-result.txt__ in your current directory.
+  The `.out` file will print the counts immediately:
 
-## Stop
+  ~~~bash
+  $ tail -f log/flink-*-jobmanager-*.out
+  (lorem,1)
+  (ipsum,1)
+  (ipsum,2)
+  (ipsum,3)
+  (ipsum,4)
+  (bye,1)
+  ~~~~
 
-To stop Flink when you're done, you just have to type:
+  To **stop** Flink when you're done type:
 
-~~~bash
-$ bin/stop-local.sh
-~~~
+  ~~~bash
+  $ bin/stop-local.sh
+  ~~~
+
+  <a href="{{ site.baseurl }}/page/img/quickstart-setup/setup.gif" ><img class="img-responsive"
src="{{ site.baseurl }}/page/img/quickstart-setup/setup.gif" alt="Quickstart: Setup"/></a>
+
+## Next Steps
 
-## Cluster Setup
+Check out the [step-by-step example](run_example_quickstart.html) in order to get a first
feel of Flink's programming APIs. When you are done with that, go ahead and read the [streaming
guide]({{ site.baseurl }}/apis/streaming/).
+
+### Cluster Setup
 
 __Running Flink on a cluster__ is as easy as running it locally. Having __passwordless SSH__
and
 __the same directory structure__ on all your cluster nodes lets you use our scripts to control
@@ -155,11 +179,10 @@ In particular,
 
 are very important configuration values.
 
-## Flink on YARN
+### Flink on YARN
+
 You can easily deploy Flink on your existing __YARN cluster__.
 
 1. Download the __Flink Hadoop2 package__: [Flink with Hadoop 2]({{site.FLINK_DOWNLOAD_URL_HADOOP2_STABLE}})
 2. Make sure your __HADOOP_HOME__ (or _YARN_CONF_DIR_ or _HADOOP_CONF_DIR_) __environment
variable__ is set to read your YARN and HDFS configuration.
 3. Run the __YARN client__ with: `./bin/yarn-session.sh`. You can run the client with options
`-n 10 -tm 8192` to allocate 10 TaskManagers with 8GB of memory each.
-
-For __more detailed instructions__, check out the programming Guides and examples.


Mime
View raw message