RocMarshal commented on pull request #11979:
URL: https://github.com/apache/flink/pull/11979#issuecomment-624410277


   Hi, XBaith .
   I have completed the translation of this page and made corresponding 
improvements according to the your suggestions . If you have free time, would 
you please review it for me?
   
   Thank you very much.
   
   Best,
   Roc
   
   
   
   在 2020-05-04 01:25:04,"Xu Bai" <notificati...@github.com> 写道:
   
   @XBaith commented on this pull request.
   
   Good job!
   I leave a few suggestions that may could help.
   
   In docs/training/event_driven.zh.md:
   
   >  
   -### Example
   +### 实例
   
   
   Do you mean “示例” instead of “实例”?
   
   In docs/training/event_driven.zh.md:
   
   >  
   -If you've done the
   -[hands-on exercise]({% link training/streaming_analytics.zh.md %}#hands-on)
   -in the [Streaming Analytics training]({% link 
training/streaming_analytics.zh.md %}),
   -you will recall that it uses a `TumblingEventTimeWindow` to compute the sum 
of the tips for
   -each driver during each hour, like this:
   +如果你已经体验了
   +[流式分析训练]({% link training/streaming_analytics.zh.md %})
   +的[动手实践]({% link training/streaming_analytics.zh.md %}#hands-on),
   +你会忆起,它是采用 `TumblingEventTimeWindow` 来计算每个小时内每个司机的小费总和,
   
   
   “忆起”还是说“想起”,我个人觉得“想起”读起来更符合我们平常的说法。亦或者说意译成“你应该记得”
   
   In docs/training/event_driven.zh.md:
   
   > @@ -51,8 +50,8 @@ DataStream<Tuple3<Long, Long, Float>> hourlyTips = fares
            .process(new AddTips());
    {% endhighlight %}
    
   -It is reasonably straightforward, and educational, to do the same thing 
with a
   -`KeyedProcessFunction`. Let us begin by replacing the code above with this:
   +使用 `KeyedProcessFunction` 去实现相同的效果是合理、直接且有学习意义的。
   
   ⬇️ Suggested change
   -使用 `KeyedProcessFunction` 去实现相同的效果是合理、直接且有学习意义的。
   +使用 `KeyedProcessFunction` 去实现相同的操作更加直接且更有学习意义。
   
   
   In docs/training/event_driven.zh.md:
   
   >  
   -There are several good reasons to want to have more than one output stream 
from a Flink operator, such as reporting:
   +有几个很好的理由希望从 Flink operator 获得多个输出流,如下报告条目:
   
   ⬇️ Suggested change
   -有几个很好的理由希望从 Flink operator 获得多个输出流,如下报告条目:
   +有几个很好的理由希望从 Flink 算子获得多个输出流,如下报告条目:
   
   
   In docs/training/event_driven.zh.md:
   
   >  
   -Another common use case for ProcessFunctions is for expiring stale state. 
If you think back to the
   -[Rides and Fares Exercise](https://github.com/apache/flink-training/tree/{% 
if site.is_stable %}release-{{ site.version_title }}{% else %}master{% endif 
%}/rides-and-fares),
   -where a `RichCoFlatMapFunction` is used to compute a simple join, the 
sample solution assumes that
   -the TaxiRides and TaxiFares are perfectly matched, one-to-one for each 
`rideId`. If an event is lost,
   -the other event for the same `rideId` will be held in state forever. This 
could instead be implemented
   -as a `KeyedCoProcessFunction`, and a timer could be used to detect and 
clear any stale state.
   +ProcessFunctions 的另一个常见用例是过期过时 State。如果你回想一下
   +[Rides and Fares Exercise](https://github.com/apache/flink-training/tree/{% 
if site.is_stable %}release-{{ site.version_title }}{% else %}master{% endif 
%}/rides-and-fares),
   +其中使用 `RichCoFlatMapFunction` 来计算简单 Join,那么示例解决方案假设 TaxiRides 和 TaxiFares 
   +完全匹配,每个 `rideId` 一对一。如果某个事件丢失,则同一 `rideId` 的另一个事件将永远保持 State。
   +这可以作为 `Keyedcomprocessfunction` 实现,并且可以使用计时器来检测和清除任何过时的 State。
   
   ⬇️ Suggested change
   -这可以作为 `Keyedcomprocessfunction` 实现,并且可以使用计时器来检测和清除任何过时的 State。
   +这可以作为 `KeyedCoProcessFunction` 实现,并且可以使用计时器来检测和清除任何过时的 State。
   
   
   —
   You are receiving this because you authored the thread.
   Reply to this email directly, view it on GitHub, or unsubscribe.


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

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


Reply via email to