You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by sj...@apache.org on 2020/07/02 17:07:39 UTC

[flink] branch release-1.11 updated: [FLINK-18472][docs] Local Installation Getting Started Guide

This is an automated email from the ASF dual-hosted git repository.

sjwiesman pushed a commit to branch release-1.11
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/release-1.11 by this push:
     new fc79952  [FLINK-18472][docs] Local Installation Getting Started Guide
fc79952 is described below

commit fc799523457f45218c697cb10ebd016e72045386
Author: Seth Wiesman <sj...@gmail.com>
AuthorDate: Thu Jul 2 10:39:13 2020 -0500

    [FLINK-18472][docs] Local Installation Getting Started Guide
    
    This closes #12810
---
 docs/index.md                                    |  1 +
 docs/index.zh.md                                 |  1 +
 docs/try-flink/datastream_api.md                 |  2 +-
 docs/try-flink/datastream_api.zh.md              |  2 +-
 docs/try-flink/flink-operations-playground.md    |  2 +-
 docs/try-flink/flink-operations-playground.zh.md |  2 +-
 docs/try-flink/local_installation.md             | 92 ++++++++++++++++++++++++
 docs/try-flink/local_installation.zh.md          | 92 ++++++++++++++++++++++++
 docs/try-flink/python_table_api.md               |  2 +-
 docs/try-flink/python_table_api.zh.md            |  2 +-
 docs/try-flink/table_api.md                      |  2 +-
 docs/try-flink/table_api.zh.md                   |  2 +-
 12 files changed, 194 insertions(+), 8 deletions(-)

diff --git a/docs/index.md b/docs/index.md
index 8ec9672..ae73a9c 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -34,6 +34,7 @@ Apache Flink is a framework and distributed processing engine for stateful compu
 
 If you’re interested in playing around with Flink, try one of our tutorials:
 
+* [Local Installation]({% link try-flink/local_installation.md %})
 * [Fraud Detection with the DataStream API]({% link try-flink/datastream_api.md %})
 * [Real Time Reporting with the Table API]({% link try-flink/table_api.md %})
 * [Intro to the Python Table API]({% link try-flink/python_table_api.md %})
diff --git a/docs/index.zh.md b/docs/index.zh.md
index 13c2ef4..f9a7966 100644
--- a/docs/index.zh.md
+++ b/docs/index.zh.md
@@ -34,6 +34,7 @@ Apache Flink 是一个在无界和有界数据流上进行状态计算的框架
 
 如果您有兴趣使用 Flink, 可以试试我们的教程:
 
+* [Local Installation]({% link try-flink/local_installation.zh.md %})
 * [DataStream API 进行欺诈检测]({% link try-flink/datastream_api.zh.md %})
 * [Table API 构建实时报表]({% link try-flink/table_api.zh.md %})
 * [Python API 教程]({% link try-flink/python_table_api.zh.md %})
diff --git a/docs/try-flink/datastream_api.md b/docs/try-flink/datastream_api.md
index 33ed8ab..3d2e323 100644
--- a/docs/try-flink/datastream_api.md
+++ b/docs/try-flink/datastream_api.md
@@ -2,7 +2,7 @@
 title: "Fraud Detection with the DataStream API"
 nav-title: 'Fraud Detection with the DataStream API'
 nav-parent_id: try-flink
-nav-pos: 1
+nav-pos: 2
 ---
 <!--
 Licensed to the Apache Software Foundation (ASF) under one
diff --git a/docs/try-flink/datastream_api.zh.md b/docs/try-flink/datastream_api.zh.md
index 1e00af0..5e9e27a 100644
--- a/docs/try-flink/datastream_api.zh.md
+++ b/docs/try-flink/datastream_api.zh.md
@@ -2,7 +2,7 @@
 title: "基于 DataStream API 实现欺诈检测"
 nav-title: '基于 DataStream API 实现欺诈检测'
 nav-parent_id: try-flink
-nav-pos: 1
+nav-pos: 2
 ---
 <!--
 Licensed to the Apache Software Foundation (ASF) under one
diff --git a/docs/try-flink/flink-operations-playground.md b/docs/try-flink/flink-operations-playground.md
index 9a44698..67e37d9 100644
--- a/docs/try-flink/flink-operations-playground.md
+++ b/docs/try-flink/flink-operations-playground.md
@@ -2,7 +2,7 @@
 title: "Flink Operations Playground"
 nav-title: 'Flink Operations Playground'
 nav-parent_id: try-flink
-nav-pos: 4
+nav-pos: 5
 ---
 <!--
 Licensed to the Apache Software Foundation (ASF) under one
diff --git a/docs/try-flink/flink-operations-playground.zh.md b/docs/try-flink/flink-operations-playground.zh.md
index e5bc871..0945a2f 100644
--- a/docs/try-flink/flink-operations-playground.zh.md
+++ b/docs/try-flink/flink-operations-playground.zh.md
@@ -2,7 +2,7 @@
 title: "Flink 运维操场"
 nav-title: 'Flink 运维操场'
 nav-parent_id: try-flink
-nav-pos: 4
+nav-pos: 5
 ---
 <!--
 Licensed to the Apache Software Foundation (ASF) under one
diff --git a/docs/try-flink/local_installation.md b/docs/try-flink/local_installation.md
new file mode 100644
index 0000000..e6e5b50
--- /dev/null
+++ b/docs/try-flink/local_installation.md
@@ -0,0 +1,92 @@
+---
+title: "Local Installation"
+nav-title: 'Local Installation'
+nav-parent_id: try-flink
+nav-pos: 1
+---
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+ 
+{% if site.version contains "SNAPSHOT" %}
+<p style="border-radius: 5px; padding: 5px" class="bg-danger">
+  <b>
+  NOTE: The Apache Flink community only publishes official builds for
+  released versions of Apache Flink.
+  </b><br>
+  Since you are currently looking at the latest SNAPSHOT
+  version of the documentation, all version references below will not work.
+  Please switch the documentation to the latest released version via the release picker which you
+  find on the left side below the menu.
+</p>
+{% else %}
+Follow these few steps to download the latest stable versions and get started.
+
+## Step 1: Download
+
+To be able to run Flink, the only requirement is to have a working __Java 8 or 11__ installation.
+You can check the correct installation of Java by issuing the following command:
+
+{% highlight bash %}
+java -version
+{% endhighlight %}
+
+[Download](https://flink.apache.org/downloads.html) the {{ site.version }} release and un-tar it. 
+
+{% highlight bash %}
+$ tar -xzf flink-{{ site.version }}-bin-scala{{ site.scala_version_suffix }}.tgz
+$ cd flink-{{ site.version }}-bin-scala{{ site.scala_version_suffix }}
+{% endhighlight %}
+
+## Step 2: Start a Cluster
+
+Flink ships with a single bash script to start a local cluster.
+
+{% highlight bash %}
+$ ./bin/start-cluster.sh
+Starting cluster.
+Starting standalonesession daemon on host.
+Starting taskexecutor daemon on host.
+{% endhighlight %}
+
+## Step 3: Submit a Job
+
+Releases of Flink come with a number of example Jobs.
+You can quickly deploy one of these applications to the running cluster. 
+
+{% highlight bash %}
+$ ./bin/flink run examples/streaming/WordCount.jar
+$ tail log/flink-*-taskexecutor-*.out
+  (to,1)
+  (be,1)
+  (or,1)
+  (not,1)
+  (to,2)
+  (be,2)
+{% endhighlight %}
+
+Additionally, you can check Flink's [Web UI](http://localhost:8080) to monitor the status of the Cluster and running Job.
+
+## Step 4: Stop the Cluster
+
+When you are finished you can quickly stop the cluster and all running components.
+
+{% highlight bash %}
+$ ./bin/stop-cluster.sh
+{% endhighlight %}
+{% endif %}
diff --git a/docs/try-flink/local_installation.zh.md b/docs/try-flink/local_installation.zh.md
new file mode 100644
index 0000000..e6e5b50
--- /dev/null
+++ b/docs/try-flink/local_installation.zh.md
@@ -0,0 +1,92 @@
+---
+title: "Local Installation"
+nav-title: 'Local Installation'
+nav-parent_id: try-flink
+nav-pos: 1
+---
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+ 
+{% if site.version contains "SNAPSHOT" %}
+<p style="border-radius: 5px; padding: 5px" class="bg-danger">
+  <b>
+  NOTE: The Apache Flink community only publishes official builds for
+  released versions of Apache Flink.
+  </b><br>
+  Since you are currently looking at the latest SNAPSHOT
+  version of the documentation, all version references below will not work.
+  Please switch the documentation to the latest released version via the release picker which you
+  find on the left side below the menu.
+</p>
+{% else %}
+Follow these few steps to download the latest stable versions and get started.
+
+## Step 1: Download
+
+To be able to run Flink, the only requirement is to have a working __Java 8 or 11__ installation.
+You can check the correct installation of Java by issuing the following command:
+
+{% highlight bash %}
+java -version
+{% endhighlight %}
+
+[Download](https://flink.apache.org/downloads.html) the {{ site.version }} release and un-tar it. 
+
+{% highlight bash %}
+$ tar -xzf flink-{{ site.version }}-bin-scala{{ site.scala_version_suffix }}.tgz
+$ cd flink-{{ site.version }}-bin-scala{{ site.scala_version_suffix }}
+{% endhighlight %}
+
+## Step 2: Start a Cluster
+
+Flink ships with a single bash script to start a local cluster.
+
+{% highlight bash %}
+$ ./bin/start-cluster.sh
+Starting cluster.
+Starting standalonesession daemon on host.
+Starting taskexecutor daemon on host.
+{% endhighlight %}
+
+## Step 3: Submit a Job
+
+Releases of Flink come with a number of example Jobs.
+You can quickly deploy one of these applications to the running cluster. 
+
+{% highlight bash %}
+$ ./bin/flink run examples/streaming/WordCount.jar
+$ tail log/flink-*-taskexecutor-*.out
+  (to,1)
+  (be,1)
+  (or,1)
+  (not,1)
+  (to,2)
+  (be,2)
+{% endhighlight %}
+
+Additionally, you can check Flink's [Web UI](http://localhost:8080) to monitor the status of the Cluster and running Job.
+
+## Step 4: Stop the Cluster
+
+When you are finished you can quickly stop the cluster and all running components.
+
+{% highlight bash %}
+$ ./bin/stop-cluster.sh
+{% endhighlight %}
+{% endif %}
diff --git a/docs/try-flink/python_table_api.md b/docs/try-flink/python_table_api.md
index 9cff9f7..c4629fa 100644
--- a/docs/try-flink/python_table_api.md
+++ b/docs/try-flink/python_table_api.md
@@ -2,7 +2,7 @@
 title: "Python API Tutorial"
 nav-title: Python API
 nav-parent_id: try-flink
-nav-pos: 3
+nav-pos: 4
 ---
 <!--
 Licensed to the Apache Software Foundation (ASF) under one
diff --git a/docs/try-flink/python_table_api.zh.md b/docs/try-flink/python_table_api.zh.md
index be27eca..261f8d3 100644
--- a/docs/try-flink/python_table_api.zh.md
+++ b/docs/try-flink/python_table_api.zh.md
@@ -2,7 +2,7 @@
 title: "Python API 教程"
 nav-title: Python API
 nav-parent_id: try-flink
-nav-pos: 3
+nav-pos: 4
 ---
 <!--
 Licensed to the Apache Software Foundation (ASF) under one
diff --git a/docs/try-flink/table_api.md b/docs/try-flink/table_api.md
index 89a5410..aa4b4ec 100644
--- a/docs/try-flink/table_api.md
+++ b/docs/try-flink/table_api.md
@@ -2,7 +2,7 @@
 title: "Real Time Reporting with the Table API"
 nav-title: 'Real Time Reporting with the Table API'
 nav-parent_id: try-flink
-nav-pos: 2
+nav-pos: 3
 ---
 <!--
 Licensed to the Apache Software Foundation (ASF) under one
diff --git a/docs/try-flink/table_api.zh.md b/docs/try-flink/table_api.zh.md
index 8d8bc05..339bb80 100644
--- a/docs/try-flink/table_api.zh.md
+++ b/docs/try-flink/table_api.zh.md
@@ -2,7 +2,7 @@
 title: "基于 Table API 实现实时报表"
 nav-title: '基于 Table API 实现实时报表'
 nav-parent_id: try-flink
-nav-pos: 2
+nav-pos: 3
 ---
 <!--
 Licensed to the Apache Software Foundation (ASF) under one