klion26 commented on a change in pull request #12237:
URL: https://github.com/apache/flink/pull/12237#discussion_r463409277



##########
File path: docs/learn-flink/streaming_analytics.zh.md
##########
@@ -425,37 +366,31 @@ stream
     .reduce(<same reduce function>)
 {% endhighlight %}
 
-You might expect Flink's runtime to be smart enough to do this parallel 
pre-aggregation for you
-(provided you are using a ReduceFunction or AggregateFunction), but it's not.
+可能我们会猜测以 Flink 的能力,想要做到这样看起来是可行的(前提是你使用的是 ReduceFunction 或 AggregateFunction 
),但不是。
 
-The reason why this works is that the events produced by a time window are 
assigned timestamps
-based on the time at the end of the window. So, for example, all of the events 
produced
-by an hour-long window will have timestamps marking the end of an hour. Any 
subsequent window
-consuming those events should have a duration that is the same as, or a 
multiple of, the
-previous window.
+之所以可行,是因为时间窗口产生的事件是根据窗口结束时的时间分配时间戳的。例如,一个小时小时的窗口所产生的所有事件都将带有标记一个小时结束的时间戳。后面的窗口内的数据消费和前面的流产生的数据是一致的。
 
-#### No Results for Empty TimeWindows
+<a name="no-results-for-empty-timewindows"></a>
+#### 空的时间窗口不会输出结果
 
-Windows are only created when events are assigned to them. So if there are no 
events in a given time
-frame, no results will be reported.
+事件会触发窗口的创建。换句话说,如果在特定的窗口内没有事件,就不会有窗口,就不会有输出结果。
 
 #### Late Events Can Cause Late Merges
 
-Session windows are based on an abstraction of windows that can _merge_. Each 
element is initially
-assigned to a new window, after which windows are merged whenever the gap 
between them is small
-enough. In this way, a late event can bridge the gap separating two previously 
separate sessions,
-producing a late merge.
+会话窗口的实现是基于窗口的一个抽象能力,窗口可以 
_聚合_。会话窗口中的每个数据在初始被消费时,都会被分配一个新的窗口,但是如果窗口之间的间隔足够小,多个窗口就会被聚合。延迟事件可以弥合两个先前分开的会话间隔,从而产生一个虽然有延迟但是更加准确地结果。
 
 {% top %}
 
-## Hands-on
+<a name="hands-on"></a>
+## 实践练习
 
-The hands-on exercise that goes with this section is the [Hourly Tips
+本节附带的动手练习是[Hourly Tips

Review comment:
       这个地方需要修改一下哦
   也就是改成 "本节附带的动手练习是 [Hourly Tips"

##########
File path: docs/learn-flink/streaming_analytics.zh.md
##########
@@ -29,123 +29,86 @@ under the License.
 
 ## Event Time and Watermarks
 
-### Introduction
+<a name="introduction"></a>
+### 概要
 
-Flink explicitly supports three different notions of time:
+Flink 明确支持以下三种时间语义:
 
-* _event time:_ the time when an event occurred, as recorded by the device 
producing (or storing) the event
+* _事件时间(event time):_ 事件产生的时间,记录的是设备生产(或者存储)事件的时间
 
-* _ingestion time:_ a timestamp recorded by Flink at the moment it ingests the 
event
+* _摄取时间(ingestion time):_ Flink 读取事件时记录的时间
 
-* _processing time:_ the time when a specific operator in your pipeline is 
processing the event
+* _处理时间(processing time):_ Flink pipeline 中具体算子处理事件的时间
 
-For reproducible results, e.g., when computing the maximum price a stock 
reached during the first
-hour of trading on a given day, you should use event time. In this way the 
result won't depend on
-when the calculation is performed. This kind of real-time application is 
sometimes performed using
-processing time, but then the results are determined by the events that happen 
to be processed
-during that hour, rather than the events that occurred then. Computing 
analytics based on processing
-time causes inconsistencies, and makes it difficult to re-analyze historic 
data or test new
-implementations.
+为了获得可重现的结果,例如在计算过去的特定一天里第一个小时股票的最高价格时,我们应该使用事件时间。这样的话,无论什么时间去计算都不会影响输出结果。然而如果使用
 processing time 的话,实时应用程序的结果是由程序运行的时间所决定。多次运行基于 processing time 
的实时程序,可能得到的结果都不相同,也可能会导致再次分析历史数据或者测试新代码变得异常困难。

Review comment:
       这里之前已经使用了 处理时间 来代替 "processing time" 了,建议全文进行统一,所以的都使用 “处理时间”,其他的翻译也是一样的

##########
File path: docs/learn-flink/streaming_analytics.zh.md
##########
@@ -29,123 +29,86 @@ under the License.
 
 ## Event Time and Watermarks
 
-### Introduction
+<a name="introduction"></a>
+### 概要
 
-Flink explicitly supports three different notions of time:
+Flink 明确支持以下三种时间语义:
 
-* _event time:_ the time when an event occurred, as recorded by the device 
producing (or storing) the event
+* _事件时间(event time):_ 事件产生的时间,记录的是设备生产(或者存储)事件的时间
 
-* _ingestion time:_ a timestamp recorded by Flink at the moment it ingests the 
event
+* _摄取时间(ingestion time):_ Flink 读取事件时记录的时间
 
-* _processing time:_ the time when a specific operator in your pipeline is 
processing the event
+* _处理时间(processing time):_ Flink pipeline 中具体算子处理事件的时间
 
-For reproducible results, e.g., when computing the maximum price a stock 
reached during the first
-hour of trading on a given day, you should use event time. In this way the 
result won't depend on
-when the calculation is performed. This kind of real-time application is 
sometimes performed using
-processing time, but then the results are determined by the events that happen 
to be processed
-during that hour, rather than the events that occurred then. Computing 
analytics based on processing
-time causes inconsistencies, and makes it difficult to re-analyze historic 
data or test new
-implementations.
+为了获得可重现的结果,例如在计算过去的特定一天里第一个小时股票的最高价格时,我们应该使用事件时间。这样的话,无论什么时间去计算都不会影响输出结果。然而如果使用
 processing time 的话,实时应用程序的结果是由程序运行的时间所决定。多次运行基于 processing time 
的实时程序,可能得到的结果都不相同,也可能会导致再次分析历史数据或者测试新代码变得异常困难。
 
-### Working with Event Time
+<a name="working-with-event-time"></a>
+### 使用 Event Time
 
-By default, Flink will use processing time. To change this, you can set the 
Time Characteristic:
+Flink 在默认情况下是使用处理时间。也可以通过下面配置来告诉 Flink 选择哪种时间语义:
 
 {% highlight java %}
 final StreamExecutionEnvironment env =
     StreamExecutionEnvironment.getExecutionEnvironment();
 env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);
 {% endhighlight %}
 
-If you want to use event time, you will also need to supply a Timestamp 
Extractor and Watermark
-Generator that Flink will use to track the progress of event time. This will 
be covered in the
-section below on [Working with Watermarks]({% link
-learn-flink/streaming_analytics.zh.md %}#working-with-watermarks), but first 
we should explain what
-watermarks are.
+如果想要使用事件时间,需要额外给 Flink 提供一个时间戳提取器和 Watermark 生成器,Flink 
将使用它们来跟踪事件时间的进度。这将在选节[使用 Watermarks]({% link 
learn-flink/streaming_analytics.zh.md %}#Working-with-Watermarks) 
中介绍,但是首先我们需要解释一下 watermarks 是什么。

Review comment:
       这里的标题链接有问题,下文中使用到的是 "working-with-watermarks" 这里使用的是 
"Working-with-Watermarks" 大小写不一致。
   
   对于这样的情况,建议在翻译完成之后,自己在本地执行 `./docs/docker/run.sh` 然后执行 `./build_docs.sh -p` 
然后打开 `http://localhost:4000/zh/learn-flink/streaming_analytics.html`( 
也就是你翻译的这篇文章的链接)看一下,并且自己点击一次所有的链接看看是否正常




----------------------------------------------------------------
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:
[email protected]


Reply via email to