You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/08/24 06:54:19 UTC

[GitHub] [flink] zhuxiaoshang opened a new pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

zhuxiaoshang opened a new pull request #13225:
URL: https://github.com/apache/flink/pull/13225


   ## What is the purpose of the change
   
   [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese
   
   
   ## Brief change log
     - Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese
   
   
   ## Verifying this change
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: ( no)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn/Mesos, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (no)
     - If yes, how is the feature documented? (no)
   


----------------------------------------------------------------
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



[GitHub] [flink] zhuxiaoshang commented on a change in pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
zhuxiaoshang commented on a change in pull request #13225:
URL: https://github.com/apache/flink/pull/13225#discussion_r483414657



##########
File path: flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/api/Fetch.java
##########
@@ -0,0 +1,13 @@
+package org.apache.flink.table.api;

Review comment:
       sorry,i have reverted these.




----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870",
       "triggerID" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6015",
       "triggerID" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6103",
       "triggerID" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6103) 
   * 9d5f591223a0e46a22e24bbeb084a6b59c48a445 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] RocMarshal commented on a change in pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
RocMarshal commented on a change in pull request #13225:
URL: https://github.com/apache/flink/pull/13225#discussion_r486043441



##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -114,30 +119,31 @@ data.reduce { (i1,i2) => i1 + i2 }
 data.reduce { _ + _ }
 {% endhighlight %}
 
+<a name="rich-functions"></a>
+
 ## Rich functions
 
-All transformations that take as argument a lambda function can
-instead take as argument a *rich* function. For example, instead of
+所有将 lambda 表达式作为参数的转化操作都可以用 *rich* function 来代替。例如,代替
 
 {% highlight scala %}
 data.map { x => x.toInt }
 {% endhighlight %}
 
-you can write
+你可以写成
 
 {% highlight scala %}
 class MyMapFunction extends RichMapFunction[String, Int] {
   def map(in: String):Int = { in.toInt }
 };
 {% endhighlight %}
 
-and pass the function to a `map` transformation:
+并将函数传递给 `map` transformation:
 
 {% highlight scala %}
 data.map(new MyMapFunction())
 {% endhighlight %}
 
-Rich functions can also be defined as an anonymous class:
+富函数也可以定义成匿名类:

Review comment:
       We need to make some necessary decisions.
   ```function``` or ```函数```?
   ```rich function``` or ```富函数````?
   We'd better keep the special nouns and keywords consistent in the translation, which  is more rigorous.
   Can you tell me what you think of ?

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -23,16 +23,16 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-Most operations require a user-defined function. This section lists different
-ways of how they can be specified. We also cover `Accumulators`, which can be
-used to gain insights into your Flink application.
+大多数操作都需要用户自定义函数。本节列出了实现用户自定义函数的不同方式。还会介绍 `Accumulators`(累加器),可用于深入了解你的 Flink 应用程序。

Review comment:
       ```suggestion
   大多数操作都需要用户自定义函数(function)。本节列出了实现用户自定义函数的不同方式。还会介绍 `Accumulators`(累加器),可用于深入了解你的 Flink 应用程序。
   ```

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -62,32 +66,33 @@ data.filter(s -> s.startsWith("http://"));
 data.reduce((i1,i2) -> i1 + i2);
 {% endhighlight %}
 
+<a name="rich-functions"></a>
+
 ## Rich functions
 
-All transformations that require a user-defined function can
-instead take as argument a *rich* function. For example, instead of
+所有需要用户自定义函数的转化操作都可以将 *rich* function 作为参数。例如,代替
 
 {% highlight java %}
 class MyMapFunction implements MapFunction<String, Integer> {
   public Integer map(String value) { return Integer.parseInt(value); }
 };
 {% endhighlight %}
 
-you can write
+你可以写成

Review comment:
       ```suggestion
   更改后替换为如下内容
   ```

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +153,78 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),Rich functions 还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些方法对于参数化函数
+(参阅 [给函数传递参数]({% link dev/batch/index.zh.md %}#passing-parameters-to-functions)),
+创建和最终确定本地状态,访问广播变量(参阅
+[广播变量]({% link dev/batch/index.zh.md %}#broadcast-variables )),以及访问运行时信息,例如累加器和计数器(参阅
+[累加器和计数器](#accumulators--counters)),以及迭代器的相关信息(参阅 [迭代器]({% link dev/batch/iterations.zh.md %}))
+有很大作用。
 
 {% top %}
 
-## Accumulators & Counters
+<a name="accumulators--counters"></a>
 
-Accumulators are simple constructs with an **add operation** and a **final accumulated result**,
-which is available after the job ended.
+## 累加器和计数器
 
-The most straightforward accumulator is a **counter**: You can increment it using the
-```Accumulator.add(V value)``` method. At the end of the job Flink will sum up (merge) all partial
-results and send the result to the client. Accumulators are useful during debugging or if you
-quickly want to find out more about your data.
+累加器是具有**加法运算**和**最终累加结果**的一种简单结构,可在作业结束后使用。
 
-Flink currently has the following **built-in accumulators**. Each of them implements the
-{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "Accumulator" %}
-interface.
+最简单的累加器就是**计数器**: 你可以使用
+```Accumulator.add(V value)``` 方法将其递增。在作业结束时,Flink 会汇总(合并)所有部分的结果并将其发送给客户端。
+在调试过程中或在你想快速了解有关数据更多信息时,累加器作用很大。
+
+Flink 目前有如下**内置累加器**。每个都实现了
+{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "累加器" %}
+接口。
 
 - {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/IntCounter.java "__IntCounter__" %},
   {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/LongCounter.java "__LongCounter__" %}
-  and {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleCounter.java "__DoubleCounter__" %}:
-  See below for an example using a counter.
-- {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java "__Histogram__" %}:
-  A histogram implementation for a discrete number of bins. Internally it is just a map from Integer
-  to Integer. You can use this to compute distributions of values, e.g. the distribution of
-  words-per-line for a word count program.
+  和 {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleCounter.java "__DoubleCounter__" %}:
+  有关使用计数器的示例,请参见下文。
+- {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java "__直方图__" %}:
+  离散数量的柱状直方图实现。在内部,它只是整形到整形的映射。你可以使用它来计算值的分布,例如,单词计数程序的每行单词的分布情况。
 
-__How to use accumulators:__
+__如何使用累加器:__
 
-First you have to create an accumulator object (here a counter) in the user-defined transformation
-function where you want to use it.
+首先,在需要使用累加器的用户自定义的转换函数中创建一个累加器对象(此处是计数器)。
 
 {% highlight java %}
 private IntCounter numLines = new IntCounter();
 {% endhighlight %}
 
-Second you have to register the accumulator object, typically in the ```open()``` method of the
-*rich* function. Here you also define the name.
+其次,你必须在 *rich* function 的 ```open()``` 方法中注册累加器对象。也可以在此处定义名称。
 
 {% highlight java %}
 getRuntimeContext().addAccumulator("num-lines", this.numLines);
 {% endhighlight %}
 
-You can now use the accumulator anywhere in the operator function, including in the ```open()``` and
-```close()``` methods.
+现在你可以在操作函数中的任何位置(包括 ```open()``` 和 ```close()``` 方法中)使用累加器。
 
 {% highlight java %}
 this.numLines.add(1);
 {% endhighlight %}
 
-The overall result will be stored in the ```JobExecutionResult``` object which is
-returned from the `execute()` method of the execution environment
-(currently this only works if the execution waits for the
-completion of the job).
+最终整体结果会存储在由执行环境的 `execute()` 方法返回的 ```JobExecutionResult``` 对象中(当前只有等待作业完成后执行才起作用)。
 
 {% highlight java %}
 myJobExecutionResult.getAccumulatorResult("num-lines")
 {% endhighlight %}
 
-All accumulators share a single namespace per job. Thus you can use the same accumulator in
-different operator functions of your job. Flink will internally merge all accumulators with the same
-name.
+单个作业的所有累加器共享一个命名空间。因此你可以在不同的操作函数里面使用同一个累加器。Flink 会在内部将所有具有相同名称的累加器合并起来。
 
-A note on accumulators and iterations: Currently the result of accumulators is only available after
-the overall job has ended. We plan to also make the result of the previous iteration available in the
-next iteration. You can use
-{% gh_link /flink-java/src/main/java/org/apache/flink/api/java/operators/IterativeDataSet.java#L98 "Aggregators" %}
-to compute per-iteration statistics and base the termination of iterations on such statistics.
+关于累加器和迭代的注意事项:当前累加器的结果只有在整个作业结束后才可用。我们还计划在下一次迭代中提供上一次的迭代结果。你可以使用
+{% gh_link /flink-java/src/main/java/org/apache/flink/api/java/operators/IterativeDataSet.java#L98 "聚合器" %}
+来计算每次迭代的统计信息,并基于此类统计信息来终止迭代。
 
-__Custom accumulators:__
+__定制累加器:__
 
-To implement your own accumulator you simply have to write your implementation of the Accumulator
-interface. Feel free to create a pull request if you think your custom accumulator should be shipped
-with Flink.
+要实现自己的累加器,你只需要实现累加器接口即可。如果你认为自定义累加器应随 Flink 一起提供,请尽管创建 pull request。
 
-You have the choice to implement either
+你可以选择实现
 {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "Accumulator" %}
-or {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/SimpleAccumulator.java "SimpleAccumulator" %}.
+或 {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/SimpleAccumulator.java "SimpleAccumulator" %}。
 
-```Accumulator<V,R>``` is most flexible: It defines a type ```V``` for the value to add, and a
-result type ```R``` for the final result. E.g. for a histogram, ```V``` is a number and ```R``` is
- a histogram. ```SimpleAccumulator``` is for the cases where both types are the same, e.g. for counters.
+```Accumulator<V,R>``` 最灵活: 它给需要添加的值定义了类型 ```V```,并定义了最终的结果类型 ```R```。例如,对于直方图,```V``` 是一个数字且 ```R``` 是一个直方图。

Review comment:
       ```suggestion
   ```Accumulator<V,R>``` 的实现十分灵活: 它定义了将要添加的值类型 ```V```,并定义了最终的结果类型 ```R```。例如,对于直方图,```V``` 是一个数字且 ```R``` 是一个直方图。
   ```

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -62,32 +66,33 @@ data.filter(s -> s.startsWith("http://"));
 data.reduce((i1,i2) -> i1 + i2);
 {% endhighlight %}
 
+<a name="rich-functions"></a>
+
 ## Rich functions
 
-All transformations that require a user-defined function can
-instead take as argument a *rich* function. For example, instead of
+所有需要用户自定义函数的转化操作都可以将 *rich* function 作为参数。例如,代替

Review comment:
       ```suggestion
   所有需要用户自定义函数的转化操作都可以将 *rich* function 作为参数。例如,你可以将以下代码
   ```




----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870",
       "triggerID" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6015",
       "triggerID" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6103",
       "triggerID" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6140",
       "triggerID" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f6141fa38f42a92fe10ca6b707813f0253ba5f3f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6191",
       "triggerID" : "f6141fa38f42a92fe10ca6b707813f0253ba5f3f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9d52b2bde1c0a87d20aac1d7057f231b433d353e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6481",
       "triggerID" : "9d52b2bde1c0a87d20aac1d7057f231b433d353e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "313c6760e7d491540ab8d782b87ee2c637d9b5ab",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6508",
       "triggerID" : "313c6760e7d491540ab8d782b87ee2c637d9b5ab",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9d52b2bde1c0a87d20aac1d7057f231b433d353e Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6481) 
   * 313c6760e7d491540ab8d782b87ee2c637d9b5ab Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6508) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 40658a82560ebc79ee2047a789db4fa003115099 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870",
       "triggerID" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6015",
       "triggerID" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6103",
       "triggerID" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6140",
       "triggerID" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f6141fa38f42a92fe10ca6b707813f0253ba5f3f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6191",
       "triggerID" : "f6141fa38f42a92fe10ca6b707813f0253ba5f3f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9d52b2bde1c0a87d20aac1d7057f231b433d353e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6481",
       "triggerID" : "9d52b2bde1c0a87d20aac1d7057f231b433d353e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9d52b2bde1c0a87d20aac1d7057f231b433d353e Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6481) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] RocMarshal commented on a change in pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
RocMarshal commented on a change in pull request #13225:
URL: https://github.com/apache/flink/pull/13225#discussion_r488333064



##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +153,78 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的 function(map,reduce 等),Rich functions 还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些方法对于参数化 function
+(参阅 [给 function 传递参数]({% link dev/batch/index.zh.md %}#passing-parameters-to-functions)),

Review comment:
       ```suggestion
   (参阅 [给 function 传递参数]({% link dev/batch/index.zh.md %}#passing-parameters-to-functions)),
   ```

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +153,78 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的 function(map,reduce 等),Rich functions 还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些方法对于参数化 function
+(参阅 [给 function 传递参数]({% link dev/batch/index.zh.md %}#passing-parameters-to-functions)),
+创建和最终确定本地状态,访问广播变量(参阅

Review comment:
       ```suggestion
   创建和最终确定本地状态,访问广播变量(参阅
   ```

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +153,78 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的 function(map,reduce 等),Rich functions 还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些方法对于参数化 function
+(参阅 [给 function 传递参数]({% link dev/batch/index.zh.md %}#passing-parameters-to-functions)),
+创建和最终确定本地状态,访问广播变量(参阅
+[广播变量]({% link dev/batch/index.zh.md %}#broadcast-variables )),以及访问运行时信息,例如累加器和计数器(参阅
+[累加器和计数器](#accumulators--counters)),以及迭代器的相关信息(参阅 [迭代器]({% link dev/batch/iterations.zh.md %}))

Review comment:
       ```suggestion
   [累加器和计数器](#accumulators--counters)),以及迭代器的相关信息(参阅 [迭代器]({% link dev/batch/iterations.zh.md %}))
   ```

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +153,78 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的 function(map,reduce 等),Rich functions 还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些方法对于参数化 function
+(参阅 [给 function 传递参数]({% link dev/batch/index.zh.md %}#passing-parameters-to-functions)),
+创建和最终确定本地状态,访问广播变量(参阅
+[广播变量]({% link dev/batch/index.zh.md %}#broadcast-variables )),以及访问运行时信息,例如累加器和计数器(参阅

Review comment:
       ```suggestion
   [广播变量]({% link dev/batch/index.zh.md %}#broadcast-variables )),以及访问运行时信息,例如累加器和计数器(参阅
   ```

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +153,78 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的 function(map,reduce 等),Rich functions 还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些方法对于参数化 function
+(参阅 [给 function 传递参数]({% link dev/batch/index.zh.md %}#passing-parameters-to-functions)),
+创建和最终确定本地状态,访问广播变量(参阅
+[广播变量]({% link dev/batch/index.zh.md %}#broadcast-variables )),以及访问运行时信息,例如累加器和计数器(参阅
+[累加器和计数器](#accumulators--counters)),以及迭代器的相关信息(参阅 [迭代器]({% link dev/batch/iterations.zh.md %}))
+有很大作用。
 
 {% top %}
 
-## Accumulators & Counters
+<a name="accumulators--counters"></a>
 
-Accumulators are simple constructs with an **add operation** and a **final accumulated result**,
-which is available after the job ended.
+## 累加器和计数器
 
-The most straightforward accumulator is a **counter**: You can increment it using the
-```Accumulator.add(V value)``` method. At the end of the job Flink will sum up (merge) all partial
-results and send the result to the client. Accumulators are useful during debugging or if you
-quickly want to find out more about your data.
+累加器是具有**加法运算**和**最终累加结果**的一种简单结构,可在作业结束后使用。
 
-Flink currently has the following **built-in accumulators**. Each of them implements the
-{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "Accumulator" %}
-interface.
+最简单的累加器就是**计数器**: 你可以使用
+```Accumulator.add(V value)``` 方法将其递增。在作业结束时,Flink 会汇总(合并)所有部分的结果并将其发送给客户端。

Review comment:
       ```suggestion
   ```Accumulator.add(V value)``` 方法将其递增。在作业结束时,Flink 会汇总(合并)所有部分的结果并将其发送给客户端。
   ```




----------------------------------------------------------------
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



[GitHub] [flink] flinkbot commented on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678951061


   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 40658a82560ebc79ee2047a789db4fa003115099 (Mon Aug 24 07:13:31 UTC 2020)
   
    ✅no warnings
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] zhuxiaoshang commented on a change in pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
zhuxiaoshang commented on a change in pull request #13225:
URL: https://github.com/apache/flink/pull/13225#discussion_r480106507



##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +153,77 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),Rich functions 还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些对于参数化功能很有用
+(参阅 [给函数传递参数]({{ site.baseurl }}/zh/dev/batch/index.html#passing-parameters-to-functions)),

Review comment:
       可以举个例子吗?那个链接没太看明白
   现有链接好像可以正确链接到对应页面。




----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870",
       "triggerID" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6015",
       "triggerID" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870) 
   * ada20c1fc8eb927eb4b72e9783d85821e67934cb Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6015) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] flinkbot commented on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 40658a82560ebc79ee2047a789db4fa003115099 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] klion26 commented on a change in pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
klion26 commented on a change in pull request #13225:
URL: https://github.com/apache/flink/pull/13225#discussion_r483392234



##########
File path: flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/api/Fetch.java
##########
@@ -0,0 +1,13 @@
+package org.apache.flink.table.api;

Review comment:
       please revert these changes




----------------------------------------------------------------
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



[GitHub] [flink] zhuxiaoshang commented on a change in pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
zhuxiaoshang commented on a change in pull request #13225:
URL: https://github.com/apache/flink/pull/13225#discussion_r482751737



##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +153,78 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),Rich functions 还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些方法对于参数化函数
+(参阅 [给函数传递参数]({{ site.baseurl }}{% link zh/dev/batch/index.html#passing-parameters-to-functions %})),

Review comment:
       @klion26 sorry for my negligence,I see the error this time,but what i curious is that why the link can still jump to target page.




----------------------------------------------------------------
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



[GitHub] [flink] RocMarshal commented on a change in pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
RocMarshal commented on a change in pull request #13225:
URL: https://github.com/apache/flink/pull/13225#discussion_r477897780



##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +142,75 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),富函数还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些对于参数化功能很有用
+(参阅 [给函数传递参数]({{ site.baseurl }}/zh/dev/batch/index.html#passing-parameters-to-functions)),
+创建和最终确定本地状态,访问广播变量(参阅
+[广播变量]({{ site.baseurl }}/zh/dev/batch/index.html#broadcast-variables)),以及访问运行时信息,例如累加器和计数器(参阅

Review comment:
       @klion26 What do you think about this?




----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870",
       "triggerID" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6015",
       "triggerID" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6103",
       "triggerID" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6140",
       "triggerID" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f6141fa38f42a92fe10ca6b707813f0253ba5f3f",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "f6141fa38f42a92fe10ca6b707813f0253ba5f3f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9d5f591223a0e46a22e24bbeb084a6b59c48a445 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6140) 
   * f6141fa38f42a92fe10ca6b707813f0253ba5f3f UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] rmetzger merged pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
rmetzger merged pull request #13225:
URL: https://github.com/apache/flink/pull/13225


   


----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870",
       "triggerID" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6015",
       "triggerID" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ada20c1fc8eb927eb4b72e9783d85821e67934cb Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6015) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] zhuxiaoshang commented on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
zhuxiaoshang commented on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-680556966


   Thanks for your review @RocMarshal.I have made some changes according to your suggestions.


----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870",
       "triggerID" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6015",
       "triggerID" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6103",
       "triggerID" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6140",
       "triggerID" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f6141fa38f42a92fe10ca6b707813f0253ba5f3f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6191",
       "triggerID" : "f6141fa38f42a92fe10ca6b707813f0253ba5f3f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9d52b2bde1c0a87d20aac1d7057f231b433d353e",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "9d52b2bde1c0a87d20aac1d7057f231b433d353e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f6141fa38f42a92fe10ca6b707813f0253ba5f3f Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6191) 
   * 9d52b2bde1c0a87d20aac1d7057f231b433d353e UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870",
       "triggerID" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6015",
       "triggerID" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6103",
       "triggerID" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ada20c1fc8eb927eb4b72e9783d85821e67934cb Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6015) 
   * a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6103) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] klion26 commented on a change in pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
klion26 commented on a change in pull request #13225:
URL: https://github.com/apache/flink/pull/13225#discussion_r483392129



##########
File path: flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/operations/utils/SortOperationFactory.java
##########
@@ -121,9 +121,9 @@ private SortQueryOperation validateAndGetChildSort(QueryOperation child, PostRes
 			previousSort = (SortQueryOperation) createSort(Collections.emptyList(), child, postResolverFactory);

Review comment:
       could you please revert these unrelated changes?




----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870",
       "triggerID" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6015",
       "triggerID" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6103",
       "triggerID" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6140",
       "triggerID" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f6141fa38f42a92fe10ca6b707813f0253ba5f3f",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6191",
       "triggerID" : "f6141fa38f42a92fe10ca6b707813f0253ba5f3f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9d5f591223a0e46a22e24bbeb084a6b59c48a445 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6140) 
   * f6141fa38f42a92fe10ca6b707813f0253ba5f3f Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6191) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] klion26 commented on a change in pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
klion26 commented on a change in pull request #13225:
URL: https://github.com/apache/flink/pull/13225#discussion_r478844519



##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +153,77 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),Rich functions 还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些对于参数化功能很有用
+(参阅 [给函数传递参数]({{ site.baseurl }}/zh/dev/batch/index.html#passing-parameters-to-functions)),
+创建和最终确定本地状态,访问广播变量(参阅
+[广播变量]({{ site.baseurl }}/zh/dev/batch/index.html#broadcast-variables)),以及访问运行时信息,例如累加器和计数器(参阅
+[累加器和计数器](#累加器和计数器)),以及迭代器的相关信息(参阅 [迭代器]({{ site.baseurl }}/zh/dev/batch/iterations.html))。
 
 {% top %}
 
-## Accumulators & Counters
+<a name="accumulators--counters"></a>
 
-Accumulators are simple constructs with an **add operation** and a **final accumulated result**,
-which is available after the job ended.
+## 累加器和计数器
 
-The most straightforward accumulator is a **counter**: You can increment it using the
-```Accumulator.add(V value)``` method. At the end of the job Flink will sum up (merge) all partial
-results and send the result to the client. Accumulators are useful during debugging or if you
-quickly want to find out more about your data.
+累加器是具有**加法运算**和**最终累加结果**的一种简单结构,可在作业结束后使用。
 
-Flink currently has the following **built-in accumulators**. Each of them implements the
-{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "Accumulator" %}
-interface.
+最简单的累加器就是**计数器**: 你可以使用
+```Accumulator.add(V value)``` 方法将其递增。在作业结束时,Flink 会汇总(合并)所有部分的结果并将其发送给客户端。
+在调试过程中或在你想快速了解有关数据更多信息时,累加器作用很大。
+
+Flink 目前有如下**内置累加器**。每个都实现了
+{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "累加器" %}
+接口。
 
 - {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/IntCounter.java "__IntCounter__" %},
   {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/LongCounter.java "__LongCounter__" %}
-  and {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleCounter.java "__DoubleCounter__" %}:
-  See below for an example using a counter.
-- {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java "__Histogram__" %}:
-  A histogram implementation for a discrete number of bins. Internally it is just a map from Integer
-  to Integer. You can use this to compute distributions of values, e.g. the distribution of
-  words-per-line for a word count program.
+  和 {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleCounter.java "__DoubleCounter__" %}:
+  有关使用计数器的示例,请参见下文。
+- {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java "__直方图__" %}:
+  离散数量的柱状直方图实现。在内部,它只是整形到整形的映射。你可以使用它来计算值的分布,例如,单词计数程序的每行单词的分布情况。
 
-__How to use accumulators:__
+__如何使用累加器:__
 
-First you have to create an accumulator object (here a counter) in the user-defined transformation
-function where you want to use it.
+首先,你要在需要使用累加器的用户自定义的转换函数中创建一个累加器对象(此处是计数器)。

Review comment:
       ```suggestion
   首先,在需要使用累加器的用户自定义函数中创建一个累加器对象(此处是计数器)。
   ```

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +153,77 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),Rich functions 还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些对于参数化功能很有用
+(参阅 [给函数传递参数]({{ site.baseurl }}/zh/dev/batch/index.html#passing-parameters-to-functions)),

Review comment:
       像 @RocMarshal 说的一样,现在的链接,建议使用 `{%link %}` 的形式,具体原因可以看他给出的链接

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +153,77 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),Rich functions 还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些对于参数化功能很有用

Review comment:
       `这些对于参数化功能很有用` 这个单纯读中文觉得有点奇怪,能否优化一下呢?

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +153,77 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),Rich functions 还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些对于参数化功能很有用
+(参阅 [给函数传递参数]({{ site.baseurl }}/zh/dev/batch/index.html#passing-parameters-to-functions)),
+创建和最终确定本地状态,访问广播变量(参阅
+[广播变量]({{ site.baseurl }}/zh/dev/batch/index.html#broadcast-variables)),以及访问运行时信息,例如累加器和计数器(参阅
+[累加器和计数器](#累加器和计数器)),以及迭代器的相关信息(参阅 [迭代器]({{ site.baseurl }}/zh/dev/batch/iterations.html))。
 
 {% top %}
 
-## Accumulators & Counters
+<a name="accumulators--counters"></a>
 
-Accumulators are simple constructs with an **add operation** and a **final accumulated result**,
-which is available after the job ended.
+## 累加器和计数器
 
-The most straightforward accumulator is a **counter**: You can increment it using the
-```Accumulator.add(V value)``` method. At the end of the job Flink will sum up (merge) all partial
-results and send the result to the client. Accumulators are useful during debugging or if you
-quickly want to find out more about your data.
+累加器是具有**加法运算**和**最终累加结果**的一种简单结构,可在作业结束后使用。
 
-Flink currently has the following **built-in accumulators**. Each of them implements the
-{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "Accumulator" %}
-interface.
+最简单的累加器就是**计数器**: 你可以使用
+```Accumulator.add(V value)``` 方法将其递增。在作业结束时,Flink 会汇总(合并)所有部分的结果并将其发送给客户端。
+在调试过程中或在你想快速了解有关数据更多信息时,累加器作用很大。
+
+Flink 目前有如下**内置累加器**。每个都实现了
+{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "累加器" %}
+接口。
 
 - {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/IntCounter.java "__IntCounter__" %},
   {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/LongCounter.java "__LongCounter__" %}
-  and {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleCounter.java "__DoubleCounter__" %}:
-  See below for an example using a counter.
-- {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java "__Histogram__" %}:
-  A histogram implementation for a discrete number of bins. Internally it is just a map from Integer
-  to Integer. You can use this to compute distributions of values, e.g. the distribution of
-  words-per-line for a word count program.
+  和 {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleCounter.java "__DoubleCounter__" %}:
+  有关使用计数器的示例,请参见下文。
+- {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java "__直方图__" %}:
+  离散数量的柱状直方图实现。在内部,它只是整形到整形的映射。你可以使用它来计算值的分布,例如,单词计数程序的每行单词的分布情况。
 
-__How to use accumulators:__
+__如何使用累加器:__
 
-First you have to create an accumulator object (here a counter) in the user-defined transformation
-function where you want to use it.
+首先,你要在需要使用累加器的用户自定义的转换函数中创建一个累加器对象(此处是计数器)。
 
 {% highlight java %}
 private IntCounter numLines = new IntCounter();
 {% endhighlight %}
 
-Second you have to register the accumulator object, typically in the ```open()``` method of the
-*rich* function. Here you also define the name.
+其次,你必须在富函数的```open()```方法中注册累加器对象。也可以在此处定义名称。
 
 {% highlight java %}
 getRuntimeContext().addAccumulator("num-lines", this.numLines);
 {% endhighlight %}
 
-You can now use the accumulator anywhere in the operator function, including in the ```open()``` and
-```close()``` methods.
+现在你可以在操作函数中的任何位置(包括 ```open()``` 和 ```close()``` 方法中)使用累加器。
 
 {% highlight java %}
 this.numLines.add(1);
 {% endhighlight %}
 
-The overall result will be stored in the ```JobExecutionResult``` object which is
-returned from the `execute()` method of the execution environment
-(currently this only works if the execution waits for the
-completion of the job).
+最终整体结果会存储在由执行环境的 `execute()` 方法返回的 ```JobExecutionResult``` 对象中(当前只有等待作业完成后执行才起作用)。
 
 {% highlight java %}
 myJobExecutionResult.getAccumulatorResult("num-lines")
 {% endhighlight %}
 
-All accumulators share a single namespace per job. Thus you can use the same accumulator in
-different operator functions of your job. Flink will internally merge all accumulators with the same
-name.
+单个作业的所有累加器共享一个命名空间。因此你可以在不同的操作函数里面使用同一个累加器。Flink 会在内部将所有具有相同名称的累加器合并起来。
 
-A note on accumulators and iterations: Currently the result of accumulators is only available after
-the overall job has ended. We plan to also make the result of the previous iteration available in the
-next iteration. You can use
-{% gh_link /flink-java/src/main/java/org/apache/flink/api/java/operators/IterativeDataSet.java#L98 "Aggregators" %}
-to compute per-iteration statistics and base the termination of iterations on such statistics.
+关于累加器和迭代的注意事项:当前累加器的结果只有在整个作业结束后才可用。我们还计划在下一次迭代中提供上一次的迭代结果。你可以使用
+{% gh_link /flink-java/src/main/java/org/apache/flink/api/java/operators/IterativeDataSet.java#L98 "聚合器" %}
+来计算每次迭代的统计信息,并基于此类统计信息来终止迭代。
 
-__Custom accumulators:__
+__定制累加器:__
 
-To implement your own accumulator you simply have to write your implementation of the Accumulator
-interface. Feel free to create a pull request if you think your custom accumulator should be shipped
-with Flink.
+要实现自己的累加器,你只需要实现累加器接口即可。如果你认为自定义累加器应随 Flink 一起提供,请尽管创建拉取请求。

Review comment:
       `拉取请求` 我个人建议保持 `pull request` 原文,中文不一定知道是什么意思

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +153,77 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),Rich functions 还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些对于参数化功能很有用
+(参阅 [给函数传递参数]({{ site.baseurl }}/zh/dev/batch/index.html#passing-parameters-to-functions)),
+创建和最终确定本地状态,访问广播变量(参阅
+[广播变量]({{ site.baseurl }}/zh/dev/batch/index.html#broadcast-variables)),以及访问运行时信息,例如累加器和计数器(参阅
+[累加器和计数器](#累加器和计数器)),以及迭代器的相关信息(参阅 [迭代器]({{ site.baseurl }}/zh/dev/batch/iterations.html))。
 
 {% top %}
 
-## Accumulators & Counters
+<a name="accumulators--counters"></a>
 
-Accumulators are simple constructs with an **add operation** and a **final accumulated result**,
-which is available after the job ended.
+## 累加器和计数器
 
-The most straightforward accumulator is a **counter**: You can increment it using the
-```Accumulator.add(V value)``` method. At the end of the job Flink will sum up (merge) all partial
-results and send the result to the client. Accumulators are useful during debugging or if you
-quickly want to find out more about your data.
+累加器是具有**加法运算**和**最终累加结果**的一种简单结构,可在作业结束后使用。
 
-Flink currently has the following **built-in accumulators**. Each of them implements the
-{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "Accumulator" %}
-interface.
+最简单的累加器就是**计数器**: 你可以使用
+```Accumulator.add(V value)``` 方法将其递增。在作业结束时,Flink 会汇总(合并)所有部分的结果并将其发送给客户端。
+在调试过程中或在你想快速了解有关数据更多信息时,累加器作用很大。
+
+Flink 目前有如下**内置累加器**。每个都实现了
+{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "累加器" %}
+接口。
 
 - {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/IntCounter.java "__IntCounter__" %},
   {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/LongCounter.java "__LongCounter__" %}
-  and {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleCounter.java "__DoubleCounter__" %}:
-  See below for an example using a counter.
-- {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java "__Histogram__" %}:
-  A histogram implementation for a discrete number of bins. Internally it is just a map from Integer
-  to Integer. You can use this to compute distributions of values, e.g. the distribution of
-  words-per-line for a word count program.
+  和 {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleCounter.java "__DoubleCounter__" %}:
+  有关使用计数器的示例,请参见下文。
+- {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java "__直方图__" %}:
+  离散数量的柱状直方图实现。在内部,它只是整形到整形的映射。你可以使用它来计算值的分布,例如,单词计数程序的每行单词的分布情况。
 
-__How to use accumulators:__
+__如何使用累加器:__
 
-First you have to create an accumulator object (here a counter) in the user-defined transformation
-function where you want to use it.
+首先,你要在需要使用累加器的用户自定义的转换函数中创建一个累加器对象(此处是计数器)。
 
 {% highlight java %}
 private IntCounter numLines = new IntCounter();
 {% endhighlight %}
 
-Second you have to register the accumulator object, typically in the ```open()``` method of the
-*rich* function. Here you also define the name.
+其次,你必须在富函数的```open()```方法中注册累加器对象。也可以在此处定义名称。
 
 {% highlight java %}
 getRuntimeContext().addAccumulator("num-lines", this.numLines);
 {% endhighlight %}
 
-You can now use the accumulator anywhere in the operator function, including in the ```open()``` and
-```close()``` methods.
+现在你可以在操作函数中的任何位置(包括 ```open()``` 和 ```close()``` 方法中)使用累加器。
 
 {% highlight java %}
 this.numLines.add(1);
 {% endhighlight %}
 
-The overall result will be stored in the ```JobExecutionResult``` object which is
-returned from the `execute()` method of the execution environment
-(currently this only works if the execution waits for the
-completion of the job).
+最终整体结果会存储在由执行环境的 `execute()` 方法返回的 ```JobExecutionResult``` 对象中(当前只有等待作业完成后执行才起作用)。
 
 {% highlight java %}
 myJobExecutionResult.getAccumulatorResult("num-lines")
 {% endhighlight %}
 
-All accumulators share a single namespace per job. Thus you can use the same accumulator in
-different operator functions of your job. Flink will internally merge all accumulators with the same
-name.
+单个作业的所有累加器共享一个命名空间。因此你可以在不同的操作函数里面使用同一个累加器。Flink 会在内部将所有具有相同名称的累加器合并起来。
 
-A note on accumulators and iterations: Currently the result of accumulators is only available after
-the overall job has ended. We plan to also make the result of the previous iteration available in the
-next iteration. You can use
-{% gh_link /flink-java/src/main/java/org/apache/flink/api/java/operators/IterativeDataSet.java#L98 "Aggregators" %}
-to compute per-iteration statistics and base the termination of iterations on such statistics.
+关于累加器和迭代的注意事项:当前累加器的结果只有在整个作业结束后才可用。我们还计划在下一次迭代中提供上一次的迭代结果。你可以使用
+{% gh_link /flink-java/src/main/java/org/apache/flink/api/java/operators/IterativeDataSet.java#L98 "聚合器" %}
+来计算每次迭代的统计信息,并基于此类统计信息来终止迭代。
 
-__Custom accumulators:__
+__定制累加器:__
 
-To implement your own accumulator you simply have to write your implementation of the Accumulator
-interface. Feel free to create a pull request if you think your custom accumulator should be shipped
-with Flink.
+要实现自己的累加器,你只需要实现累加器接口即可。如果你认为自定义累加器应随 Flink 一起提供,请尽管创建拉取请求。
 
-You have the choice to implement either
+你可以选择实现
 {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "Accumulator" %}
-or {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/SimpleAccumulator.java "SimpleAccumulator" %}.
+或 {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/SimpleAccumulator.java "SimpleAccumulator" %}。
 
-```Accumulator<V,R>``` is most flexible: It defines a type ```V``` for the value to add, and a
-result type ```R``` for the final result. E.g. for a histogram, ```V``` is a number and ```R``` is
- a histogram. ```SimpleAccumulator``` is for the cases where both types are the same, e.g. for counters.
+```Accumulator<V,R>``` 最灵活: 它给需要添加的值定义了类型```V```,并定义了最终的结果类型```R```。例如,对于直方图,```V```是一个数字且```R```是一个直方图。

Review comment:
       ```suggestion
   ```Accumulator<V,R>``` 最灵活: 它给需要添加的值定义了类型 ```V```,并定义了最终的结果类型 ```R```。例如,对于直方图,```V``` 是一个数字且 ```R```是一个直方图。
   ```

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +153,77 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),Rich functions 还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些对于参数化功能很有用
+(参阅 [给函数传递参数]({{ site.baseurl }}/zh/dev/batch/index.html#passing-parameters-to-functions)),
+创建和最终确定本地状态,访问广播变量(参阅
+[广播变量]({{ site.baseurl }}/zh/dev/batch/index.html#broadcast-variables)),以及访问运行时信息,例如累加器和计数器(参阅
+[累加器和计数器](#累加器和计数器)),以及迭代器的相关信息(参阅 [迭代器]({{ site.baseurl }}/zh/dev/batch/iterations.html))。

Review comment:
       `[累加器和计数器](#累加器和计数器)` 这里的跳转不要用中文

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +153,77 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),Rich functions 还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些对于参数化功能很有用
+(参阅 [给函数传递参数]({{ site.baseurl }}/zh/dev/batch/index.html#passing-parameters-to-functions)),
+创建和最终确定本地状态,访问广播变量(参阅
+[广播变量]({{ site.baseurl }}/zh/dev/batch/index.html#broadcast-variables)),以及访问运行时信息,例如累加器和计数器(参阅
+[累加器和计数器](#累加器和计数器)),以及迭代器的相关信息(参阅 [迭代器]({{ site.baseurl }}/zh/dev/batch/iterations.html))。
 
 {% top %}
 
-## Accumulators & Counters
+<a name="accumulators--counters"></a>
 
-Accumulators are simple constructs with an **add operation** and a **final accumulated result**,
-which is available after the job ended.
+## 累加器和计数器
 
-The most straightforward accumulator is a **counter**: You can increment it using the
-```Accumulator.add(V value)``` method. At the end of the job Flink will sum up (merge) all partial
-results and send the result to the client. Accumulators are useful during debugging or if you
-quickly want to find out more about your data.
+累加器是具有**加法运算**和**最终累加结果**的一种简单结构,可在作业结束后使用。
 
-Flink currently has the following **built-in accumulators**. Each of them implements the
-{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "Accumulator" %}
-interface.
+最简单的累加器就是**计数器**: 你可以使用
+```Accumulator.add(V value)``` 方法将其递增。在作业结束时,Flink 会汇总(合并)所有部分的结果并将其发送给客户端。
+在调试过程中或在你想快速了解有关数据更多信息时,累加器作用很大。
+
+Flink 目前有如下**内置累加器**。每个都实现了
+{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "累加器" %}
+接口。
 
 - {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/IntCounter.java "__IntCounter__" %},
   {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/LongCounter.java "__LongCounter__" %}
-  and {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleCounter.java "__DoubleCounter__" %}:
-  See below for an example using a counter.
-- {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java "__Histogram__" %}:
-  A histogram implementation for a discrete number of bins. Internally it is just a map from Integer
-  to Integer. You can use this to compute distributions of values, e.g. the distribution of
-  words-per-line for a word count program.
+  和 {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleCounter.java "__DoubleCounter__" %}:
+  有关使用计数器的示例,请参见下文。
+- {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java "__直方图__" %}:
+  离散数量的柱状直方图实现。在内部,它只是整形到整形的映射。你可以使用它来计算值的分布,例如,单词计数程序的每行单词的分布情况。
 
-__How to use accumulators:__
+__如何使用累加器:__
 
-First you have to create an accumulator object (here a counter) in the user-defined transformation
-function where you want to use it.
+首先,你要在需要使用累加器的用户自定义的转换函数中创建一个累加器对象(此处是计数器)。
 
 {% highlight java %}
 private IntCounter numLines = new IntCounter();
 {% endhighlight %}
 
-Second you have to register the accumulator object, typically in the ```open()``` method of the
-*rich* function. Here you also define the name.
+其次,你必须在富函数的```open()```方法中注册累加器对象。也可以在此处定义名称。

Review comment:
       ```suggestion
   其次,你必须在富函数的 ```open()``` 方法中注册累加器对象。也可以在此处定义名称。
   ```




----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 40658a82560ebc79ee2047a789db4fa003115099 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808) 
   * 6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] klion26 commented on a change in pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
klion26 commented on a change in pull request #13225:
URL: https://github.com/apache/flink/pull/13225#discussion_r482706564



##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +153,78 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),Rich functions 还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些方法对于参数化函数
+(参阅 [给函数传递参数]({{ site.baseurl }}{% link zh/dev/batch/index.html#passing-parameters-to-functions %})),

Review comment:
       现在的链接还是有问题的,如果在本地执行 `./docs/docker/run.sh` 然后执行 `./build_docs.sh -p` 是可以看到报错的
   正确的应该是 `{%link dev/batch/index.zh.md %}#passing-parameters-to-functions`




----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870",
       "triggerID" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6015",
       "triggerID" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ada20c1fc8eb927eb4b72e9783d85821e67934cb Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6015) 
   * a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870",
       "triggerID" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6015",
       "triggerID" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6103",
       "triggerID" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6103) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] RocMarshal commented on a change in pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
RocMarshal commented on a change in pull request #13225:
URL: https://github.com/apache/flink/pull/13225#discussion_r476500930



##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -23,16 +23,14 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-Most operations require a user-defined function. This section lists different
-ways of how they can be specified. We also cover `Accumulators`, which can be
-used to gain insights into your Flink application.
+大多数操作都需要用户自定义函数。本节列出了实现用户自定义函数的不同方式。还会介绍 `Accumulators`(累加器),可用于深入了解你的 Flink 应用程序。
 
 <div class="codetabs" markdown="1">
 <div data-lang="java" markdown="1">
 
-## Implementing an interface
+## 实现接口

Review comment:
       I think that we should improve on the section-titles in the whole page  
    according to the item `4. 标题锚点链接` of [Flink Translation Specifications](https://cwiki.apache.org/confluence/display/FLINK/Flink+Translation+Specifications)

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +142,75 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),富函数还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些对于参数化功能很有用
+(参阅 [给函数传递参数]({{ site.baseurl }}/zh/dev/batch/index.html#passing-parameters-to-functions)),
+创建和最终确定本地状态,访问广播变量(参阅
+[广播变量]({{ site.baseurl }}/zh/dev/batch/index.html#broadcast-variables)),以及访问运行时信息,例如累加器和计数器(参阅
+[累加器和计数器](#累加器和计数器)),以及迭代器的相关信息(参阅 [迭代器]({{ site.baseurl }}/zh/dev/batch/iterations.html))。
 
 {% top %}
 
-## Accumulators & Counters
+## 累加器和计数器
 
-Accumulators are simple constructs with an **add operation** and a **final accumulated result**,
-which is available after the job ended.
+累加器是具有**加法运算**和**最终累加结果**的一种简单结构,可在作业结束后使用。
 
-The most straightforward accumulator is a **counter**: You can increment it using the
-```Accumulator.add(V value)``` method. At the end of the job Flink will sum up (merge) all partial
-results and send the result to the client. Accumulators are useful during debugging or if you
-quickly want to find out more about your data.
+最简单的累加器就是**计数器**: 你可以使用
+```Accumulator.add(V value)``` 方法将其递增。在作业结束时,Flink 会汇总(合并)所有部分的结果并将其发送给客户端。
+在调试过程中或在你想快速了解有关数据更多信息时,累加器作用很大。
 
-Flink currently has the following **built-in accumulators**. Each of them implements the
-{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "Accumulator" %}
-interface.
+Flink 目前有如下**内置累加器**。每个都实现了
+{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "累加器" %}
+接口。
 
 - {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/IntCounter.java "__IntCounter__" %},
   {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/LongCounter.java "__LongCounter__" %}
-  and {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleCounter.java "__DoubleCounter__" %}:
-  See below for an example using a counter.
-- {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java "__Histogram__" %}:
-  A histogram implementation for a discrete number of bins. Internally it is just a map from Integer
-  to Integer. You can use this to compute distributions of values, e.g. the distribution of
-  words-per-line for a word count program.
+  和 {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleCounter.java "__DoubleCounter__" %}:
+  有关使用计数器的示例,请参见下文。
+- {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java "__直方图__" %}:
+  离散数量的柱状直方图实现。 在内部,它只是整形到整形的映射。你可以使用它来计算值的分布,例如,单词计数程序的每行单词的分布情况。
 
-__How to use accumulators:__
+__如何使用累加器:__
 
-First you have to create an accumulator object (here a counter) in the user-defined transformation
-function where you want to use it.
+首先,你要在需要使用累加器的用户自定义的转换函数中创建一个累加器对象(此处是计数器) 。
 
 {% highlight java %}
 private IntCounter numLines = new IntCounter();
 {% endhighlight %}
 
-Second you have to register the accumulator object, typically in the ```open()``` method of the
-*rich* function. Here you also define the name.
+其次,你必须在富函数的```open()```方法中注册累加器对象。也可以在此处定义名称。
 
 {% highlight java %}
 getRuntimeContext().addAccumulator("num-lines", this.numLines);
 {% endhighlight %}
 
-You can now use the accumulator anywhere in the operator function, including in the ```open()``` and
-```close()``` methods.
+现在你可以在操作函数中的任何位置(包括```open()``` and```close()```方法中)使用累加器。
 
 {% highlight java %}
 this.numLines.add(1);
 {% endhighlight %}
 
-The overall result will be stored in the ```JobExecutionResult``` object which is
-returned from the `execute()` method of the execution environment
-(currently this only works if the execution waits for the
-completion of the job).
+最终整体结果会存储在由执行环境的 `execute()` 方法返回的 ```JobExecutionResult``` 对象中(当前只有等待作业完成后执行才起作用)。
 
 {% highlight java %}
 myJobExecutionResult.getAccumulatorResult("num-lines")
 {% endhighlight %}
 
-All accumulators share a single namespace per job. Thus you can use the same accumulator in
-different operator functions of your job. Flink will internally merge all accumulators with the same
-name.
+单个作业的所有累加器共享一个命名空间。因此你可以在不同的操作函数里面使用同一个累加器。Flink 会在内部将所有具有相同名称的累加器合并起来。
 
-A note on accumulators and iterations: Currently the result of accumulators is only available after
-the overall job has ended. We plan to also make the result of the previous iteration available in the
-next iteration. You can use
-{% gh_link /flink-java/src/main/java/org/apache/flink/api/java/operators/IterativeDataSet.java#L98 "Aggregators" %}
-to compute per-iteration statistics and base the termination of iterations on such statistics.
+关于累加器和迭代的注意事项:当前累加器的结果只有在整个作业结束后才可用。我们还计划在下一次迭代中提供上一次的迭代结果。你可以使用
+{% gh_link /flink-java/src/main/java/org/apache/flink/api/java/operators/IterativeDataSet.java#L98 "聚合器" %}
+来计算每次迭代的统计信息,并基于此类统计信息来终止迭代。
 
-__Custom accumulators:__
+__定制累加器:__

Review comment:
       ```suggestion
   __定制累加器:__
   ```

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +142,75 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),富函数还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些对于参数化功能很有用
+(参阅 [给函数传递参数]({{ site.baseurl }}/zh/dev/batch/index.html#passing-parameters-to-functions)),
+创建和最终确定本地状态,访问广播变量(参阅
+[广播变量]({{ site.baseurl }}/zh/dev/batch/index.html#broadcast-variables)),以及访问运行时信息,例如累加器和计数器(参阅

Review comment:
       The link-tags, liked as  `({{ site.baseurl }}/zh/dev/batch/index.html#broadcast-variables))` need to be improved by [Prefer format of link-tags](http://apache-flink-mailing-list-archive.1008284.n3.nabble.com/Reminder-Prefer-link-tag-in-documentation-td42362.html).

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -62,32 +60,31 @@ data.filter(s -> s.startsWith("http://"));
 data.reduce((i1,i2) -> i1 + i2);
 {% endhighlight %}
 
-## Rich functions
+## 富函数
 
-All transformations that require a user-defined function can
-instead take as argument a *rich* function. For example, instead of
+所有需要用户自定义函数的转化操作都可以将富函数作为参数。例如,代替
 
 {% highlight java %}
 class MyMapFunction implements MapFunction<String, Integer> {
   public Integer map(String value) { return Integer.parseInt(value); }
 };
 {% endhighlight %}
 
-you can write
+你可以写成
 
 {% highlight java %}
 class MyMapFunction extends RichMapFunction<String, Integer> {
   public Integer map(String value) { return Integer.parseInt(value); }
 };
 {% endhighlight %}
 
-and pass the function as usual to a `map` transformation:
+并将函数照常传递给map算子:

Review comment:
       ```suggestion
   并将函数照常传递给 `map` transformation:
   ```

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -62,32 +60,31 @@ data.filter(s -> s.startsWith("http://"));
 data.reduce((i1,i2) -> i1 + i2);
 {% endhighlight %}
 
-## Rich functions
+## 富函数
 
-All transformations that require a user-defined function can
-instead take as argument a *rich* function. For example, instead of
+所有需要用户自定义函数的转化操作都可以将富函数作为参数。例如,代替
 
 {% highlight java %}
 class MyMapFunction implements MapFunction<String, Integer> {
   public Integer map(String value) { return Integer.parseInt(value); }
 };
 {% endhighlight %}
 
-you can write
+你可以写成
 
 {% highlight java %}
 class MyMapFunction extends RichMapFunction<String, Integer> {
   public Integer map(String value) { return Integer.parseInt(value); }
 };
 {% endhighlight %}
 
-and pass the function as usual to a `map` transformation:
+并将函数照常传递给map算子:

Review comment:
       The key word `transformation` is a significant word for conceptions of Flink.
   

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +142,75 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),富函数还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些对于参数化功能很有用
+(参阅 [给函数传递参数]({{ site.baseurl }}/zh/dev/batch/index.html#passing-parameters-to-functions)),
+创建和最终确定本地状态,访问广播变量(参阅
+[广播变量]({{ site.baseurl }}/zh/dev/batch/index.html#broadcast-variables)),以及访问运行时信息,例如累加器和计数器(参阅
+[累加器和计数器](#累加器和计数器)),以及迭代器的相关信息(参阅 [迭代器]({{ site.baseurl }}/zh/dev/batch/iterations.html))。
 
 {% top %}
 
-## Accumulators & Counters
+## 累加器和计数器
 
-Accumulators are simple constructs with an **add operation** and a **final accumulated result**,
-which is available after the job ended.
+累加器是具有**加法运算**和**最终累加结果**的一种简单结构,可在作业结束后使用。
 
-The most straightforward accumulator is a **counter**: You can increment it using the
-```Accumulator.add(V value)``` method. At the end of the job Flink will sum up (merge) all partial
-results and send the result to the client. Accumulators are useful during debugging or if you
-quickly want to find out more about your data.
+最简单的累加器就是**计数器**: 你可以使用
+```Accumulator.add(V value)``` 方法将其递增。在作业结束时,Flink 会汇总(合并)所有部分的结果并将其发送给客户端。
+在调试过程中或在你想快速了解有关数据更多信息时,累加器作用很大。
 
-Flink currently has the following **built-in accumulators**. Each of them implements the
-{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "Accumulator" %}
-interface.
+Flink 目前有如下**内置累加器**。每个都实现了
+{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "累加器" %}
+接口。
 
 - {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/IntCounter.java "__IntCounter__" %},
   {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/LongCounter.java "__LongCounter__" %}
-  and {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleCounter.java "__DoubleCounter__" %}:
-  See below for an example using a counter.
-- {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java "__Histogram__" %}:
-  A histogram implementation for a discrete number of bins. Internally it is just a map from Integer
-  to Integer. You can use this to compute distributions of values, e.g. the distribution of
-  words-per-line for a word count program.
+  和 {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleCounter.java "__DoubleCounter__" %}:
+  有关使用计数器的示例,请参见下文。
+- {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java "__直方图__" %}:
+  离散数量的柱状直方图实现。 在内部,它只是整形到整形的映射。你可以使用它来计算值的分布,例如,单词计数程序的每行单词的分布情况。
 
-__How to use accumulators:__
+__如何使用累加器:__
 
-First you have to create an accumulator object (here a counter) in the user-defined transformation
-function where you want to use it.
+首先,你要在需要使用累加器的用户自定义的转换函数中创建一个累加器对象(此处是计数器) 。

Review comment:
       ```suggestion
   首先,你要在需要使用累加器的用户自定义的转换函数中创建一个累加器对象(此处是计数器)。
   ```

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -62,32 +60,31 @@ data.filter(s -> s.startsWith("http://"));
 data.reduce((i1,i2) -> i1 + i2);
 {% endhighlight %}
 
-## Rich functions
+## 富函数

Review comment:
       How about the original content `Rich functions`?

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +142,75 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),富函数还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些对于参数化功能很有用
+(参阅 [给函数传递参数]({{ site.baseurl }}/zh/dev/batch/index.html#passing-parameters-to-functions)),
+创建和最终确定本地状态,访问广播变量(参阅
+[广播变量]({{ site.baseurl }}/zh/dev/batch/index.html#broadcast-variables)),以及访问运行时信息,例如累加器和计数器(参阅
+[累加器和计数器](#累加器和计数器)),以及迭代器的相关信息(参阅 [迭代器]({{ site.baseurl }}/zh/dev/batch/iterations.html))。
 
 {% top %}
 
-## Accumulators & Counters
+## 累加器和计数器
 
-Accumulators are simple constructs with an **add operation** and a **final accumulated result**,
-which is available after the job ended.
+累加器是具有**加法运算**和**最终累加结果**的一种简单结构,可在作业结束后使用。
 
-The most straightforward accumulator is a **counter**: You can increment it using the
-```Accumulator.add(V value)``` method. At the end of the job Flink will sum up (merge) all partial
-results and send the result to the client. Accumulators are useful during debugging or if you
-quickly want to find out more about your data.
+最简单的累加器就是**计数器**: 你可以使用
+```Accumulator.add(V value)``` 方法将其递增。在作业结束时,Flink 会汇总(合并)所有部分的结果并将其发送给客户端。
+在调试过程中或在你想快速了解有关数据更多信息时,累加器作用很大。
 
-Flink currently has the following **built-in accumulators**. Each of them implements the
-{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "Accumulator" %}
-interface.
+Flink 目前有如下**内置累加器**。每个都实现了
+{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "累加器" %}
+接口。
 
 - {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/IntCounter.java "__IntCounter__" %},
   {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/LongCounter.java "__LongCounter__" %}
-  and {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleCounter.java "__DoubleCounter__" %}:
-  See below for an example using a counter.
-- {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java "__Histogram__" %}:
-  A histogram implementation for a discrete number of bins. Internally it is just a map from Integer
-  to Integer. You can use this to compute distributions of values, e.g. the distribution of
-  words-per-line for a word count program.
+  和 {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleCounter.java "__DoubleCounter__" %}:
+  有关使用计数器的示例,请参见下文。
+- {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java "__直方图__" %}:
+  离散数量的柱状直方图实现。 在内部,它只是整形到整形的映射。你可以使用它来计算值的分布,例如,单词计数程序的每行单词的分布情况。
 
-__How to use accumulators:__
+__如何使用累加器:__
 
-First you have to create an accumulator object (here a counter) in the user-defined transformation
-function where you want to use it.
+首先,你要在需要使用累加器的用户自定义的转换函数中创建一个累加器对象(此处是计数器) 。
 
 {% highlight java %}
 private IntCounter numLines = new IntCounter();
 {% endhighlight %}
 
-Second you have to register the accumulator object, typically in the ```open()``` method of the
-*rich* function. Here you also define the name.
+其次,你必须在富函数的```open()```方法中注册累加器对象。也可以在此处定义名称。
 
 {% highlight java %}
 getRuntimeContext().addAccumulator("num-lines", this.numLines);
 {% endhighlight %}
 
-You can now use the accumulator anywhere in the operator function, including in the ```open()``` and
-```close()``` methods.
+现在你可以在操作函数中的任何位置(包括```open()``` and```close()```方法中)使用累加器。
 
 {% highlight java %}
 this.numLines.add(1);
 {% endhighlight %}
 
-The overall result will be stored in the ```JobExecutionResult``` object which is
-returned from the `execute()` method of the execution environment
-(currently this only works if the execution waits for the
-completion of the job).
+最终整体结果会存储在由执行环境的 `execute()` 方法返回的 ```JobExecutionResult``` 对象中(当前只有等待作业完成后执行才起作用)。
 
 {% highlight java %}
 myJobExecutionResult.getAccumulatorResult("num-lines")
 {% endhighlight %}
 
-All accumulators share a single namespace per job. Thus you can use the same accumulator in
-different operator functions of your job. Flink will internally merge all accumulators with the same
-name.
+单个作业的所有累加器共享一个命名空间。因此你可以在不同的操作函数里面使用同一个累加器。Flink 会在内部将所有具有相同名称的累加器合并起来。
 
-A note on accumulators and iterations: Currently the result of accumulators is only available after
-the overall job has ended. We plan to also make the result of the previous iteration available in the
-next iteration. You can use
-{% gh_link /flink-java/src/main/java/org/apache/flink/api/java/operators/IterativeDataSet.java#L98 "Aggregators" %}
-to compute per-iteration statistics and base the termination of iterations on such statistics.
+关于累加器和迭代的注意事项:当前累加器的结果只有在整个作业结束后才可用。我们还计划在下一次迭代中提供上一次的迭代结果。你可以使用
+{% gh_link /flink-java/src/main/java/org/apache/flink/api/java/operators/IterativeDataSet.java#L98 "聚合器" %}
+来计算每次迭代的统计信息,并基于此类统计信息来终止迭代。
 
-__Custom accumulators:__
+__定制累加器:__
 
-To implement your own accumulator you simply have to write your implementation of the Accumulator
-interface. Feel free to create a pull request if you think your custom accumulator should be shipped
-with Flink.
+要实现自己的累加器,你只需要实现累加器接口即可。如果你认为自定义累加器应随 Flink 一起提供,请尽管创建拉取请求。
 
-You have the choice to implement either
-{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "Accumulator" %}
-or {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/SimpleAccumulator.java "SimpleAccumulator" %}.
+你可以选择实现
+{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "累加器" %}

Review comment:
       From the point of my view, to do nothing on `Accumulator ` and `SimpleAccumulator ` would be better in this mini-section. And it should express the meaning `simple name of the class `.

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +142,75 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),富函数还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些对于参数化功能很有用
+(参阅 [给函数传递参数]({{ site.baseurl }}/zh/dev/batch/index.html#passing-parameters-to-functions)),
+创建和最终确定本地状态,访问广播变量(参阅
+[广播变量]({{ site.baseurl }}/zh/dev/batch/index.html#broadcast-variables)),以及访问运行时信息,例如累加器和计数器(参阅
+[累加器和计数器](#累加器和计数器)),以及迭代器的相关信息(参阅 [迭代器]({{ site.baseurl }}/zh/dev/batch/iterations.html))。

Review comment:
       The link tags in current page , liked as `[累加器和计数器](#累加器和计数器)`  need to be corrected  after the change which could be made by   the item `4. 标题锚点链接` of [Flink Translation Specifications](https://cwiki.apache.org/confluence/display/FLINK/Flink+Translation+Specifications)

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +142,75 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),富函数还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些对于参数化功能很有用
+(参阅 [给函数传递参数]({{ site.baseurl }}/zh/dev/batch/index.html#passing-parameters-to-functions)),
+创建和最终确定本地状态,访问广播变量(参阅
+[广播变量]({{ site.baseurl }}/zh/dev/batch/index.html#broadcast-variables)),以及访问运行时信息,例如累加器和计数器(参阅
+[累加器和计数器](#累加器和计数器)),以及迭代器的相关信息(参阅 [迭代器]({{ site.baseurl }}/zh/dev/batch/iterations.html))。
 
 {% top %}
 
-## Accumulators & Counters
+## 累加器和计数器
 
-Accumulators are simple constructs with an **add operation** and a **final accumulated result**,
-which is available after the job ended.
+累加器是具有**加法运算**和**最终累加结果**的一种简单结构,可在作业结束后使用。
 
-The most straightforward accumulator is a **counter**: You can increment it using the
-```Accumulator.add(V value)``` method. At the end of the job Flink will sum up (merge) all partial
-results and send the result to the client. Accumulators are useful during debugging or if you
-quickly want to find out more about your data.
+最简单的累加器就是**计数器**: 你可以使用
+```Accumulator.add(V value)``` 方法将其递增。在作业结束时,Flink 会汇总(合并)所有部分的结果并将其发送给客户端。
+在调试过程中或在你想快速了解有关数据更多信息时,累加器作用很大。
 
-Flink currently has the following **built-in accumulators**. Each of them implements the
-{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "Accumulator" %}
-interface.
+Flink 目前有如下**内置累加器**。每个都实现了
+{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "累加器" %}
+接口。
 
 - {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/IntCounter.java "__IntCounter__" %},
   {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/LongCounter.java "__LongCounter__" %}
-  and {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleCounter.java "__DoubleCounter__" %}:
-  See below for an example using a counter.
-- {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java "__Histogram__" %}:
-  A histogram implementation for a discrete number of bins. Internally it is just a map from Integer
-  to Integer. You can use this to compute distributions of values, e.g. the distribution of
-  words-per-line for a word count program.
+  和 {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleCounter.java "__DoubleCounter__" %}:
+  有关使用计数器的示例,请参见下文。
+- {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java "__直方图__" %}:
+  离散数量的柱状直方图实现。 在内部,它只是整形到整形的映射。你可以使用它来计算值的分布,例如,单词计数程序的每行单词的分布情况。

Review comment:
       ```suggestion
     离散数量的柱状直方图实现。在内部,它只是整形到整形的映射。你可以使用它来计算值的分布,例如,单词计数程序的每行单词的分布情况。
   ```

##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +142,75 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),富函数还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些对于参数化功能很有用
+(参阅 [给函数传递参数]({{ site.baseurl }}/zh/dev/batch/index.html#passing-parameters-to-functions)),
+创建和最终确定本地状态,访问广播变量(参阅
+[广播变量]({{ site.baseurl }}/zh/dev/batch/index.html#broadcast-variables)),以及访问运行时信息,例如累加器和计数器(参阅
+[累加器和计数器](#累加器和计数器)),以及迭代器的相关信息(参阅 [迭代器]({{ site.baseurl }}/zh/dev/batch/iterations.html))。
 
 {% top %}
 
-## Accumulators & Counters
+## 累加器和计数器
 
-Accumulators are simple constructs with an **add operation** and a **final accumulated result**,
-which is available after the job ended.
+累加器是具有**加法运算**和**最终累加结果**的一种简单结构,可在作业结束后使用。
 
-The most straightforward accumulator is a **counter**: You can increment it using the
-```Accumulator.add(V value)``` method. At the end of the job Flink will sum up (merge) all partial
-results and send the result to the client. Accumulators are useful during debugging or if you
-quickly want to find out more about your data.
+最简单的累加器就是**计数器**: 你可以使用
+```Accumulator.add(V value)``` 方法将其递增。在作业结束时,Flink 会汇总(合并)所有部分的结果并将其发送给客户端。
+在调试过程中或在你想快速了解有关数据更多信息时,累加器作用很大。
 
-Flink currently has the following **built-in accumulators**. Each of them implements the
-{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "Accumulator" %}
-interface.
+Flink 目前有如下**内置累加器**。每个都实现了
+{% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Accumulator.java "累加器" %}
+接口。
 
 - {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/IntCounter.java "__IntCounter__" %},
   {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/LongCounter.java "__LongCounter__" %}
-  and {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleCounter.java "__DoubleCounter__" %}:
-  See below for an example using a counter.
-- {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java "__Histogram__" %}:
-  A histogram implementation for a discrete number of bins. Internally it is just a map from Integer
-  to Integer. You can use this to compute distributions of values, e.g. the distribution of
-  words-per-line for a word count program.
+  和 {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleCounter.java "__DoubleCounter__" %}:
+  有关使用计数器的示例,请参见下文。
+- {% gh_link /flink-core/src/main/java/org/apache/flink/api/common/accumulators/Histogram.java "__直方图__" %}:
+  离散数量的柱状直方图实现。 在内部,它只是整形到整形的映射。你可以使用它来计算值的分布,例如,单词计数程序的每行单词的分布情况。
 
-__How to use accumulators:__
+__如何使用累加器:__

Review comment:
       ```suggestion
   __如何使用累加器:__
   ```




----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870",
       "triggerID" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870) 
   * ada20c1fc8eb927eb4b72e9783d85821e67934cb UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] klion26 commented on a change in pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
klion26 commented on a change in pull request #13225:
URL: https://github.com/apache/flink/pull/13225#discussion_r489984016



##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +153,78 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的 function(map,reduce 等),Rich functions 还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些方法对于参数化 function
+(参阅 [给 function 传递参数]({% link dev/batch/index.zh.md %}#passing-parameters-to-functions)),
+创建和最终确定本地状态,访问广播变量(参阅
+[广播变量]({% link dev/batch/index.zh.md %}#broadcast-variables )),以及访问运行时信息,例如累加器和计数器(参阅

Review comment:
       @zhuxiaoshang @RocMarshal 这个地方的链接我怀疑是有问题的,我看了下,这个地方是 FLINK-17009 引入的,但是没有找到更早的历史。
   怀疑的原因是,这个文档讲的是 datastream 的 udfs,但是这里的链接是 batch 相关的。
   不过这个和整体的翻译无关,能否记录并查找一下这个地方是否真的有问题,正确的链接应该是什么?如果有问题的话,可以再提一个 PR 来进行修改




----------------------------------------------------------------
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



[GitHub] [flink] zhuxiaoshang commented on a change in pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
zhuxiaoshang commented on a change in pull request #13225:
URL: https://github.com/apache/flink/pull/13225#discussion_r477020865



##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +142,75 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),富函数还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些对于参数化功能很有用
+(参阅 [给函数传递参数]({{ site.baseurl }}/zh/dev/batch/index.html#passing-parameters-to-functions)),
+创建和最终确定本地状态,访问广播变量(参阅
+[广播变量]({{ site.baseurl }}/zh/dev/batch/index.html#broadcast-variables)),以及访问运行时信息,例如累加器和计数器(参阅

Review comment:
       These link-tags can be linked to correct pages,so i think it's unnecessary to change.




----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870",
       "triggerID" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] zhuxiaoshang commented on a change in pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
zhuxiaoshang commented on a change in pull request #13225:
URL: https://github.com/apache/flink/pull/13225#discussion_r482071704



##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +153,78 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),Rich functions 还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些方法对于参数化函数
+(参阅 [给函数传递参数]({{ site.baseurl }}{% link zh/dev/batch/index.html#passing-parameters-to-functions %})),

Review comment:
       @klion26 yes,i have fixed it.




----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870",
       "triggerID" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6015",
       "triggerID" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6103",
       "triggerID" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6140",
       "triggerID" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f6141fa38f42a92fe10ca6b707813f0253ba5f3f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6191",
       "triggerID" : "f6141fa38f42a92fe10ca6b707813f0253ba5f3f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9d52b2bde1c0a87d20aac1d7057f231b433d353e",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6481",
       "triggerID" : "9d52b2bde1c0a87d20aac1d7057f231b433d353e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "313c6760e7d491540ab8d782b87ee2c637d9b5ab",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "313c6760e7d491540ab8d782b87ee2c637d9b5ab",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9d52b2bde1c0a87d20aac1d7057f231b433d353e Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6481) 
   * 313c6760e7d491540ab8d782b87ee2c637d9b5ab UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870",
       "triggerID" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 40658a82560ebc79ee2047a789db4fa003115099 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808) 
   * 6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870",
       "triggerID" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6015",
       "triggerID" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6103",
       "triggerID" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6140",
       "triggerID" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f6141fa38f42a92fe10ca6b707813f0253ba5f3f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6191",
       "triggerID" : "f6141fa38f42a92fe10ca6b707813f0253ba5f3f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9d52b2bde1c0a87d20aac1d7057f231b433d353e",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6481",
       "triggerID" : "9d52b2bde1c0a87d20aac1d7057f231b433d353e",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f6141fa38f42a92fe10ca6b707813f0253ba5f3f Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6191) 
   * 9d52b2bde1c0a87d20aac1d7057f231b433d353e Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6481) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] zhuxiaoshang commented on a change in pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
zhuxiaoshang commented on a change in pull request #13225:
URL: https://github.com/apache/flink/pull/13225#discussion_r480106507



##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +153,77 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),Rich functions 还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些对于参数化功能很有用
+(参阅 [给函数传递参数]({{ site.baseurl }}/zh/dev/batch/index.html#passing-parameters-to-functions)),

Review comment:
       可以举个例子吗?那个链接没太看明白
   现有链接好像可以正确链接到对应页面。




----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870",
       "triggerID" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6015",
       "triggerID" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6103",
       "triggerID" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6140",
       "triggerID" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9d5f591223a0e46a22e24bbeb084a6b59c48a445 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6140) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] zhuxiaoshang commented on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
zhuxiaoshang commented on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-683767507


   > @zhuxiaoshang thanks for your contribution, left some comments, please let me know what do you think, thanks.
   
   thanks for your review,i had fixed accroading to your suggestions.


----------------------------------------------------------------
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



[GitHub] [flink] klion26 commented on a change in pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
klion26 commented on a change in pull request #13225:
URL: https://github.com/apache/flink/pull/13225#discussion_r481720837



##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -147,95 +153,78 @@ data.map (new RichMapFunction[String, Int] {
 
 </div>
 
-Rich functions provide, in addition to the user-defined function (map,
-reduce, etc), four methods: `open`, `close`, `getRuntimeContext`, and
-`setRuntimeContext`. These are useful for parameterizing the function
-(see [Passing Parameters to Functions]({{ site.baseurl }}/dev/batch/index.html#passing-parameters-to-functions)),
-creating and finalizing local state, accessing broadcast variables (see
-[Broadcast Variables]({{ site.baseurl }}/dev/batch/index.html#broadcast-variables)), and for accessing runtime
-information such as accumulators and counters (see
-[Accumulators and Counters](#accumulators--counters)), and information
-on iterations (see [Iterations]({{ site.baseurl }}/dev/batch/iterations.html)).
+除了用户自定义的功能(map,reduce 等),Rich functions 还提供了四个方法:`open`、`close`、`getRuntimeContext` 和
+`setRuntimeContext`。这些方法对于参数化函数
+(参阅 [给函数传递参数]({{ site.baseurl }}{% link zh/dev/batch/index.html#passing-parameters-to-functions %})),

Review comment:
       这个链接的修改是有问题的,具体可以参考下上次评论中的链接。
   http://apache-flink-mailing-list-archive.1008284.n3.nabble.com/Reminder-Prefer-link-tag-in-documentation-td42362.html
   
   需要把
   [CLI]({% site.baseurl %}/ops/cli.html) 的格式换成 [CLI]({% link ops/cli.md %})。
   
   你可以参考 https://github.com/apache/flink/pull/12798/files 这个 PR 的修改。
   
   修改完成之后,建议执行 `./docs/docker/run.sh` 然后执行 `./build_docs.sh -p`  查看是否有错误(现在的修改执行是有错误的),这样执行没有错误之后,可以打开 `localhost:4000` 找到翻译的页面查看具体效果




----------------------------------------------------------------
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



[GitHub] [flink] zhuxiaoshang commented on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
zhuxiaoshang commented on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-692442654


   > @zhuxiaoshang thanks for your contribution, left some comments based on the item `5. 中文标点符号` of [Flink+Translation+Specifications](https://cwiki.apache.org/confluence/display/FLINK/Flink+Translation+Specifications) please let me know what do you think ,thanks.
   
   yes,you are right,brackets should be chinese form.


----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870",
       "triggerID" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6015",
       "triggerID" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6103",
       "triggerID" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6140",
       "triggerID" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f6141fa38f42a92fe10ca6b707813f0253ba5f3f",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6191",
       "triggerID" : "f6141fa38f42a92fe10ca6b707813f0253ba5f3f",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f6141fa38f42a92fe10ca6b707813f0253ba5f3f Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6191) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 40658a82560ebc79ee2047a789db4fa003115099 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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



[GitHub] [flink] zhuxiaoshang commented on a change in pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
zhuxiaoshang commented on a change in pull request #13225:
URL: https://github.com/apache/flink/pull/13225#discussion_r487680982



##########
File path: docs/dev/user_defined_functions.zh.md
##########
@@ -114,30 +119,31 @@ data.reduce { (i1,i2) => i1 + i2 }
 data.reduce { _ + _ }
 {% endhighlight %}
 
+<a name="rich-functions"></a>
+
 ## Rich functions
 
-All transformations that take as argument a lambda function can
-instead take as argument a *rich* function. For example, instead of
+所有将 lambda 表达式作为参数的转化操作都可以用 *rich* function 来代替。例如,代替
 
 {% highlight scala %}
 data.map { x => x.toInt }
 {% endhighlight %}
 
-you can write
+你可以写成
 
 {% highlight scala %}
 class MyMapFunction extends RichMapFunction[String, Int] {
   def map(in: String):Int = { in.toInt }
 };
 {% endhighlight %}
 
-and pass the function to a `map` transformation:
+并将函数传递给 `map` transformation:
 
 {% highlight scala %}
 data.map(new MyMapFunction())
 {% endhighlight %}
 
-Rich functions can also be defined as an anonymous class:
+富函数也可以定义成匿名类:

Review comment:
       yes,it's should be resvered as `function`




----------------------------------------------------------------
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



[GitHub] [flink] rmetzger commented on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
rmetzger commented on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-693925440


   Thanks for the review! Merging ...


----------------------------------------------------------------
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



[GitHub] [flink] flinkbot edited a comment on pull request #13225: [FLINK-18974][docs-zh]Translate the 'User-Defined Functions' page of "Application Development's DataStream API" into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #13225:
URL: https://github.com/apache/flink/pull/13225#issuecomment-678953566


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "40658a82560ebc79ee2047a789db4fa003115099",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5808",
       "triggerID" : "40658a82560ebc79ee2047a789db4fa003115099",
       "triggerType" : "PUSH"
     }, {
       "hash" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=5870",
       "triggerID" : "6bfd27b44774c770a2d28ee9ca1bde0e11bfbe29",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6015",
       "triggerID" : "ada20c1fc8eb927eb4b72e9783d85821e67934cb",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6103",
       "triggerID" : "a3b3807d4faccba3d3e9c7bb2a7f501c10ce8bc6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6140",
       "triggerID" : "9d5f591223a0e46a22e24bbeb084a6b59c48a445",
       "triggerType" : "PUSH"
     }, {
       "hash" : "f6141fa38f42a92fe10ca6b707813f0253ba5f3f",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6191",
       "triggerID" : "f6141fa38f42a92fe10ca6b707813f0253ba5f3f",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9d52b2bde1c0a87d20aac1d7057f231b433d353e",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6481",
       "triggerID" : "9d52b2bde1c0a87d20aac1d7057f231b433d353e",
       "triggerType" : "PUSH"
     }, {
       "hash" : "313c6760e7d491540ab8d782b87ee2c637d9b5ab",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6508",
       "triggerID" : "313c6760e7d491540ab8d782b87ee2c637d9b5ab",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 313c6760e7d491540ab8d782b87ee2c637d9b5ab Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=6508) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@flinkbot run azure` re-run the last Azure build
   </details>


----------------------------------------------------------------
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