[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

2020-09-14 Thread GitBox


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 %}
 
+
+
 ## 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:
us...@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

2020-09-04 Thread GitBox


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

2020-09-03 Thread GitBox


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] {
 
 
 
-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:
us...@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

2020-09-02 Thread GitBox


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] {
 
 
 
-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:
us...@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

2020-08-31 Thread GitBox


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] {
 
 
 
-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:
us...@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

2020-08-31 Thread GitBox


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] {
 
 
 
-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:
us...@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

2020-08-25 Thread GitBox


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