Skip to content

Commit

Permalink
[FLINK-20998][docs][table] The 'flink-raw.jar' mentioned in docs does…
Browse files Browse the repository at this point in the history
…n't exist and add prettier maven xml dependencies

This closes apache#14672
  • Loading branch information
sv3ndk authored Jan 21, 2021
1 parent e5d81d4 commit b607ef2
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 23 deletions.
2 changes: 1 addition & 1 deletion docs/_data/sql-connectors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ json:

raw:
name: RAW
maven: flink-raw
maven:
category: format
built-in: true

Expand Down
29 changes: 25 additions & 4 deletions docs/_includes/sql-connector-download-table.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{% endcomment %}

{% if include.connector.versions == nil %}
<table>
<table class="table table-bordered">
<thead>
<tr>
<th style="text-align: left">Maven dependency</th>
Expand All @@ -36,7 +36,17 @@
</thead>
<tbody>
<tr>
<td style="text-align: left"><code class="highlighter-rouge">{{ include.connector.maven | liquify }}</code></td>

<td style="text-align: left">
<code class="highlighter-rouge">
&lt;dependency&gt;<br/>
&nbsp;&nbsp;&lt;groupId&gt;org.apache.flink&lt;/groupId&gt;<br/>
&nbsp;&nbsp;&lt;artifactId&gt;{{ include.connector.maven | liquify }}&lt;/artifactId&gt;<br/>
&nbsp;&nbsp;&lt;version&gt;{{site.version}}&lt;/version&gt;<br/>
&lt;/dependency&gt;
</code>
</td>

{% if include.connector.built-in %}
<td style="text-align: left">Built-in</td>
{% elsif site.is_stable %}
Expand All @@ -52,7 +62,7 @@
</tbody>
</table>
{% else %}
<table>
<table class="table table-bordered">
<thead>
<tr>
<th style="text-align: left">{{ include.connector.name }} version</th>
Expand All @@ -64,7 +74,18 @@
{% for version in include.connector.versions %}
<tr>
<td style="text-align: left">{{ version.version | liquify }}</td>
<td style="text-align: left"><code class="highlighter-rouge">{{ version.maven | liquify }}</code></td>
<td style="text-align: left">
<code class="highlighter-rouge">

&lt;dependency&gt;<br/>
&nbsp;&nbsp;&lt;groupId&gt;org.apache.flink&lt;/groupId&gt;<br/>
&nbsp;&nbsp;&lt;artifactId&gt;{{ version.maven | liquify }}&lt;/artifactId&gt;<br/>
&nbsp;&nbsp;&lt;version&gt;{{site.version}}&lt;/version&gt;<br/>
&lt;/dependency&gt;

</code>

</td>
{% if include.connector.built-in %}
<td style="text-align: left">Built-in</td>
{% elsif include.connector.no-sql-jar %}
Expand Down
24 changes: 20 additions & 4 deletions docs/_includes/sql-connector-download-table.zh.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
{% endcomment %}

{% if include.connector.versions == nil %}
<table>
<table class="table table-bordered">
<thead>
<tr>
<th style="text-align: left">Maven 依赖</th>
Expand All @@ -33,7 +33,15 @@
</thead>
<tbody>
<tr>
<td style="text-align: left"><code class="highlighter-rouge">{{ include.connector.maven | liquify }}</code></td>
<td style="text-align: left">
<code class="highlighter-rouge">
&lt;dependency&gt;<br/>
&nbsp;&nbsp;&lt;groupId&gt;org.apache.flink&lt;/groupId&gt;<br/>
&nbsp;&nbsp;&lt;artifactId&gt;{{ include.connector.maven | liquify }}&lt;/artifactId&gt;<br/>
&nbsp;&nbsp;&lt;version&gt;{{site.version}}&lt;/version&gt;<br/>
&lt;/dependency&gt;
</code>
</td>
{% if include.connector.built-in %}
<td style="text-align: left">Built-in</td>
{% elsif site.is_stable %}
Expand All @@ -49,7 +57,7 @@
</tbody>
</table>
{% else %}
<table>
<table class="table table-bordered">
<thead>
<tr>
<th style="text-align: left">{{ include.connector.name }} 版本</th>
Expand All @@ -61,7 +69,15 @@
{% for version in include.connector.versions %}
<tr>
<td style="text-align: left">{{ version.version | liquify }}</td>
<td style="text-align: left"><code class="highlighter-rouge">{{ version.maven | liquify }}</code></td>
<td style="text-align: left">
<code class="highlighter-rouge">
&lt;dependency&gt;<br/>
&nbsp;&nbsp;&lt;groupId&gt;org.apache.flink&lt;/groupId&gt;<br/>
&nbsp;&nbsp;&lt;artifactId&gt;{{ include.connector.maven | liquify }}&lt;/artifactId&gt;<br/>
&nbsp;&nbsp;&lt;version&gt;{{site.version}}&lt;/version&gt;<br/>
&lt;/dependency&gt;
</code>
</td>
{% if include.connector.built-in %}
<td style="text-align: left">内置</td>
{% elsif include.connector.no-sql-jar %}
Expand Down
8 changes: 1 addition & 7 deletions docs/dev/table/connectors/formats/raw.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,7 @@ The Raw format allows to read and write raw (byte based) values as a single colu

Note: this format encodes `null` values as `null` of `byte[]` type. This may have limitation when used in `upsert-kafka`, because `upsert-kafka` treats `null` values as a tombstone message (DELETE on the key). Therefore, we recommend avoiding using `upsert-kafka` connector and the `raw` format as a `value.format` if the field can have a `null` value.

Dependencies
------------

{% assign connector = site.data.sql-connectors['raw'] %}
{% include sql-connector-download-table.html
connector=connector
%}
The Raw connector is built-in into the Blink planner, no additional dependencies are required.

Example
----------------
Expand Down
8 changes: 1 addition & 7 deletions docs/dev/table/connectors/formats/raw.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,7 @@ Raw format 允许读写原始(基于字节)值作为单个列。

注意: 这种格式将 `null` 值编码成 `byte[]` 类型的 `null`。这样在 `upsert-kafka` 中使用时可能会有限制,因为 `upsert-kafka``null` 值视为 墓碑消息(在键上删除)。因此,如果该字段可能具有 `null` 值,我们建议避免使用 `upsert-kafka` 连接器和 `raw` format 作为 `value.format`

依赖
------------

{% assign connector = site.data.sql-connectors['raw'] %}
{% include sql-connector-download-table.zh.html
connector=connector
%}
Raw format 连接器是内置的。

示例
----------------
Expand Down

0 comments on commit b607ef2

Please sign in to comment.