leonardBang commented on a change in pull request #14675:
URL: https://github.com/apache/flink/pull/14675#discussion_r560133922



##########
File path: docs/dev/table/connectors/jdbc.zh.md
##########
@@ -31,35 +31,35 @@ under the License.
 * This will be replaced by the TOC
 {:toc}
 
-The JDBC connector allows for reading data from and writing data into any 
relational databases with a JDBC driver. This document describes how to setup 
the JDBC connector to run SQL queries against relational databases.
+JDBC连接器允许使用JDBC驱动向任意类型的关系型数据库读取或者写入数据。本文档描述了针对关系型数据库如何通过建立JDBC连接器来执行SQL查询。
 
-The JDBC sink operate in upsert mode for exchange UPDATE/DELETE messages with 
the external system if a primary key is defined on the DDL, otherwise, it 
operates in append mode and doesn't support to consume UPDATE/DELETE messages.
+如果一个主键定义在 DDL 中,JDBC sink 将以 upsert 模式与外部系统交换 UPDATE/DELETE 消息;否则,它将以appened 
模式与外部系统交换消息且不支持消费 UPDATE/DELETE 消息。
 
-Dependencies
+
+依赖
 ------------
 
 {% assign connector = site.data.sql-connectors['jdbc'] %} 
 {% include sql-connector-download-table.zh.html 
-    connector=connector
+​    connector=connector
 %}
 
 <br>
-A driver dependency is also required to connect to a specified database. Here 
are drivers currently supported:
+在连接到具体数据库时,也需要对应的驱动依赖,目前支持的驱动如下:
 
 | Driver      |      Group Id      |      Artifact Id       |      JAR         
|
 | :-----------| :------------------| :----------------------| 
:----------------|
-| MySQL       |       `mysql`      | `mysql-connector-java` | 
[Download](https://repo.maven.apache.org/maven2/mysql/mysql-connector-java/) |
-| PostgreSQL  |  `org.postgresql`  |      `postgresql`      | 
[Download](https://jdbc.postgresql.org/download.html) |
-| Derby       | `org.apache.derby` |        `derby`         | 
[Download](http://db.apache.org/derby/derby_downloads.html) |
+| MySQL       |       `mysql`      | `mysql-connector-java` | 
[下载](https://repo.maven.apache.org/maven2/mysql/mysql-connector-java/) |
+| PostgreSQL  |  `org.postgresql`  |      `postgresql`      | 
[下载](https://jdbc.postgresql.org/download.html) |
+| Derby       | `org.apache.derby` |        `derby`         | 
[下载](http://db.apache.org/derby/derby_downloads.html) |
 
 <br>
-JDBC connector and drivers are not currently part of Flink's binary 
distribution. See how to link with them for cluster execution [here]({% link 
dev/project-configuration.zh.md %}).
-
+当前,JDBC 连接器和驱动在 Flink 二进制发布包中,请参阅 [这里]({% link dev/project-configuration.zh.md 
%}) 了解在集群上执行时何连接它们。

Review comment:
       ```suggestion
   当前,JDBC 连接器和驱动不在 Flink 二进制发布包中,请参阅 [这里]({% link 
dev/project-configuration.zh.md %}) 了解在集群上执行时何连接它们。
   ```

##########
File path: docs/dev/table/connectors/jdbc.zh.md
##########
@@ -31,35 +31,35 @@ under the License.
 * This will be replaced by the TOC
 {:toc}
 
-The JDBC connector allows for reading data from and writing data into any 
relational databases with a JDBC driver. This document describes how to setup 
the JDBC connector to run SQL queries against relational databases.
+JDBC连接器允许使用JDBC驱动向任意类型的关系型数据库读取或者写入数据。本文档描述了针对关系型数据库如何通过建立JDBC连接器来执行SQL查询。
 
-The JDBC sink operate in upsert mode for exchange UPDATE/DELETE messages with 
the external system if a primary key is defined on the DDL, otherwise, it 
operates in append mode and doesn't support to consume UPDATE/DELETE messages.
+如果一个主键定义在 DDL 中,JDBC sink 将以 upsert 模式与外部系统交换 UPDATE/DELETE 消息;否则,它将以appened 
模式与外部系统交换消息且不支持消费 UPDATE/DELETE 消息。
 
-Dependencies
+
+依赖
 ------------
 
 {% assign connector = site.data.sql-connectors['jdbc'] %} 
 {% include sql-connector-download-table.zh.html 
-    connector=connector
+​    connector=connector
 %}
 
 <br>
-A driver dependency is also required to connect to a specified database. Here 
are drivers currently supported:
+在连接到具体数据库时,也需要对应的驱动依赖,目前支持的驱动如下:
 
 | Driver      |      Group Id      |      Artifact Id       |      JAR         
|
 | :-----------| :------------------| :----------------------| 
:----------------|
-| MySQL       |       `mysql`      | `mysql-connector-java` | 
[Download](https://repo.maven.apache.org/maven2/mysql/mysql-connector-java/) |
-| PostgreSQL  |  `org.postgresql`  |      `postgresql`      | 
[Download](https://jdbc.postgresql.org/download.html) |
-| Derby       | `org.apache.derby` |        `derby`         | 
[Download](http://db.apache.org/derby/derby_downloads.html) |
+| MySQL       |       `mysql`      | `mysql-connector-java` | 
[下载](https://repo.maven.apache.org/maven2/mysql/mysql-connector-java/) |
+| PostgreSQL  |  `org.postgresql`  |      `postgresql`      | 
[下载](https://jdbc.postgresql.org/download.html) |
+| Derby       | `org.apache.derby` |        `derby`         | 
[下载](http://db.apache.org/derby/derby_downloads.html) |
 
 <br>
-JDBC connector and drivers are not currently part of Flink's binary 
distribution. See how to link with them for cluster execution [here]({% link 
dev/project-configuration.zh.md %}).
-
+当前,JDBC 连接器和驱动在 Flink 二进制发布包中,请参阅 [这里]({% link dev/project-configuration.zh.md 
%}) 了解在集群上执行时何连接它们。
 
-How to create a JDBC table
+如何创建JDBC table

Review comment:
       (1)英文单词前后是中文时,前后都需要有空格,建议全文检查下
   

##########
File path: docs/dev/table/connectors/jdbc.zh.md
##########
@@ -92,210 +92,206 @@ ON myTopic.key = MyUserTable.id;
 </div>
 </div>
 
-Connector Options
+连接器参数选项
 ----------------
 
 <table class="table table-bordered">
     <thead>
       <tr>
-        <th class="text-left" style="width: 25%">Option</th>
-        <th class="text-left" style="width: 8%">Required</th>
-        <th class="text-left" style="width: 7%">Default</th>
-        <th class="text-left" style="width: 10%">Type</th>
-        <th class="text-left" style="width: 50%">Description</th>
+        <th class="text-left" style="width: 25%">选项</th>
+        <th class="text-left" style="width: 8%">是否必填</th>
+        <th class="text-left" style="width: 7%">默认值</th>
+        <th class="text-left" style="width: 10%">类型</th>
+        <th class="text-left" style="width: 50%">描述</th>
       </tr>
     </thead>
     <tbody>
     <tr>
       <td><h5>connector</h5></td>
-      <td>required</td>
+      <td>必填</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>String</td>
-      <td>Specify what connector to use, here should be 
<code>'jdbc'</code>.</td>
+      <td>指定使用什么类型的 connector, 这里应该是 <code>'jdbc'</code></td>
     </tr>
     <tr>
       <td><h5>url</h5></td>
-      <td>required</td>
+      <td>必填</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>String</td>
-      <td>The JDBC database url.</td>
+      <td>JDBC 数据库 url</td>
     </tr>
     <tr>
       <td><h5>table-name</h5></td>
-      <td>required</td>
+      <td>必填</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>String</td>
-      <td>The name of JDBC table to connect.</td>
+      <td>用于连接到 JDBC 表的名称。</td>
     </tr>
     <tr>
       <td><h5>driver</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>String</td>
-      <td>The class name of the JDBC driver to use to connect to this URL, if 
not set, it will automatically be derived from the URL.</td>
+      <td>用于连接到这个 URL 的 JDBC 驱动类名,如果不设置它将自动从该 URL 中推导。</td>
     </tr>
     <tr>
       <td><h5>username</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>String</td>
-      <td>The JDBC user name. <code>'username'</code> and 
<code>'password'</code> must both be specified if any of them is specified.</td>
+      <td> JDBC 用户名: <code>'username'</code> 和 <code>'password'</code> 
必须都被指定,如果指定了两者中任一参数</td>
     </tr>
     <tr>
       <td><h5>password</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>String</td>
-      <td>The JDBC password.</td>
+      <td> JDBC 密码</td>
     </tr>
     <tr>
       <td><h5>connection.max-retry-timeout</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">60s</td>
       <td>Duration</td>
-      <td>Maximum timeout between retries. The timeout should be in second 
granularity and shouldn't be smaller than 1 second.</td>
+      <td>最大重试超时时间,超时时间应该是以秒为单位,并且不应该小于1秒</td>
     </tr>
     <tr>
       <td><h5>scan.partition.column</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>String</td>
-      <td>The column name used for partitioning the input. See the following 
<a href="#partitioned-scan">Partitioned Scan</a> section for more details.</td>
+      <td>用于将输入进行分区的列名,请参阅下面的 <a 
href="#partitioned-scan">分区扫描</a>部分了解更多详情。</td>
     </tr>
     <tr>
       <td><h5>scan.partition.num</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>Integer</td>
-      <td>The number of partitions.</td>
+      <td>分区的数量</td>
     </tr>
     <tr>
       <td><h5>scan.partition.lower-bound</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>Integer</td>
-      <td>The smallest value of the first partition.</td>
+      <td>第一个分区的最小值</td>
     </tr>
     <tr>
       <td><h5>scan.partition.upper-bound</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>Integer</td>
-      <td>The largest value of the last partition.</td>
+      <td>最后一个分区的最大值</td>
     </tr>
     <tr>
       <td><h5>scan.fetch-size</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">0</td>
       <td>Integer</td>
-      <td>The number of rows that should be fetched from the database when 
reading per round trip. If the value specified is zero, then the hint is 
ignored.</td>
+      <td>每次循环读取时应该从数据库中获取的行数;如果指定的值为0,则该配置项会被忽略。</td>
     </tr>
     <tr>
       <td><h5>scan.auto-commit</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">true</td>
       <td>Boolean</td>
-      <td>Sets the <a 
href="https://docs.oracle.com/javase/tutorial/jdbc/basics/transactions.html#commit_transactions";>auto-commit</a>
 flag on the JDBC driver,
-      which determines whether each statement is committed in a transaction 
automatically. Some JDBC drivers, specifically
-      <a 
href="https://jdbc.postgresql.org/documentation/head/query.html#query-with-cursor";>Postgres</a>,
 may require this to be set to false in order to stream results.</td>
+      <td>在 JDBC 驱动程序上设置 <a 
href="https://docs.oracle.com/javase/tutorial/jdbc/basics/transactions.html#commit_transactions";>auto-commit</a>
 标志,它决定了每个语句是否在事务中自动提交。有一些 JDBC 驱动程序,特别是 <a 
href="https://jdbc.postgresql.org/documentation/head/query.html#query-with-cursor";>Postgres</a>
 ,可能需要将此设置为 false 以便流化结果。</td>
     </tr>
     <tr>
       <td><h5>lookup.cache.max-rows</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>Integer</td>
-      <td>The max number of rows of lookup cache, over this value, the oldest 
rows will be expired.
-      Lookup cache is disabled by default. See the following <a 
href="#lookup-cache">Lookup Cache</a> section for more details.</td>
+      <td>Lookup Cache 的最大行数,若超过该值,则最老的行记录将会过期。默认情况下,Lookup Cache 是未开启的。请查阅如下 
<a href="#lookup-cache">Lookup Cache</a> 章节了解更详细的信息。
     </tr>
     <tr>
       <td><h5>lookup.cache.ttl</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>Duration</td>
-      <td>The max time to live for each rows in lookup cache, over this time, 
the oldest rows will be expired.
-      Lookup cache is disabled by default. See the following <a 
href="#lookup-cache">Lookup Cache</a> section for more details. </td>
+      <td>查找缓存中每一行记录的最大存活时间,若超过该时间,则最老的行记录将被设置成已过期。默认情况下,查找缓存是未开启的。查看如下 <a 
href="#lookup-cache">Lookup Cache</a> 部分可以了解到更详细的信息 </td>
     </tr>
     <tr>
       <td><h5>lookup.max-retries</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">3</td>
       <td>Integer</td>
-      <td>The max retry times if lookup database failed.</td>
+      <td>查询数据库失败的最大重试时间</td>
     </tr>
     <tr>
       <td><h5>sink.buffer-flush.max-rows</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">100</td>
       <td>Integer</td>
-      <td>The max size of buffered records before flush. Can be set to zero to 
disable it.</td>
+      <td>flush前缓存记录的最大大小,可以设置为<code>0</code> 来禁用它</td>
     </tr>
     <tr>
       <td><h5>sink.buffer-flush.interval</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">1s</td>
       <td>Duration</td>
-      <td>The flush interval mills, over this time, asynchronous threads will 
flush data. Can be set to <code>'0'</code> to disable it. Note, 
<code>'sink.buffer-flush.max-rows'</code> can be set to <code>'0'</code> with 
the flush interval set allowing for complete async processing of buffered 
actions.</td>
-    </tr>
-    <tr>
+      <td>flush 的间隔时间,超过该值后异步线程将刷新数据,可以将刷新的间隔时间设置为<code>'0'</code> 来禁用该配置。注意, 
为了完全异步地处理缓存的 flush 事件,可以将<code>'sink.buffer-flush.max-rows'</code> 设置为'0'并配置适当的 
flush 时间间隔。</td>
+ </tr>
+<tr>
       <td><h5>sink.max-retries</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">3</td>
       <td>Integer</td>
-      <td>The max retry times if writing records to database failed.</td>
+      <td>写入记录到数据库失败后的最大重试次数</td>
     </tr>
     <tr>
       <td><h5>sink.parallelism</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>Integer</td>
-      <td>Defines the parallelism of the JDBC sink operator. By default, the 
parallelism is determined by the framework using the same parallelism of the 
upstream chained operator.</td>
+      <td>用于定义 JDBC sink 算子的并行度。默认情况下,并行度是由框架决定的:使用与上游链式算子相同的并行度。</td>
     </tr>
     </tbody>
 </table>
 
-Features
+
+特性
 --------
 

Review comment:
       本地编译下文档,先检查下,目前格式是乱掉的
   步骤为:(1)cd flink/docs   (2)./build_docs.sh -p (3)在本地4000 端口查看
   如果装了docker,也可以(1)cd flink/docs/docker (2) ./run.sh (3) 用docker build,(4) 
在本地4000端口查看
   
![image](https://user-images.githubusercontent.com/5163645/105034138-0de98700-5a94-11eb-87e9-d988f22e390c.png)
   

##########
File path: docs/dev/table/connectors/jdbc.zh.md
##########
@@ -92,210 +92,206 @@ ON myTopic.key = MyUserTable.id;
 </div>
 </div>
 
-Connector Options
+连接器参数选项
 ----------------
 
 <table class="table table-bordered">
     <thead>
       <tr>
-        <th class="text-left" style="width: 25%">Option</th>
-        <th class="text-left" style="width: 8%">Required</th>
-        <th class="text-left" style="width: 7%">Default</th>
-        <th class="text-left" style="width: 10%">Type</th>
-        <th class="text-left" style="width: 50%">Description</th>
+        <th class="text-left" style="width: 25%">选项</th>
+        <th class="text-left" style="width: 8%">是否必填</th>
+        <th class="text-left" style="width: 7%">默认值</th>
+        <th class="text-left" style="width: 10%">类型</th>
+        <th class="text-left" style="width: 50%">描述</th>
       </tr>
     </thead>
     <tbody>
     <tr>
       <td><h5>connector</h5></td>
-      <td>required</td>
+      <td>必填</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>String</td>
-      <td>Specify what connector to use, here should be 
<code>'jdbc'</code>.</td>
+      <td>指定使用什么类型的 connector, 这里应该是 <code>'jdbc'</code></td>
     </tr>
     <tr>
       <td><h5>url</h5></td>
-      <td>required</td>
+      <td>必填</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>String</td>
-      <td>The JDBC database url.</td>
+      <td>JDBC 数据库 url</td>
     </tr>
     <tr>
       <td><h5>table-name</h5></td>
-      <td>required</td>
+      <td>必填</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>String</td>
-      <td>The name of JDBC table to connect.</td>
+      <td>用于连接到 JDBC 表的名称。</td>
     </tr>
     <tr>
       <td><h5>driver</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>String</td>
-      <td>The class name of the JDBC driver to use to connect to this URL, if 
not set, it will automatically be derived from the URL.</td>
+      <td>用于连接到这个 URL 的 JDBC 驱动类名,如果不设置它将自动从该 URL 中推导。</td>
     </tr>
     <tr>
       <td><h5>username</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>String</td>
-      <td>The JDBC user name. <code>'username'</code> and 
<code>'password'</code> must both be specified if any of them is specified.</td>
+      <td> JDBC 用户名: <code>'username'</code> 和 <code>'password'</code> 
必须都被指定,如果指定了两者中任一参数</td>
     </tr>
     <tr>
       <td><h5>password</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>String</td>
-      <td>The JDBC password.</td>
+      <td> JDBC 密码</td>
     </tr>
     <tr>
       <td><h5>connection.max-retry-timeout</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">60s</td>
       <td>Duration</td>
-      <td>Maximum timeout between retries. The timeout should be in second 
granularity and shouldn't be smaller than 1 second.</td>
+      <td>最大重试超时时间,超时时间应该是以秒为单位,并且不应该小于1秒</td>
     </tr>
     <tr>
       <td><h5>scan.partition.column</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>String</td>
-      <td>The column name used for partitioning the input. See the following 
<a href="#partitioned-scan">Partitioned Scan</a> section for more details.</td>
+      <td>用于将输入进行分区的列名,请参阅下面的 <a 
href="#partitioned-scan">分区扫描</a>部分了解更多详情。</td>
     </tr>
     <tr>
       <td><h5>scan.partition.num</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>Integer</td>
-      <td>The number of partitions.</td>
+      <td>分区的数量</td>
     </tr>
     <tr>
       <td><h5>scan.partition.lower-bound</h5></td>
-      <td>optional</td>
+      <td>可选</td>
       <td style="word-wrap: break-word;">(none)</td>
       <td>Integer</td>
-      <td>The smallest value of the first partition.</td>

Review comment:
       英文都有句号,翻译时全部都保留吧,后面的表格中长句都有句号,统一点。

##########
File path: docs/dev/table/connectors/jdbc.zh.md
##########
@@ -31,35 +31,35 @@ under the License.
 * This will be replaced by the TOC
 {:toc}
 
-The JDBC connector allows for reading data from and writing data into any 
relational databases with a JDBC driver. This document describes how to setup 
the JDBC connector to run SQL queries against relational databases.
+JDBC连接器允许使用JDBC驱动向任意类型的关系型数据库读取或者写入数据。本文档描述了针对关系型数据库如何通过建立JDBC连接器来执行SQL查询。
 
-The JDBC sink operate in upsert mode for exchange UPDATE/DELETE messages with 
the external system if a primary key is defined on the DDL, otherwise, it 
operates in append mode and doesn't support to consume UPDATE/DELETE messages.
+如果一个主键定义在 DDL 中,JDBC sink 将以 upsert 模式与外部系统交换 UPDATE/DELETE 消息;否则,它将以appened 
模式与外部系统交换消息且不支持消费 UPDATE/DELETE 消息。
 
-Dependencies
+
+依赖
 ------------
 
 {% assign connector = site.data.sql-connectors['jdbc'] %} 
 {% include sql-connector-download-table.zh.html 
-    connector=connector
+​    connector=connector

Review comment:
       revert the change, otherwise the doc build will fail




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to