You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/03/16 11:12:44 UTC

[GitHub] [hudi] yanghua commented on a change in pull request #2681: [HUDI-1693] Add document about HUDI Flink integration

yanghua commented on a change in pull request #2681:
URL: https://github.com/apache/hudi/pull/2681#discussion_r595069913



##########
File path: docs/_docs/1_6_flink_quick_start_guide.md
##########
@@ -0,0 +1,169 @@
+---
+title: "Quick-Start Guide"
+permalink: /docs/flink-quick-start-guide.html
+toc: true
+last_modified_at: 2020-03-16T11:40:57+08:00
+---
+
+This guide provides a quick peek at Hudi's capabilities using flink SQL client. Using flink SQL, we will walk through 
+code snippets that allows you to insert and update a Hudi table of default table type: 
+[Copy on Write](/docs/concepts.html#copy-on-write-table) and [Merge On Read](/docs/concepts.html#merge-on-read-table). 
+After each write operation we will also show how to read the data snapshot (incrementally read is already on the roadmap).
+
+## Setup
+
+We use the [Flink Sql Client](https://ci.apache.org/projects/flink/flink-docs-stable/dev/table/sqlClient.html) because it's a good
+quick start tool for SQL users.
+
+### Step.1 download flink jar
+Hudi works with Flink-1.11.x version. You can follow instructions [here](https://flink.apache.org/downloads.html) for setting up flink.
+The hudi-flink-bundle jar is archived with scala 2.11, so it’s recommended to use flink 1.11 bundled with scala 2.11.
+
+### Step.2 start flink cluster

Review comment:
       Can we share some details about how to use the flink docker to simplify the usage?

##########
File path: docs/_docs/1_6_flink_quick_start_guide.md
##########
@@ -0,0 +1,169 @@
+---
+title: "Quick-Start Guide"
+permalink: /docs/flink-quick-start-guide.html
+toc: true
+last_modified_at: 2020-03-16T11:40:57+08:00
+---
+
+This guide provides a quick peek at Hudi's capabilities using flink SQL client. Using flink SQL, we will walk through 
+code snippets that allows you to insert and update a Hudi table of default table type: 
+[Copy on Write](/docs/concepts.html#copy-on-write-table) and [Merge On Read](/docs/concepts.html#merge-on-read-table). 
+After each write operation we will also show how to read the data snapshot (incrementally read is already on the roadmap).
+
+## Setup
+
+We use the [Flink Sql Client](https://ci.apache.org/projects/flink/flink-docs-stable/dev/table/sqlClient.html) because it's a good
+quick start tool for SQL users.
+
+### Step.1 download flink jar
+Hudi works with Flink-1.11.x version. You can follow instructions [here](https://flink.apache.org/downloads.html) for setting up flink.
+The hudi-flink-bundle jar is archived with scala 2.11, so it’s recommended to use flink 1.11 bundled with scala 2.11.
+
+### Step.2 start flink cluster
+Start a standalone flink cluster within hadoop environment.
+Before you start up the cluster, we suggest to config the cluster as follows:
+
+- in `$FLINK_HOME/conf/flink-conf.yaml`, add config option `taskmanager.numberOfTaskSlots: 4`
+- in `$FLINK_HOME/conf/workers`, add item `localhost` as 4 lines so that there are 4 workers on the local cluster
+
+Now starts the cluster:
+
+```bash
+# HADOOP_HOME is your hadoop root directory after unpack the binary package.
+export HADOOP_CLASSPATH=`$HADOOP_HOME/bin/hadoop classpath`
+
+# Start the flink standalone cluster
+./bin/start-cluster.sh
+```
+### Step.3 start flink SQL client
+
+Hudi has a prepared bundle jar for flink, which should be loaded in the flink SQL Client when it starts up.
+You can build the jar manually under path `hudi-source-dir/packaging/hudi-flink-bundle`, or download it from the
+[Apache Official Repository](https://repo.maven.apache.org/maven2/org/apache/hudi/hudi-flink-bundle_2.11/).
+
+Now starts the SQL CLI:
+
+```bash
+# HADOOP_HOME is your hadoop root directory after unpack the binary package.
+export HADOOP_CLASSPATH=`$HADOOP_HOME/bin/hadoop classpath`
+
+./bin/sql-client.sh embedded -j .../hudi-flink-bundle_2.1?-*.*.*.jar shell
+```
+
+<div class="notice--info">
+  <h4>Please note the following: </h4>
+<ul>
+  <li>we suggest hadoop 2.9.x+ version because some of the object storage has filesystem implementation only after that</li>

Review comment:
       `we` -> `We`

##########
File path: docs/_data/navigation.yml
##########
@@ -20,8 +20,10 @@ docs:
     children:
       - title: "Overview"
         url: /docs/overview.html
-      - title: "Quick Start"
+      - title: "Quick Start(Spark)"
         url: /docs/quick-start-guide.html

Review comment:
       Can we rename this file to add the `spark` prefix?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org