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 2021/01/27 11:22:10 UTC

[GitHub] [flink] dijkwxyz opened a new pull request #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

dijkwxyz opened a new pull request #14773:
URL: https://github.com/apache/flink/pull/14773


   Translating "Operator/windows" into Chinese
   English version URL: 
   https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/operators/windows.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:
users@infra.apache.org



[GitHub] [flink] flinkbot commented on pull request #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   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 0da2330259082ab890d671077cca17cbae4c5db5 (Wed Jan 27 11:31:35 UTC 2021)
   
    ✅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] XBaith commented on a change in pull request #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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



##########
File path: docs/dev/stream/operators/windows.zh.md
##########
@@ -23,137 +23,131 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-Windows are at the heart of processing infinite streams. Windows split the stream into "buckets" of finite size,
-over which we can apply computations. This document focuses on how windowing is performed in Flink and how the
-programmer can benefit to the maximum from its offered functionality.
+窗口(Window)是处理无界流的关键所在。窗口可以将数据流装入大小有限的“桶”中,再对每个“桶”加以处理。
+本文的重心将放在Flink如何进行窗口操作以及开发者如何尽可能地利用 Flink 所提供的功能。
 
-The general structure of a windowed Flink program is presented below. The first snippet refers to *keyed* streams,
-while the second to *non-keyed* ones. As one can see, the only difference is the `keyBy(...)` call for the keyed streams
-and the `window(...)` which becomes `windowAll(...)` for non-keyed streams. This is also going to serve as a roadmap
-for the rest of the page.
+下面展示了 Flink 窗口在 *keyed* streams 和 *non-keyed* streams 上使用的基本结构。
+我们可以看到,这两者唯一的区别仅在于:keyed streams 要调用  `keyBy(...)`后再调用 `window(...)` ,
+而 non-keyed streams 只用直接调用 `windowAll(...)`。留意这个区别,它能帮我们更好地理解后面的内容。
 
 **Keyed Windows**
 
     stream
-           .keyBy(...)               <-  keyed versus non-keyed windows
-           .window(...)              <-  required: "assigner"
-          [.trigger(...)]            <-  optional: "trigger" (else default trigger)
-          [.evictor(...)]            <-  optional: "evictor" (else no evictor)
-          [.allowedLateness(...)]    <-  optional: "lateness" (else zero)
-          [.sideOutputLateData(...)] <-  optional: "output tag" (else no side output for late data)
-           .reduce/aggregate/fold/apply()      <-  required: "function"
-          [.getSideOutput(...)]      <-  optional: "output tag"
+           .keyBy(...)               <-  仅 keyed 窗口需要
+           .window(...)              <-  必填项:"assigner"
+          [.trigger(...)]            <-  可选项:"trigger" (省略则使用默认 trigger)
+          [.evictor(...)]            <-  可选项:"evictor" (省略则不使用 evictor)
+          [.allowedLateness(...)]    <-  可选项:"lateness" (省略则为 0)
+          [.sideOutputLateData(...)] <-  可选项:"output tag" (省略则不对迟到数据使用side output)
+           .reduce/aggregate/fold/apply()      <-  必填项:"function"
+          [.getSideOutput(...)]      <-  可选项:"output tag"
 
 **Non-Keyed Windows**
 
     stream
-           .windowAll(...)           <-  required: "assigner"
-          [.trigger(...)]            <-  optional: "trigger" (else default trigger)
-          [.evictor(...)]            <-  optional: "evictor" (else no evictor)
-          [.allowedLateness(...)]    <-  optional: "lateness" (else zero)
-          [.sideOutputLateData(...)] <-  optional: "output tag" (else no side output for late data)
-           .reduce/aggregate/fold/apply()      <-  required: "function"
-          [.getSideOutput(...)]      <-  optional: "output tag"
+           .windowAll(...)           <-  必填项:"assigner"
+          [.trigger(...)]            <-  可选项:"trigger" (else default trigger)
+          [.evictor(...)]            <-  可选项:"evictor" (else no evictor)
+          [.allowedLateness(...)]    <-  可选项:"lateness" (else zero)
+          [.sideOutputLateData(...)] <-  可选项:"output tag" (else no side output for late data)
+           .reduce/aggregate/fold/apply()      <-  必填项:"function"
+          [.getSideOutput(...)]      <-  可选项:"output tag"
 
-In the above, the commands in square brackets ([...]) are optional. This reveals that Flink allows you to customize your
-windowing logic in many different ways so that it best fits your needs.
+上面方括号([...])中的命令是可选的。也就是说,Flink 允许你自定义多样化的窗口操作来满足你的需求。
 
 * This will be replaced by the TOC
 {:toc}
 
-## Window Lifecycle
+## 窗口的生命周期
 
-In a nutshell, a window is **created** as soon as the first element that should belong to this window arrives, and the
-window is **completely removed** when the time (event or processing time) passes its end timestamp plus the user-specified
-`allowed lateness` (see [Allowed Lateness](#allowed-lateness)). Flink guarantees removal only for time-based
-windows and not for other types, *e.g.* global windows (see [Window Assigners](#window-assigners)). For example, with an
-event-time-based windowing strategy that creates non-overlapping (or tumbling) windows every 5 minutes and has an allowed
-lateness of 1 min, Flink will create a new window for the interval between `12:00` and `12:05` when the first element with
-a timestamp that falls into this interval arrives, and it will remove it when the watermark passes the `12:06`
-timestamp.
+简单来说,一个窗口在第一个属于它的元素到达时就会被**创建**,然后在时间(event 或 processing time)
+超过窗口的“结束时间戳 + 用户定义的 `allowed lateness` (详见 [Allowed Lateness](#allowed-lateness))”时
+被**完全删除**。Flink 仅保证删除基于时间的窗口,其他类型的窗口不做保证,
+比如全局窗口(详见[Window Assigners](#window-assigners))。
+例如,对于一个基于event time且范围互不重合(滚动)的窗口策略,
+如果窗口设置的时长为五分钟、可容忍的迟到时间(allowed lateness)为1分钟,
+那么第一个元素落入 `12:00` 至 `12:05` 这个区间时, Flink就会为这个区间创建一个新的窗口。
+当watermark越过 `12:06` 时,这个窗口将被摧毁。
 
-In addition, each window will have a `Trigger` (see [Triggers](#triggers)) and a function (`ProcessWindowFunction`, `ReduceFunction`,
-or `AggregateFunction`) (see [Window Functions](#window-functions)) attached to it. The function will contain the computation to
-be applied to the contents of the window, while the `Trigger` specifies the conditions under which the window is
-considered ready for the function to be applied. A triggering policy might be something like "when the number of elements
-in the window is more than 4", or "when the watermark passes the end of the window". A trigger can also decide to
-purge a window's contents any time between its creation and removal. Purging in this case only refers to the elements
-in the window, and *not* the window metadata. This means that new data can still be added to that window.
+另外,每个窗口会设置自己的 `Trigger` (详见 [Triggers](#triggers))和function 
+(`ProcessWindowFunction`、`ReduceFunction`、或 `AggregateFunction`,
+详见 [Window Functions](#window-functions))。该 function 决定如何计算窗口中的内容,
+而 `Trigger` 决定何时窗口中的数据可以被 function 计算。
+Trigger 的触发(fire)条件可能是“当窗口中有多于4条数据”或“当 watermark 越过窗口的结束时间”等。
+Trigger 还可以在 window 被创建后、删除前的这段时间内定义何时清理(purge)窗口中的数据。
+这里的数据仅指窗口内的元素,不包括窗口的 meta data。也就是说,窗口在 purge 后仍然可以加入新的数据。
 
-Apart from the above, you can specify an `Evictor` (see [Evictors](#evictors)) which will be able to remove
-elements from the window after the trigger fires and before and/or after the function is applied.
+除此之外,你也可以指定一个 `Evictor` (详见 [Evictors](#evictors)),在 trigger 触发前后删除数据。

Review comment:
       ```suggestion
   除此之外,你也可以指定一个 `Evictor` (详见 [Evictors](#evictors)),在 trigger 触发之后,Evictor 可以在窗口函数的前后删除数据。
   ```

##########
File path: docs/dev/stream/operators/windows.zh.md
##########
@@ -23,137 +23,131 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-Windows are at the heart of processing infinite streams. Windows split the stream into "buckets" of finite size,
-over which we can apply computations. This document focuses on how windowing is performed in Flink and how the
-programmer can benefit to the maximum from its offered functionality.
+窗口(Window)是处理无界流的关键所在。窗口可以将数据流装入大小有限的“桶”中,再对每个“桶”加以处理。
+本文的重心将放在Flink如何进行窗口操作以及开发者如何尽可能地利用 Flink 所提供的功能。
 
-The general structure of a windowed Flink program is presented below. The first snippet refers to *keyed* streams,
-while the second to *non-keyed* ones. As one can see, the only difference is the `keyBy(...)` call for the keyed streams
-and the `window(...)` which becomes `windowAll(...)` for non-keyed streams. This is also going to serve as a roadmap
-for the rest of the page.
+下面展示了 Flink 窗口在 *keyed* streams 和 *non-keyed* streams 上使用的基本结构。
+我们可以看到,这两者唯一的区别仅在于:keyed streams 要调用  `keyBy(...)`后再调用 `window(...)` ,
+而 non-keyed streams 只用直接调用 `windowAll(...)`。留意这个区别,它能帮我们更好地理解后面的内容。
 
 **Keyed Windows**
 
     stream
-           .keyBy(...)               <-  keyed versus non-keyed windows
-           .window(...)              <-  required: "assigner"
-          [.trigger(...)]            <-  optional: "trigger" (else default trigger)
-          [.evictor(...)]            <-  optional: "evictor" (else no evictor)
-          [.allowedLateness(...)]    <-  optional: "lateness" (else zero)
-          [.sideOutputLateData(...)] <-  optional: "output tag" (else no side output for late data)
-           .reduce/aggregate/fold/apply()      <-  required: "function"
-          [.getSideOutput(...)]      <-  optional: "output tag"
+           .keyBy(...)               <-  仅 keyed 窗口需要
+           .window(...)              <-  必填项:"assigner"
+          [.trigger(...)]            <-  可选项:"trigger" (省略则使用默认 trigger)
+          [.evictor(...)]            <-  可选项:"evictor" (省略则不使用 evictor)
+          [.allowedLateness(...)]    <-  可选项:"lateness" (省略则为 0)
+          [.sideOutputLateData(...)] <-  可选项:"output tag" (省略则不对迟到数据使用side output)
+           .reduce/aggregate/fold/apply()      <-  必填项:"function"
+          [.getSideOutput(...)]      <-  可选项:"output tag"
 
 **Non-Keyed Windows**
 
     stream
-           .windowAll(...)           <-  required: "assigner"
-          [.trigger(...)]            <-  optional: "trigger" (else default trigger)
-          [.evictor(...)]            <-  optional: "evictor" (else no evictor)
-          [.allowedLateness(...)]    <-  optional: "lateness" (else zero)
-          [.sideOutputLateData(...)] <-  optional: "output tag" (else no side output for late data)
-           .reduce/aggregate/fold/apply()      <-  required: "function"
-          [.getSideOutput(...)]      <-  optional: "output tag"
+           .windowAll(...)           <-  必填项:"assigner"
+          [.trigger(...)]            <-  可选项:"trigger" (else default trigger)
+          [.evictor(...)]            <-  可选项:"evictor" (else no evictor)
+          [.allowedLateness(...)]    <-  可选项:"lateness" (else zero)
+          [.sideOutputLateData(...)] <-  可选项:"output tag" (else no side output for late data)
+           .reduce/aggregate/fold/apply()      <-  必填项:"function"
+          [.getSideOutput(...)]      <-  可选项:"output tag"
 
-In the above, the commands in square brackets ([...]) are optional. This reveals that Flink allows you to customize your
-windowing logic in many different ways so that it best fits your needs.
+上面方括号([...])中的命令是可选的。也就是说,Flink 允许你自定义多样化的窗口操作来满足你的需求。
 
 * This will be replaced by the TOC
 {:toc}
 
-## Window Lifecycle
+## 窗口的生命周期
 
-In a nutshell, a window is **created** as soon as the first element that should belong to this window arrives, and the
-window is **completely removed** when the time (event or processing time) passes its end timestamp plus the user-specified
-`allowed lateness` (see [Allowed Lateness](#allowed-lateness)). Flink guarantees removal only for time-based
-windows and not for other types, *e.g.* global windows (see [Window Assigners](#window-assigners)). For example, with an
-event-time-based windowing strategy that creates non-overlapping (or tumbling) windows every 5 minutes and has an allowed
-lateness of 1 min, Flink will create a new window for the interval between `12:00` and `12:05` when the first element with
-a timestamp that falls into this interval arrives, and it will remove it when the watermark passes the `12:06`
-timestamp.
+简单来说,一个窗口在第一个属于它的元素到达时就会被**创建**,然后在时间(event 或 processing time)
+超过窗口的“结束时间戳 + 用户定义的 `allowed lateness` (详见 [Allowed Lateness](#allowed-lateness))”时
+被**完全删除**。Flink 仅保证删除基于时间的窗口,其他类型的窗口不做保证,
+比如全局窗口(详见[Window Assigners](#window-assigners))。
+例如,对于一个基于event time且范围互不重合(滚动)的窗口策略,
+如果窗口设置的时长为五分钟、可容忍的迟到时间(allowed lateness)为1分钟,
+那么第一个元素落入 `12:00` 至 `12:05` 这个区间时, Flink就会为这个区间创建一个新的窗口。
+当watermark越过 `12:06` 时,这个窗口将被摧毁。
 
-In addition, each window will have a `Trigger` (see [Triggers](#triggers)) and a function (`ProcessWindowFunction`, `ReduceFunction`,
-or `AggregateFunction`) (see [Window Functions](#window-functions)) attached to it. The function will contain the computation to
-be applied to the contents of the window, while the `Trigger` specifies the conditions under which the window is
-considered ready for the function to be applied. A triggering policy might be something like "when the number of elements
-in the window is more than 4", or "when the watermark passes the end of the window". A trigger can also decide to
-purge a window's contents any time between its creation and removal. Purging in this case only refers to the elements
-in the window, and *not* the window metadata. This means that new data can still be added to that window.
+另外,每个窗口会设置自己的 `Trigger` (详见 [Triggers](#triggers))和function 
+(`ProcessWindowFunction`、`ReduceFunction`、或 `AggregateFunction`,
+详见 [Window Functions](#window-functions))。该 function 决定如何计算窗口中的内容,
+而 `Trigger` 决定何时窗口中的数据可以被 function 计算。
+Trigger 的触发(fire)条件可能是“当窗口中有多于4条数据”或“当 watermark 越过窗口的结束时间”等。
+Trigger 还可以在 window 被创建后、删除前的这段时间内定义何时清理(purge)窗口中的数据。
+这里的数据仅指窗口内的元素,不包括窗口的 meta data。也就是说,窗口在 purge 后仍然可以加入新的数据。
 
-Apart from the above, you can specify an `Evictor` (see [Evictors](#evictors)) which will be able to remove
-elements from the window after the trigger fires and before and/or after the function is applied.
+除此之外,你也可以指定一个 `Evictor` (详见 [Evictors](#evictors)),在 trigger 触发前后删除数据。
 
-In the following we go into more detail for each of the components above. We start with the required parts in the above
-snippet (see [Keyed vs Non-Keyed Windows](#keyed-vs-non-keyed-windows), [Window Assigner](#window-assigner), and
-[Window Function](#window-function)) before moving to the optional ones.
+接下来我们会更详细地介绍上面提到的内容。开头的例子中有必填项和可选项。
+我们先从必填项开始(详见 [Keyed vs Non-Keyed Windows](#keyed-vs-non-keyed-windows)、
+[Window Assigner](#window-assigner)、[Window Function](#window-function))。
 
-## Keyed vs Non-Keyed Windows
+## Keyed 和 Non-Keyed Windows
 
-The first thing to specify is whether your stream should be keyed or not. This has to be done before defining the window.
-Using the `keyBy(...)` will split your infinite stream into logical keyed streams. If `keyBy(...)` is not called, your
-stream is not keyed.
+首先必须要在定义窗口前确定的是你的 stream 是 keyed 还是 non-keyed。
+`keyBy(...)` 会将你的无界 stream 分割为逻辑上的 keyed stream。
+如果 `keyBy(...)` 没有被调用,你的 stream 就不是 keyed。
 
-In the case of keyed streams, any attribute of your incoming events can be used as a key
-(more details [here]({% link dev/stream/state/state.zh.md %}#keyed-datastream)). Having a keyed stream will
-allow your windowed computation to be performed in parallel by multiple tasks, as each logical keyed stream can be processed
-independently from the rest. All elements referring to the same key will be sent to the same parallel task.
+对于 keyed stream,其中数据的任何属性都可以作为 key
+(详见[此处here]({% link dev/stream/state/state.zh.md %}#keyed-datastream))。
+使用 keyed stream 允许你的窗口计算由多个 task 并行,因为每个逻辑上的 keyed stream 都可以被单独处理。
+属于同一个 key 的元素会被发送到同一个 task。
 
-In case of non-keyed streams, your original stream will not be split into multiple logical streams and all the windowing logic
-will be performed by a single task, *i.e.* with parallelism of 1.
+对于 non-keyed stream,你原始的 stream 不会被分割为多个逻辑上的 stream,
+所以所有的窗口计算会被同一个 task 完成,也就是 parallelism 为 1。
 
 ## Window Assigners
 
-After specifying whether your stream is keyed or not, the next step is to define a *window assigner*.
-The window assigner defines how elements are assigned to windows. This is done by specifying the `WindowAssigner`
-of your choice in the `window(...)` (for *keyed* streams) or the `windowAll()` (for *non-keyed* streams) call.
+指定了你的 stream 是否为 keyed 之后,下一步就是定义 *window assigner*。
 
-A `WindowAssigner` is responsible for assigning each incoming element to one or more windows. Flink comes
-with pre-defined window assigners for the most common use cases, namely *tumbling windows*,
-*sliding windows*, *session windows* and *global windows*. You can also implement a custom window assigner by
-extending the `WindowAssigner` class. All built-in window assigners (except the global
-windows) assign elements to windows based on time, which can either be processing time or event
-time. Please take a look at our section on [event time]({% link dev/event_time.zh.md %}) to learn
-about the difference between processing time and event time and how timestamps and watermarks are generated.
+Window assigner 定义了 stream 中的元素如何被分发到各个窗口。
+你可以在 `window(...)`(用于 *keyed* streams)或`windowAll(...)`
+(用于 non-keyed streams)中指定一个 `WindowAssigner`。
+`WindowAssigner`负责将 stream 中的每个数据分发到一个或多个窗口中。
+Flink 为最常用的情况提供了一些定义好的 window assigner,也就是  *tumbling windows*、
+*sliding windows*、 *session windows* 和 *global windows*。
+你也可以继承 `WindowAssigner` 类来实现自定义的 window assigner。
+所有内置的 window assigner(除了 global window)都是基于时间分发数据的,processing 或 event time 均可。
+请阅读我们对于 [event time]({% link dev/event_time.zh.md %}) 的介绍来了解这两者的区别,
+以及 timestamp 和 watermark 是如何产生的。
 
-Time-based windows have a *start timestamp* (inclusive) and an *end timestamp* (exclusive)
-that together describe the size of the window. In code, Flink uses `TimeWindow` when working with
-time-based windows which has methods for querying the start- and end-timestamp and also an
-additional method `maxTimestamp()` that returns the largest allowed timestamp for a given windows.
+基于时间的窗口用 *start timestamp*(包含)和 *end timestamp*(不包含)描述窗口的大小。
+在源代码中,Flink处理基于时间的窗口使用的是 `TimeWindow`,

Review comment:
       ```suggestion
   在代码中,Flink处理基于时间的窗口使用的是 `TimeWindow`,
   ```

##########
File path: docs/dev/stream/operators/windows.zh.md
##########
@@ -730,26 +701,24 @@ class MyProcessWindowFunction extends ProcessWindowFunction[(String, Long), Stri
 </div>
 </div>
 
-The example shows a `ProcessWindowFunction` that counts the elements in a window. In addition, the window function adds information about the window to the output.
+上例使用 `ProcessWindowFunction` 对窗口中的元素计数,并且将窗口本身的信息一同输出。
 
-<span class="label label-danger">Attention</span> Note that using `ProcessWindowFunction` for simple aggregates such as count is quite inefficient. The next section shows how a `ReduceFunction` or `AggregateFunction` can be combined with a `ProcessWindowFunction` to get both incremental aggregation and the added information of a `ProcessWindowFunction`.
+<span class="label label-danger">Attention</span> 注意,
+使用`ProcessWindowFunction` 完成简单的聚合任务是非常低效的。
+下一章会说明如何将`ReduceFunction` 或 `AggregateFunction` 与 `ProcessWindowFunction` 合并成既能
+增量聚合又能获得窗口额外信息的窗口函数。
 
-### ProcessWindowFunction with Incremental Aggregation
+### 增量聚合的 ProcessWindowFunction
 
-A `ProcessWindowFunction` can be combined with either a `ReduceFunction`, or an `AggregateFunction` to
-incrementally aggregate elements as they arrive in the window.
-When the window is closed, the `ProcessWindowFunction` will be provided with the aggregated result.
-This allows it to incrementally compute windows while having access to the
-additional window meta information of the `ProcessWindowFunction`.
+`ProcessWindowFunction` 可以与 `ReduceFunction` 或 `AggregateFunction` 合并,

Review comment:
       ```suggestion
   `ProcessWindowFunction` 可以与 `ReduceFunction` 或 `AggregateFunction` 搭配使用,
   ```

##########
File path: docs/dev/stream/operators/windows.zh.md
##########
@@ -550,17 +523,16 @@ input
 </div>
 </div>
 
-The above example computes the average of the second field of the elements in the window.
+上例计算了窗口内所有元素第二个属性的平均值。
 
 ### ProcessWindowFunction
 
-A ProcessWindowFunction gets an Iterable containing all the elements of the window, and a Context
-object with access to time and state information, which enables it to provide more flexibility than
-other window functions. This comes at the cost of performance and resource consumption, because
-elements cannot be incrementally aggregated but instead need to be buffered internally until the
-window is considered ready for processing.
+ProcessWindowFunction 有能获取窗口内所有元素的Iterable,

Review comment:
       ```suggestion
   ProcessWindowFunction 有能获取包含窗口内所有元素的 Iterable,
   ```

##########
File path: docs/dev/stream/operators/windows.zh.md
##########
@@ -491,10 +464,10 @@ An `AggregateFunction` can be defined and used like this:
  */
 private static class AverageAggregate
     implements AggregateFunction<Tuple2<String, Long>, Tuple2<Long, Long>, Double> {
-  @Override
-  public Tuple2<Long, Long> createAccumulator() {
+    @Override

Review comment:
       some extra spaces

##########
File path: docs/dev/stream/operators/windows.zh.md
##########
@@ -23,137 +23,131 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-Windows are at the heart of processing infinite streams. Windows split the stream into "buckets" of finite size,
-over which we can apply computations. This document focuses on how windowing is performed in Flink and how the
-programmer can benefit to the maximum from its offered functionality.
+窗口(Window)是处理无界流的关键所在。窗口可以将数据流装入大小有限的“桶”中,再对每个“桶”加以处理。
+本文的重心将放在Flink如何进行窗口操作以及开发者如何尽可能地利用 Flink 所提供的功能。
 
-The general structure of a windowed Flink program is presented below. The first snippet refers to *keyed* streams,
-while the second to *non-keyed* ones. As one can see, the only difference is the `keyBy(...)` call for the keyed streams
-and the `window(...)` which becomes `windowAll(...)` for non-keyed streams. This is also going to serve as a roadmap
-for the rest of the page.
+下面展示了 Flink 窗口在 *keyed* streams 和 *non-keyed* streams 上使用的基本结构。
+我们可以看到,这两者唯一的区别仅在于:keyed streams 要调用  `keyBy(...)`后再调用 `window(...)` ,
+而 non-keyed streams 只用直接调用 `windowAll(...)`。留意这个区别,它能帮我们更好地理解后面的内容。
 
 **Keyed Windows**
 
     stream
-           .keyBy(...)               <-  keyed versus non-keyed windows
-           .window(...)              <-  required: "assigner"
-          [.trigger(...)]            <-  optional: "trigger" (else default trigger)
-          [.evictor(...)]            <-  optional: "evictor" (else no evictor)
-          [.allowedLateness(...)]    <-  optional: "lateness" (else zero)
-          [.sideOutputLateData(...)] <-  optional: "output tag" (else no side output for late data)
-           .reduce/aggregate/fold/apply()      <-  required: "function"
-          [.getSideOutput(...)]      <-  optional: "output tag"
+           .keyBy(...)               <-  仅 keyed 窗口需要
+           .window(...)              <-  必填项:"assigner"
+          [.trigger(...)]            <-  可选项:"trigger" (省略则使用默认 trigger)
+          [.evictor(...)]            <-  可选项:"evictor" (省略则不使用 evictor)
+          [.allowedLateness(...)]    <-  可选项:"lateness" (省略则为 0)
+          [.sideOutputLateData(...)] <-  可选项:"output tag" (省略则不对迟到数据使用side output)
+           .reduce/aggregate/fold/apply()      <-  必填项:"function"
+          [.getSideOutput(...)]      <-  可选项:"output tag"
 
 **Non-Keyed Windows**
 
     stream
-           .windowAll(...)           <-  required: "assigner"
-          [.trigger(...)]            <-  optional: "trigger" (else default trigger)
-          [.evictor(...)]            <-  optional: "evictor" (else no evictor)
-          [.allowedLateness(...)]    <-  optional: "lateness" (else zero)
-          [.sideOutputLateData(...)] <-  optional: "output tag" (else no side output for late data)
-           .reduce/aggregate/fold/apply()      <-  required: "function"
-          [.getSideOutput(...)]      <-  optional: "output tag"
+           .windowAll(...)           <-  必填项:"assigner"
+          [.trigger(...)]            <-  可选项:"trigger" (else default trigger)
+          [.evictor(...)]            <-  可选项:"evictor" (else no evictor)
+          [.allowedLateness(...)]    <-  可选项:"lateness" (else zero)
+          [.sideOutputLateData(...)] <-  可选项:"output tag" (else no side output for late data)
+           .reduce/aggregate/fold/apply()      <-  必填项:"function"
+          [.getSideOutput(...)]      <-  可选项:"output tag"
 
-In the above, the commands in square brackets ([...]) are optional. This reveals that Flink allows you to customize your
-windowing logic in many different ways so that it best fits your needs.
+上面方括号([...])中的命令是可选的。也就是说,Flink 允许你自定义多样化的窗口操作来满足你的需求。
 
 * This will be replaced by the TOC
 {:toc}
 
-## Window Lifecycle
+## 窗口的生命周期
 
-In a nutshell, a window is **created** as soon as the first element that should belong to this window arrives, and the
-window is **completely removed** when the time (event or processing time) passes its end timestamp plus the user-specified
-`allowed lateness` (see [Allowed Lateness](#allowed-lateness)). Flink guarantees removal only for time-based
-windows and not for other types, *e.g.* global windows (see [Window Assigners](#window-assigners)). For example, with an
-event-time-based windowing strategy that creates non-overlapping (or tumbling) windows every 5 minutes and has an allowed
-lateness of 1 min, Flink will create a new window for the interval between `12:00` and `12:05` when the first element with
-a timestamp that falls into this interval arrives, and it will remove it when the watermark passes the `12:06`
-timestamp.
+简单来说,一个窗口在第一个属于它的元素到达时就会被**创建**,然后在时间(event 或 processing time)
+超过窗口的“结束时间戳 + 用户定义的 `allowed lateness` (详见 [Allowed Lateness](#allowed-lateness))”时
+被**完全删除**。Flink 仅保证删除基于时间的窗口,其他类型的窗口不做保证,
+比如全局窗口(详见[Window Assigners](#window-assigners))。
+例如,对于一个基于event time且范围互不重合(滚动)的窗口策略,
+如果窗口设置的时长为五分钟、可容忍的迟到时间(allowed lateness)为1分钟,
+那么第一个元素落入 `12:00` 至 `12:05` 这个区间时, Flink就会为这个区间创建一个新的窗口。
+当watermark越过 `12:06` 时,这个窗口将被摧毁。
 
-In addition, each window will have a `Trigger` (see [Triggers](#triggers)) and a function (`ProcessWindowFunction`, `ReduceFunction`,
-or `AggregateFunction`) (see [Window Functions](#window-functions)) attached to it. The function will contain the computation to
-be applied to the contents of the window, while the `Trigger` specifies the conditions under which the window is
-considered ready for the function to be applied. A triggering policy might be something like "when the number of elements
-in the window is more than 4", or "when the watermark passes the end of the window". A trigger can also decide to
-purge a window's contents any time between its creation and removal. Purging in this case only refers to the elements
-in the window, and *not* the window metadata. This means that new data can still be added to that window.
+另外,每个窗口会设置自己的 `Trigger` (详见 [Triggers](#triggers))和function 
+(`ProcessWindowFunction`、`ReduceFunction`、或 `AggregateFunction`,
+详见 [Window Functions](#window-functions))。该 function 决定如何计算窗口中的内容,
+而 `Trigger` 决定何时窗口中的数据可以被 function 计算。
+Trigger 的触发(fire)条件可能是“当窗口中有多于4条数据”或“当 watermark 越过窗口的结束时间”等。
+Trigger 还可以在 window 被创建后、删除前的这段时间内定义何时清理(purge)窗口中的数据。
+这里的数据仅指窗口内的元素,不包括窗口的 meta data。也就是说,窗口在 purge 后仍然可以加入新的数据。
 
-Apart from the above, you can specify an `Evictor` (see [Evictors](#evictors)) which will be able to remove
-elements from the window after the trigger fires and before and/or after the function is applied.
+除此之外,你也可以指定一个 `Evictor` (详见 [Evictors](#evictors)),在 trigger 触发前后删除数据。
 
-In the following we go into more detail for each of the components above. We start with the required parts in the above
-snippet (see [Keyed vs Non-Keyed Windows](#keyed-vs-non-keyed-windows), [Window Assigner](#window-assigner), and
-[Window Function](#window-function)) before moving to the optional ones.
+接下来我们会更详细地介绍上面提到的内容。开头的例子中有必填项和可选项。
+我们先从必填项开始(详见 [Keyed vs Non-Keyed Windows](#keyed-vs-non-keyed-windows)、
+[Window Assigner](#window-assigner)、[Window Function](#window-function))。
 
-## Keyed vs Non-Keyed Windows
+## Keyed 和 Non-Keyed Windows
 
-The first thing to specify is whether your stream should be keyed or not. This has to be done before defining the window.
-Using the `keyBy(...)` will split your infinite stream into logical keyed streams. If `keyBy(...)` is not called, your
-stream is not keyed.
+首先必须要在定义窗口前确定的是你的 stream 是 keyed 还是 non-keyed。
+`keyBy(...)` 会将你的无界 stream 分割为逻辑上的 keyed stream。
+如果 `keyBy(...)` 没有被调用,你的 stream 就不是 keyed。
 
-In the case of keyed streams, any attribute of your incoming events can be used as a key
-(more details [here]({% link dev/stream/state/state.zh.md %}#keyed-datastream)). Having a keyed stream will
-allow your windowed computation to be performed in parallel by multiple tasks, as each logical keyed stream can be processed
-independently from the rest. All elements referring to the same key will be sent to the same parallel task.
+对于 keyed stream,其中数据的任何属性都可以作为 key
+(详见[此处here]({% link dev/stream/state/state.zh.md %}#keyed-datastream))。
+使用 keyed stream 允许你的窗口计算由多个 task 并行,因为每个逻辑上的 keyed stream 都可以被单独处理。
+属于同一个 key 的元素会被发送到同一个 task。
 
-In case of non-keyed streams, your original stream will not be split into multiple logical streams and all the windowing logic
-will be performed by a single task, *i.e.* with parallelism of 1.
+对于 non-keyed stream,你原始的 stream 不会被分割为多个逻辑上的 stream,
+所以所有的窗口计算会被同一个 task 完成,也就是 parallelism 为 1。
 
 ## Window Assigners
 
-After specifying whether your stream is keyed or not, the next step is to define a *window assigner*.
-The window assigner defines how elements are assigned to windows. This is done by specifying the `WindowAssigner`
-of your choice in the `window(...)` (for *keyed* streams) or the `windowAll()` (for *non-keyed* streams) call.
+指定了你的 stream 是否为 keyed 之后,下一步就是定义 *window assigner*。
 
-A `WindowAssigner` is responsible for assigning each incoming element to one or more windows. Flink comes
-with pre-defined window assigners for the most common use cases, namely *tumbling windows*,
-*sliding windows*, *session windows* and *global windows*. You can also implement a custom window assigner by
-extending the `WindowAssigner` class. All built-in window assigners (except the global
-windows) assign elements to windows based on time, which can either be processing time or event
-time. Please take a look at our section on [event time]({% link dev/event_time.zh.md %}) to learn
-about the difference between processing time and event time and how timestamps and watermarks are generated.
+Window assigner 定义了 stream 中的元素如何被分发到各个窗口。
+你可以在 `window(...)`(用于 *keyed* streams)或`windowAll(...)`
+(用于 non-keyed streams)中指定一个 `WindowAssigner`。
+`WindowAssigner`负责将 stream 中的每个数据分发到一个或多个窗口中。
+Flink 为最常用的情况提供了一些定义好的 window assigner,也就是  *tumbling windows*、
+*sliding windows*、 *session windows* 和 *global windows*。
+你也可以继承 `WindowAssigner` 类来实现自定义的 window assigner。
+所有内置的 window assigner(除了 global window)都是基于时间分发数据的,processing 或 event time 均可。
+请阅读我们对于 [event time]({% link dev/event_time.zh.md %}) 的介绍来了解这两者的区别,
+以及 timestamp 和 watermark 是如何产生的。
 
-Time-based windows have a *start timestamp* (inclusive) and an *end timestamp* (exclusive)
-that together describe the size of the window. In code, Flink uses `TimeWindow` when working with
-time-based windows which has methods for querying the start- and end-timestamp and also an
-additional method `maxTimestamp()` that returns the largest allowed timestamp for a given windows.
+基于时间的窗口用 *start timestamp*(包含)和 *end timestamp*(不包含)描述窗口的大小。
+在源代码中,Flink处理基于时间的窗口使用的是 `TimeWindow`,
+它有查询开始和结束timestamp以及返回窗口所能储存的最大 timestamp 的方法 `maxTimestamp()`。

Review comment:
       Could you translate this sentence more clearly?Besides,please mind the white space between English and Chinese

##########
File path: docs/dev/stream/operators/windows.zh.md
##########
@@ -327,65 +312,63 @@ input
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
 val input: DataStream[T] = ...
-
-// event-time session windows with static gap
+// 设置了固定间隔的 event-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(EventTimeSessionWindows.withGap(Time.minutes(10)))
     .<windowed transformation>(<window function>)
 
-// event-time session windows with dynamic gap
+// 设置了动态间隔的 event-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(EventTimeSessionWindows.withDynamicGap(new SessionWindowTimeGapExtractor[String] {
       override def extract(element: String): Long = {
-        // determine and return session gap
+        // 决定并返回会话间隔
       }
     }))
     .<windowed transformation>(<window function>)
 
-// processing-time session windows with static gap
+// 设置了固定间隔的 processing-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(ProcessingTimeSessionWindows.withGap(Time.minutes(10)))
     .<windowed transformation>(<window function>)
 
-
-// processing-time session windows with dynamic gap
+// 设置了动态间隔的 processing-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(DynamicProcessingTimeSessionWindows.withDynamicGap(new SessionWindowTimeGapExtractor[String] {
       override def extract(element: String): Long = {
-        // determine and return session gap
+        // 决定并返回会话间隔
       }
     }))
     .<windowed transformation>(<window function>)
 {% endhighlight %}
 </div>
 </div>
 
-Static gaps can be specified by using one of `Time.milliseconds(x)`, `Time.seconds(x)`,
-`Time.minutes(x)`, and so on.
+固定间隔可以使用 `Time.milliseconds(x)`、`Time.seconds(x)`、`Time.minutes(x)` 等来设置。
+
+动态间隔可以通过实现 `SessionWindowTimeGapExtractor` 接口来指定。
 
-Dynamic gaps are specified by implementing the `SessionWindowTimeGapExtractor` interface.
+需要的是,因为会话窗口并没有固定的开始或技术时间,他们与滑动和滚动窗口的计算方法不同。
+在 Flink 内部,会话窗口的算子会为每一条数据创建一个窗口,长度为定义好的间隔,然后将重叠的窗口合并。
 
-<span class="label label-danger">Attention</span> Since session windows do not have a fixed start and end,
-they are  evaluated differently than tumbling and sliding windows. Internally, a session window operator
-creates a new window for each arriving record and merges windows together if they are closer to each other
-than the defined gap.
-In order to be mergeable, a session window operator requires a merging [Trigger](#triggers) and a merging
-[Window Function](#window-functions), such as `ReduceFunction`, `AggregateFunction`, or `ProcessWindowFunction`
+<span class="label label-danger">Attention</span> 因为会话窗口并没有固定的开始或技术时间,

Review comment:
       ```suggestion
   <span class="label label-danger">Attention</span> 因为会话窗口并没有固定的开始或结束时间,
   ```

##########
File path: docs/dev/stream/operators/windows.zh.md
##########
@@ -327,65 +312,63 @@ input
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
 val input: DataStream[T] = ...
-
-// event-time session windows with static gap
+// 设置了固定间隔的 event-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(EventTimeSessionWindows.withGap(Time.minutes(10)))
     .<windowed transformation>(<window function>)
 
-// event-time session windows with dynamic gap
+// 设置了动态间隔的 event-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(EventTimeSessionWindows.withDynamicGap(new SessionWindowTimeGapExtractor[String] {
       override def extract(element: String): Long = {
-        // determine and return session gap
+        // 决定并返回会话间隔
       }
     }))
     .<windowed transformation>(<window function>)
 
-// processing-time session windows with static gap
+// 设置了固定间隔的 processing-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(ProcessingTimeSessionWindows.withGap(Time.minutes(10)))
     .<windowed transformation>(<window function>)
 
-
-// processing-time session windows with dynamic gap
+// 设置了动态间隔的 processing-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(DynamicProcessingTimeSessionWindows.withDynamicGap(new SessionWindowTimeGapExtractor[String] {
       override def extract(element: String): Long = {
-        // determine and return session gap
+        // 决定并返回会话间隔
       }
     }))
     .<windowed transformation>(<window function>)
 {% endhighlight %}
 </div>
 </div>
 
-Static gaps can be specified by using one of `Time.milliseconds(x)`, `Time.seconds(x)`,
-`Time.minutes(x)`, and so on.
+固定间隔可以使用 `Time.milliseconds(x)`、`Time.seconds(x)`、`Time.minutes(x)` 等来设置。
+
+动态间隔可以通过实现 `SessionWindowTimeGapExtractor` 接口来指定。
 
-Dynamic gaps are specified by implementing the `SessionWindowTimeGapExtractor` interface.
+需要的是,因为会话窗口并没有固定的开始或技术时间,他们与滑动和滚动窗口的计算方法不同。
+在 Flink 内部,会话窗口的算子会为每一条数据创建一个窗口,长度为定义好的间隔,然后将重叠的窗口合并。
 
-<span class="label label-danger">Attention</span> Since session windows do not have a fixed start and end,
-they are  evaluated differently than tumbling and sliding windows. Internally, a session window operator
-creates a new window for each arriving record and merges windows together if they are closer to each other
-than the defined gap.
-In order to be mergeable, a session window operator requires a merging [Trigger](#triggers) and a merging
-[Window Function](#window-functions), such as `ReduceFunction`, `AggregateFunction`, or `ProcessWindowFunction`
+<span class="label label-danger">Attention</span> 因为会话窗口并没有固定的开始或技术时间,
+他们与滑动和滚动窗口的计算方法不同。在 Flink 内部,会话窗口的算子会为每一条数据创建一个窗口,
+长度为定义好的间隔,然后将重叠的窗口合并。

Review comment:
       ```suggestion
   然后将相邻不超过设置的间隔窗口进行合并。
   ```

##########
File path: docs/dev/stream/operators/windows.zh.md
##########
@@ -23,137 +23,131 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-Windows are at the heart of processing infinite streams. Windows split the stream into "buckets" of finite size,
-over which we can apply computations. This document focuses on how windowing is performed in Flink and how the
-programmer can benefit to the maximum from its offered functionality.
+窗口(Window)是处理无界流的关键所在。窗口可以将数据流装入大小有限的“桶”中,再对每个“桶”加以处理。
+本文的重心将放在Flink如何进行窗口操作以及开发者如何尽可能地利用 Flink 所提供的功能。
 
-The general structure of a windowed Flink program is presented below. The first snippet refers to *keyed* streams,
-while the second to *non-keyed* ones. As one can see, the only difference is the `keyBy(...)` call for the keyed streams
-and the `window(...)` which becomes `windowAll(...)` for non-keyed streams. This is also going to serve as a roadmap
-for the rest of the page.
+下面展示了 Flink 窗口在 *keyed* streams 和 *non-keyed* streams 上使用的基本结构。
+我们可以看到,这两者唯一的区别仅在于:keyed streams 要调用  `keyBy(...)`后再调用 `window(...)` ,
+而 non-keyed streams 只用直接调用 `windowAll(...)`。留意这个区别,它能帮我们更好地理解后面的内容。
 
 **Keyed Windows**
 
     stream
-           .keyBy(...)               <-  keyed versus non-keyed windows
-           .window(...)              <-  required: "assigner"
-          [.trigger(...)]            <-  optional: "trigger" (else default trigger)
-          [.evictor(...)]            <-  optional: "evictor" (else no evictor)
-          [.allowedLateness(...)]    <-  optional: "lateness" (else zero)
-          [.sideOutputLateData(...)] <-  optional: "output tag" (else no side output for late data)
-           .reduce/aggregate/fold/apply()      <-  required: "function"
-          [.getSideOutput(...)]      <-  optional: "output tag"
+           .keyBy(...)               <-  仅 keyed 窗口需要
+           .window(...)              <-  必填项:"assigner"
+          [.trigger(...)]            <-  可选项:"trigger" (省略则使用默认 trigger)
+          [.evictor(...)]            <-  可选项:"evictor" (省略则不使用 evictor)
+          [.allowedLateness(...)]    <-  可选项:"lateness" (省略则为 0)
+          [.sideOutputLateData(...)] <-  可选项:"output tag" (省略则不对迟到数据使用side output)
+           .reduce/aggregate/fold/apply()      <-  必填项:"function"
+          [.getSideOutput(...)]      <-  可选项:"output tag"
 
 **Non-Keyed Windows**
 
     stream
-           .windowAll(...)           <-  required: "assigner"
-          [.trigger(...)]            <-  optional: "trigger" (else default trigger)
-          [.evictor(...)]            <-  optional: "evictor" (else no evictor)
-          [.allowedLateness(...)]    <-  optional: "lateness" (else zero)
-          [.sideOutputLateData(...)] <-  optional: "output tag" (else no side output for late data)
-           .reduce/aggregate/fold/apply()      <-  required: "function"
-          [.getSideOutput(...)]      <-  optional: "output tag"
+           .windowAll(...)           <-  必填项:"assigner"
+          [.trigger(...)]            <-  可选项:"trigger" (else default trigger)
+          [.evictor(...)]            <-  可选项:"evictor" (else no evictor)
+          [.allowedLateness(...)]    <-  可选项:"lateness" (else zero)
+          [.sideOutputLateData(...)] <-  可选项:"output tag" (else no side output for late data)
+           .reduce/aggregate/fold/apply()      <-  必填项:"function"
+          [.getSideOutput(...)]      <-  可选项:"output tag"
 
-In the above, the commands in square brackets ([...]) are optional. This reveals that Flink allows you to customize your
-windowing logic in many different ways so that it best fits your needs.
+上面方括号([...])中的命令是可选的。也就是说,Flink 允许你自定义多样化的窗口操作来满足你的需求。
 
 * This will be replaced by the TOC
 {:toc}
 
-## Window Lifecycle
+## 窗口的生命周期
 
-In a nutshell, a window is **created** as soon as the first element that should belong to this window arrives, and the
-window is **completely removed** when the time (event or processing time) passes its end timestamp plus the user-specified
-`allowed lateness` (see [Allowed Lateness](#allowed-lateness)). Flink guarantees removal only for time-based
-windows and not for other types, *e.g.* global windows (see [Window Assigners](#window-assigners)). For example, with an
-event-time-based windowing strategy that creates non-overlapping (or tumbling) windows every 5 minutes and has an allowed
-lateness of 1 min, Flink will create a new window for the interval between `12:00` and `12:05` when the first element with
-a timestamp that falls into this interval arrives, and it will remove it when the watermark passes the `12:06`
-timestamp.
+简单来说,一个窗口在第一个属于它的元素到达时就会被**创建**,然后在时间(event 或 processing time)
+超过窗口的“结束时间戳 + 用户定义的 `allowed lateness` (详见 [Allowed Lateness](#allowed-lateness))”时
+被**完全删除**。Flink 仅保证删除基于时间的窗口,其他类型的窗口不做保证,
+比如全局窗口(详见[Window Assigners](#window-assigners))。
+例如,对于一个基于event time且范围互不重合(滚动)的窗口策略,
+如果窗口设置的时长为五分钟、可容忍的迟到时间(allowed lateness)为1分钟,
+那么第一个元素落入 `12:00` 至 `12:05` 这个区间时, Flink就会为这个区间创建一个新的窗口。
+当watermark越过 `12:06` 时,这个窗口将被摧毁。
 
-In addition, each window will have a `Trigger` (see [Triggers](#triggers)) and a function (`ProcessWindowFunction`, `ReduceFunction`,
-or `AggregateFunction`) (see [Window Functions](#window-functions)) attached to it. The function will contain the computation to
-be applied to the contents of the window, while the `Trigger` specifies the conditions under which the window is
-considered ready for the function to be applied. A triggering policy might be something like "when the number of elements
-in the window is more than 4", or "when the watermark passes the end of the window". A trigger can also decide to
-purge a window's contents any time between its creation and removal. Purging in this case only refers to the elements
-in the window, and *not* the window metadata. This means that new data can still be added to that window.
+另外,每个窗口会设置自己的 `Trigger` (详见 [Triggers](#triggers))和function 
+(`ProcessWindowFunction`、`ReduceFunction`、或 `AggregateFunction`,
+详见 [Window Functions](#window-functions))。该 function 决定如何计算窗口中的内容,
+而 `Trigger` 决定何时窗口中的数据可以被 function 计算。
+Trigger 的触发(fire)条件可能是“当窗口中有多于4条数据”或“当 watermark 越过窗口的结束时间”等。
+Trigger 还可以在 window 被创建后、删除前的这段时间内定义何时清理(purge)窗口中的数据。
+这里的数据仅指窗口内的元素,不包括窗口的 meta data。也就是说,窗口在 purge 后仍然可以加入新的数据。
 
-Apart from the above, you can specify an `Evictor` (see [Evictors](#evictors)) which will be able to remove
-elements from the window after the trigger fires and before and/or after the function is applied.
+除此之外,你也可以指定一个 `Evictor` (详见 [Evictors](#evictors)),在 trigger 触发前后删除数据。
 
-In the following we go into more detail for each of the components above. We start with the required parts in the above
-snippet (see [Keyed vs Non-Keyed Windows](#keyed-vs-non-keyed-windows), [Window Assigner](#window-assigner), and
-[Window Function](#window-function)) before moving to the optional ones.
+接下来我们会更详细地介绍上面提到的内容。开头的例子中有必填项和可选项。
+我们先从必填项开始(详见 [Keyed vs Non-Keyed Windows](#keyed-vs-non-keyed-windows)、
+[Window Assigner](#window-assigner)、[Window Function](#window-function))。
 
-## Keyed vs Non-Keyed Windows
+## Keyed 和 Non-Keyed Windows
 
-The first thing to specify is whether your stream should be keyed or not. This has to be done before defining the window.
-Using the `keyBy(...)` will split your infinite stream into logical keyed streams. If `keyBy(...)` is not called, your
-stream is not keyed.
+首先必须要在定义窗口前确定的是你的 stream 是 keyed 还是 non-keyed。
+`keyBy(...)` 会将你的无界 stream 分割为逻辑上的 keyed stream。
+如果 `keyBy(...)` 没有被调用,你的 stream 就不是 keyed。
 
-In the case of keyed streams, any attribute of your incoming events can be used as a key
-(more details [here]({% link dev/stream/state/state.zh.md %}#keyed-datastream)). Having a keyed stream will
-allow your windowed computation to be performed in parallel by multiple tasks, as each logical keyed stream can be processed
-independently from the rest. All elements referring to the same key will be sent to the same parallel task.
+对于 keyed stream,其中数据的任何属性都可以作为 key
+(详见[此处here]({% link dev/stream/state/state.zh.md %}#keyed-datastream))。
+使用 keyed stream 允许你的窗口计算由多个 task 并行,因为每个逻辑上的 keyed stream 都可以被单独处理。
+属于同一个 key 的元素会被发送到同一个 task。
 
-In case of non-keyed streams, your original stream will not be split into multiple logical streams and all the windowing logic
-will be performed by a single task, *i.e.* with parallelism of 1.
+对于 non-keyed stream,你原始的 stream 不会被分割为多个逻辑上的 stream,
+所以所有的窗口计算会被同一个 task 完成,也就是 parallelism 为 1。
 
 ## Window Assigners
 
-After specifying whether your stream is keyed or not, the next step is to define a *window assigner*.
-The window assigner defines how elements are assigned to windows. This is done by specifying the `WindowAssigner`
-of your choice in the `window(...)` (for *keyed* streams) or the `windowAll()` (for *non-keyed* streams) call.
+指定了你的 stream 是否为 keyed 之后,下一步就是定义 *window assigner*。
 
-A `WindowAssigner` is responsible for assigning each incoming element to one or more windows. Flink comes
-with pre-defined window assigners for the most common use cases, namely *tumbling windows*,
-*sliding windows*, *session windows* and *global windows*. You can also implement a custom window assigner by
-extending the `WindowAssigner` class. All built-in window assigners (except the global
-windows) assign elements to windows based on time, which can either be processing time or event
-time. Please take a look at our section on [event time]({% link dev/event_time.zh.md %}) to learn
-about the difference between processing time and event time and how timestamps and watermarks are generated.
+Window assigner 定义了 stream 中的元素如何被分发到各个窗口。
+你可以在 `window(...)`(用于 *keyed* streams)或`windowAll(...)`
+(用于 non-keyed streams)中指定一个 `WindowAssigner`。
+`WindowAssigner`负责将 stream 中的每个数据分发到一个或多个窗口中。
+Flink 为最常用的情况提供了一些定义好的 window assigner,也就是  *tumbling windows*、
+*sliding windows*、 *session windows* 和 *global windows*。
+你也可以继承 `WindowAssigner` 类来实现自定义的 window assigner。
+所有内置的 window assigner(除了 global window)都是基于时间分发数据的,processing 或 event time 均可。

Review comment:
       ```suggestion
   所有内置的 window assigner(除了 global window)都是基于时间分发数据的,processing time 或 event time 均可。
   ```

##########
File path: docs/dev/stream/operators/windows.zh.md
##########
@@ -730,26 +701,24 @@ class MyProcessWindowFunction extends ProcessWindowFunction[(String, Long), Stri
 </div>
 </div>
 
-The example shows a `ProcessWindowFunction` that counts the elements in a window. In addition, the window function adds information about the window to the output.
+上例使用 `ProcessWindowFunction` 对窗口中的元素计数,并且将窗口本身的信息一同输出。
 
-<span class="label label-danger">Attention</span> Note that using `ProcessWindowFunction` for simple aggregates such as count is quite inefficient. The next section shows how a `ReduceFunction` or `AggregateFunction` can be combined with a `ProcessWindowFunction` to get both incremental aggregation and the added information of a `ProcessWindowFunction`.
+<span class="label label-danger">Attention</span> 注意,
+使用`ProcessWindowFunction` 完成简单的聚合任务是非常低效的。
+下一章会说明如何将`ReduceFunction` 或 `AggregateFunction` 与 `ProcessWindowFunction` 合并成既能
+增量聚合又能获得窗口额外信息的窗口函数。
 
-### ProcessWindowFunction with Incremental Aggregation
+### 增量聚合的 ProcessWindowFunction
 
-A `ProcessWindowFunction` can be combined with either a `ReduceFunction`, or an `AggregateFunction` to
-incrementally aggregate elements as they arrive in the window.
-When the window is closed, the `ProcessWindowFunction` will be provided with the aggregated result.
-This allows it to incrementally compute windows while having access to the
-additional window meta information of the `ProcessWindowFunction`.
+`ProcessWindowFunction` 可以与 `ReduceFunction` 或 `AggregateFunction` 合并,
+使其能够在数据到达窗口的时候进行增量聚合。当窗口关闭时,`ProcessWindowFunction` 将会得到聚合的结果。
+这样它就可以增量聚合窗口的元素并且从 ProcessWindowFunction` 中获得窗口的 meta-information。

Review comment:
       ```suggestion
   这样它就可以增量聚合窗口的元素并且从 ProcessWindowFunction` 中获得窗口的元数据。
   ```

##########
File path: docs/dev/stream/operators/windows.zh.md
##########
@@ -327,65 +312,63 @@ input
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
 val input: DataStream[T] = ...
-
-// event-time session windows with static gap
+// 设置了固定间隔的 event-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(EventTimeSessionWindows.withGap(Time.minutes(10)))
     .<windowed transformation>(<window function>)
 
-// event-time session windows with dynamic gap
+// 设置了动态间隔的 event-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(EventTimeSessionWindows.withDynamicGap(new SessionWindowTimeGapExtractor[String] {
       override def extract(element: String): Long = {
-        // determine and return session gap
+        // 决定并返回会话间隔
       }
     }))
     .<windowed transformation>(<window function>)
 
-// processing-time session windows with static gap
+// 设置了固定间隔的 processing-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(ProcessingTimeSessionWindows.withGap(Time.minutes(10)))
     .<windowed transformation>(<window function>)
 
-
-// processing-time session windows with dynamic gap
+// 设置了动态间隔的 processing-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(DynamicProcessingTimeSessionWindows.withDynamicGap(new SessionWindowTimeGapExtractor[String] {
       override def extract(element: String): Long = {
-        // determine and return session gap
+        // 决定并返回会话间隔
       }
     }))
     .<windowed transformation>(<window function>)
 {% endhighlight %}
 </div>
 </div>
 
-Static gaps can be specified by using one of `Time.milliseconds(x)`, `Time.seconds(x)`,
-`Time.minutes(x)`, and so on.
+固定间隔可以使用 `Time.milliseconds(x)`、`Time.seconds(x)`、`Time.minutes(x)` 等来设置。
+
+动态间隔可以通过实现 `SessionWindowTimeGapExtractor` 接口来指定。
 
-Dynamic gaps are specified by implementing the `SessionWindowTimeGapExtractor` interface.
+需要的是,因为会话窗口并没有固定的开始或技术时间,他们与滑动和滚动窗口的计算方法不同。
+在 Flink 内部,会话窗口的算子会为每一条数据创建一个窗口,长度为定义好的间隔,然后将重叠的窗口合并。

Review comment:
       This sentence is probably not here




----------------------------------------------------------------
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] dijkwxyz commented on a change in pull request #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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



##########
File path: docs/dev/stream/operators/windows.zh.md
##########
@@ -327,65 +312,63 @@ input
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
 val input: DataStream[T] = ...
-
-// event-time session windows with static gap
+// 设置了固定间隔的 event-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(EventTimeSessionWindows.withGap(Time.minutes(10)))
     .<windowed transformation>(<window function>)
 
-// event-time session windows with dynamic gap
+// 设置了动态间隔的 event-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(EventTimeSessionWindows.withDynamicGap(new SessionWindowTimeGapExtractor[String] {
       override def extract(element: String): Long = {
-        // determine and return session gap
+        // 决定并返回会话间隔
       }
     }))
     .<windowed transformation>(<window function>)
 
-// processing-time session windows with static gap
+// 设置了固定间隔的 processing-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(ProcessingTimeSessionWindows.withGap(Time.minutes(10)))
     .<windowed transformation>(<window function>)
 
-
-// processing-time session windows with dynamic gap
+// 设置了动态间隔的 processing-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(DynamicProcessingTimeSessionWindows.withDynamicGap(new SessionWindowTimeGapExtractor[String] {
       override def extract(element: String): Long = {
-        // determine and return session gap
+        // 决定并返回会话间隔
       }
     }))
     .<windowed transformation>(<window function>)
 {% endhighlight %}
 </div>
 </div>
 
-Static gaps can be specified by using one of `Time.milliseconds(x)`, `Time.seconds(x)`,
-`Time.minutes(x)`, and so on.
+固定间隔可以使用 `Time.milliseconds(x)`、`Time.seconds(x)`、`Time.minutes(x)` 等来设置。
+
+动态间隔可以通过实现 `SessionWindowTimeGapExtractor` 接口来指定。
 
-Dynamic gaps are specified by implementing the `SessionWindowTimeGapExtractor` interface.
+需要的是,因为会话窗口并没有固定的开始或技术时间,他们与滑动和滚动窗口的计算方法不同。
+在 Flink 内部,会话窗口的算子会为每一条数据创建一个窗口,长度为定义好的间隔,然后将重叠的窗口合并。
 
-<span class="label label-danger">Attention</span> Since session windows do not have a fixed start and end,
-they are  evaluated differently than tumbling and sliding windows. Internally, a session window operator
-creates a new window for each arriving record and merges windows together if they are closer to each other
-than the defined gap.
-In order to be mergeable, a session window operator requires a merging [Trigger](#triggers) and a merging
-[Window Function](#window-functions), such as `ReduceFunction`, `AggregateFunction`, or `ProcessWindowFunction`
+<span class="label label-danger">Attention</span> 因为会话窗口并没有固定的开始或技术时间,
+他们与滑动和滚动窗口的计算方法不同。在 Flink 内部,会话窗口的算子会为每一条数据创建一个窗口,
+长度为定义好的间隔,然后将重叠的窗口合并。

Review comment:
       Thank you for the suggestion. I redid the whole paragraph in commit "rephrase line 354-357"




----------------------------------------------------------------
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 #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552",
       "triggerID" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13339",
       "triggerID" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13343",
       "triggerID" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * aa11c3a56df1220308dc2d6fb6ce9371eb29d684 UNKNOWN
   * 8bc7297b9b8336691d9778d301c37930d61e0a57 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13343) 
   * ab3dc6709c23de8100d2ab79170b9ccb549e70ae 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] gaoyunhaii commented on pull request #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   Very thanks @dijkwxyz for opening the PR and very thanks @XBaith for the reviewing, and very sorry for the extreme long delay for the review... The PR looks very good to me, I rebased it to the latest master and would merge after the azure get green.


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] flinkbot edited a comment on pull request #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552",
       "triggerID" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13339",
       "triggerID" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13343",
       "triggerID" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13353",
       "triggerID" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a63f91ca287d6a68e1bab682e82a0ba80d227ad0",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13360",
       "triggerID" : "a63f91ca287d6a68e1bab682e82a0ba80d227ad0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7dca580601088ab159a5a4b0df01511844f383d1",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28798",
       "triggerID" : "7dca580601088ab159a5a4b0df01511844f383d1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * aa11c3a56df1220308dc2d6fb6ce9371eb29d684 UNKNOWN
   * 7dca580601088ab159a5a4b0df01511844f383d1 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28798) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] flinkbot edited a comment on pull request #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552",
       "triggerID" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13339",
       "triggerID" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13343",
       "triggerID" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ec78762bddcb8c064ecf990b1922b132fd002b92 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13339) 
   * aa11c3a56df1220308dc2d6fb6ce9371eb29d684 UNKNOWN
   * 8bc7297b9b8336691d9778d301c37930d61e0a57 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13343) 
   * ab3dc6709c23de8100d2ab79170b9ccb549e70ae 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 commented on pull request #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0da2330259082ab890d671077cca17cbae4c5db5 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 #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552",
       "triggerID" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13339",
       "triggerID" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13343",
       "triggerID" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13353",
       "triggerID" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a63f91ca287d6a68e1bab682e82a0ba80d227ad0",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13360",
       "triggerID" : "a63f91ca287d6a68e1bab682e82a0ba80d227ad0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7dca580601088ab159a5a4b0df01511844f383d1",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7dca580601088ab159a5a4b0df01511844f383d1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * aa11c3a56df1220308dc2d6fb6ce9371eb29d684 UNKNOWN
   * a63f91ca287d6a68e1bab682e82a0ba80d227ad0 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13360) 
   * 7dca580601088ab159a5a4b0df01511844f383d1 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] flinkbot edited a comment on pull request #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552",
       "triggerID" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13339",
       "triggerID" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0da2330259082ab890d671077cca17cbae4c5db5 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552) 
   * ec78762bddcb8c064ecf990b1922b132fd002b92 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13339) 
   * aa11c3a56df1220308dc2d6fb6ce9371eb29d684 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 #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552",
       "triggerID" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13339",
       "triggerID" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13343",
       "triggerID" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0da2330259082ab890d671077cca17cbae4c5db5 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552) 
   * ec78762bddcb8c064ecf990b1922b132fd002b92 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13339) 
   * aa11c3a56df1220308dc2d6fb6ce9371eb29d684 UNKNOWN
   * 8bc7297b9b8336691d9778d301c37930d61e0a57 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13343) 
   
   <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 #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552",
       "triggerID" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13339",
       "triggerID" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13343",
       "triggerID" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13353",
       "triggerID" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a63f91ca287d6a68e1bab682e82a0ba80d227ad0",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13360",
       "triggerID" : "a63f91ca287d6a68e1bab682e82a0ba80d227ad0",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7dca580601088ab159a5a4b0df01511844f383d1",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28798",
       "triggerID" : "7dca580601088ab159a5a4b0df01511844f383d1",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * aa11c3a56df1220308dc2d6fb6ce9371eb29d684 UNKNOWN
   * a63f91ca287d6a68e1bab682e82a0ba80d227ad0 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13360) 
   * 7dca580601088ab159a5a4b0df01511844f383d1 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=28798) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] flinkbot edited a comment on pull request #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552",
       "triggerID" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0da2330259082ab890d671077cca17cbae4c5db5 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552) 
   
   <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] gaoyunhaii closed pull request #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

Posted by GitBox <gi...@apache.org>.
gaoyunhaii closed pull request #14773:
URL: https://github.com/apache/flink/pull/14773


   


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

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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



[GitHub] [flink] dijkwxyz commented on a change in pull request #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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



##########
File path: docs/dev/stream/operators/windows.zh.md
##########
@@ -327,65 +312,63 @@ input
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
 val input: DataStream[T] = ...
-
-// event-time session windows with static gap
+// 设置了固定间隔的 event-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(EventTimeSessionWindows.withGap(Time.minutes(10)))
     .<windowed transformation>(<window function>)
 
-// event-time session windows with dynamic gap
+// 设置了动态间隔的 event-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(EventTimeSessionWindows.withDynamicGap(new SessionWindowTimeGapExtractor[String] {
       override def extract(element: String): Long = {
-        // determine and return session gap
+        // 决定并返回会话间隔
       }
     }))
     .<windowed transformation>(<window function>)
 
-// processing-time session windows with static gap
+// 设置了固定间隔的 processing-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(ProcessingTimeSessionWindows.withGap(Time.minutes(10)))
     .<windowed transformation>(<window function>)
 
-
-// processing-time session windows with dynamic gap
+// 设置了动态间隔的 processing-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(DynamicProcessingTimeSessionWindows.withDynamicGap(new SessionWindowTimeGapExtractor[String] {
       override def extract(element: String): Long = {
-        // determine and return session gap
+        // 决定并返回会话间隔
       }
     }))
     .<windowed transformation>(<window function>)
 {% endhighlight %}
 </div>
 </div>
 
-Static gaps can be specified by using one of `Time.milliseconds(x)`, `Time.seconds(x)`,
-`Time.minutes(x)`, and so on.
+固定间隔可以使用 `Time.milliseconds(x)`、`Time.seconds(x)`、`Time.minutes(x)` 等来设置。
+
+动态间隔可以通过实现 `SessionWindowTimeGapExtractor` 接口来指定。
 
-Dynamic gaps are specified by implementing the `SessionWindowTimeGapExtractor` interface.
+需要的是,因为会话窗口并没有固定的开始或技术时间,他们与滑动和滚动窗口的计算方法不同。
+在 Flink 内部,会话窗口的算子会为每一条数据创建一个窗口,长度为定义好的间隔,然后将重叠的窗口合并。
 
-<span class="label label-danger">Attention</span> Since session windows do not have a fixed start and end,
-they are  evaluated differently than tumbling and sliding windows. Internally, a session window operator
-creates a new window for each arriving record and merges windows together if they are closer to each other
-than the defined gap.
-In order to be mergeable, a session window operator requires a merging [Trigger](#triggers) and a merging
-[Window Function](#window-functions), such as `ReduceFunction`, `AggregateFunction`, or `ProcessWindowFunction`
+<span class="label label-danger">Attention</span> 因为会话窗口并没有固定的开始或技术时间,
+他们与滑动和滚动窗口的计算方法不同。在 Flink 内部,会话窗口的算子会为每一条数据创建一个窗口,
+长度为定义好的间隔,然后将重叠的窗口合并。

Review comment:
       Thank you for the suggestion. Your suggestion is more concise but I think mine would cause less ambiguity. I wish to keep my translation. 




----------------------------------------------------------------
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 #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552",
       "triggerID" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0da2330259082ab890d671077cca17cbae4c5db5 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552) 
   * ec78762bddcb8c064ecf990b1922b132fd002b92 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 #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552",
       "triggerID" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13339",
       "triggerID" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13343",
       "triggerID" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13353",
       "triggerID" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * aa11c3a56df1220308dc2d6fb6ce9371eb29d684 UNKNOWN
   * ab3dc6709c23de8100d2ab79170b9ccb549e70ae Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13353) 
   
   <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 #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552",
       "triggerID" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13339",
       "triggerID" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0da2330259082ab890d671077cca17cbae4c5db5 Azure: [SUCCESS](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552) 
   * ec78762bddcb8c064ecf990b1922b132fd002b92 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13339) 
   * aa11c3a56df1220308dc2d6fb6ce9371eb29d684 UNKNOWN
   * 8bc7297b9b8336691d9778d301c37930d61e0a57 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 #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552",
       "triggerID" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13339",
       "triggerID" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13343",
       "triggerID" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13353",
       "triggerID" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a63f91ca287d6a68e1bab682e82a0ba80d227ad0",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13360",
       "triggerID" : "a63f91ca287d6a68e1bab682e82a0ba80d227ad0",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * aa11c3a56df1220308dc2d6fb6ce9371eb29d684 UNKNOWN
   * ab3dc6709c23de8100d2ab79170b9ccb549e70ae Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13353) 
   * a63f91ca287d6a68e1bab682e82a0ba80d227ad0 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13360) 
   
   <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] dijkwxyz commented on a change in pull request #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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



##########
File path: docs/dev/stream/operators/windows.zh.md
##########
@@ -23,137 +23,131 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-Windows are at the heart of processing infinite streams. Windows split the stream into "buckets" of finite size,
-over which we can apply computations. This document focuses on how windowing is performed in Flink and how the
-programmer can benefit to the maximum from its offered functionality.
+窗口(Window)是处理无界流的关键所在。窗口可以将数据流装入大小有限的“桶”中,再对每个“桶”加以处理。
+本文的重心将放在Flink如何进行窗口操作以及开发者如何尽可能地利用 Flink 所提供的功能。
 
-The general structure of a windowed Flink program is presented below. The first snippet refers to *keyed* streams,
-while the second to *non-keyed* ones. As one can see, the only difference is the `keyBy(...)` call for the keyed streams
-and the `window(...)` which becomes `windowAll(...)` for non-keyed streams. This is also going to serve as a roadmap
-for the rest of the page.
+下面展示了 Flink 窗口在 *keyed* streams 和 *non-keyed* streams 上使用的基本结构。
+我们可以看到,这两者唯一的区别仅在于:keyed streams 要调用  `keyBy(...)`后再调用 `window(...)` ,
+而 non-keyed streams 只用直接调用 `windowAll(...)`。留意这个区别,它能帮我们更好地理解后面的内容。
 
 **Keyed Windows**
 
     stream
-           .keyBy(...)               <-  keyed versus non-keyed windows
-           .window(...)              <-  required: "assigner"
-          [.trigger(...)]            <-  optional: "trigger" (else default trigger)
-          [.evictor(...)]            <-  optional: "evictor" (else no evictor)
-          [.allowedLateness(...)]    <-  optional: "lateness" (else zero)
-          [.sideOutputLateData(...)] <-  optional: "output tag" (else no side output for late data)
-           .reduce/aggregate/fold/apply()      <-  required: "function"
-          [.getSideOutput(...)]      <-  optional: "output tag"
+           .keyBy(...)               <-  仅 keyed 窗口需要
+           .window(...)              <-  必填项:"assigner"
+          [.trigger(...)]            <-  可选项:"trigger" (省略则使用默认 trigger)
+          [.evictor(...)]            <-  可选项:"evictor" (省略则不使用 evictor)
+          [.allowedLateness(...)]    <-  可选项:"lateness" (省略则为 0)
+          [.sideOutputLateData(...)] <-  可选项:"output tag" (省略则不对迟到数据使用side output)
+           .reduce/aggregate/fold/apply()      <-  必填项:"function"
+          [.getSideOutput(...)]      <-  可选项:"output tag"
 
 **Non-Keyed Windows**
 
     stream
-           .windowAll(...)           <-  required: "assigner"
-          [.trigger(...)]            <-  optional: "trigger" (else default trigger)
-          [.evictor(...)]            <-  optional: "evictor" (else no evictor)
-          [.allowedLateness(...)]    <-  optional: "lateness" (else zero)
-          [.sideOutputLateData(...)] <-  optional: "output tag" (else no side output for late data)
-           .reduce/aggregate/fold/apply()      <-  required: "function"
-          [.getSideOutput(...)]      <-  optional: "output tag"
+           .windowAll(...)           <-  必填项:"assigner"
+          [.trigger(...)]            <-  可选项:"trigger" (else default trigger)
+          [.evictor(...)]            <-  可选项:"evictor" (else no evictor)
+          [.allowedLateness(...)]    <-  可选项:"lateness" (else zero)
+          [.sideOutputLateData(...)] <-  可选项:"output tag" (else no side output for late data)
+           .reduce/aggregate/fold/apply()      <-  必填项:"function"
+          [.getSideOutput(...)]      <-  可选项:"output tag"
 
-In the above, the commands in square brackets ([...]) are optional. This reveals that Flink allows you to customize your
-windowing logic in many different ways so that it best fits your needs.
+上面方括号([...])中的命令是可选的。也就是说,Flink 允许你自定义多样化的窗口操作来满足你的需求。
 
 * This will be replaced by the TOC
 {:toc}
 
-## Window Lifecycle
+## 窗口的生命周期
 
-In a nutshell, a window is **created** as soon as the first element that should belong to this window arrives, and the
-window is **completely removed** when the time (event or processing time) passes its end timestamp plus the user-specified
-`allowed lateness` (see [Allowed Lateness](#allowed-lateness)). Flink guarantees removal only for time-based
-windows and not for other types, *e.g.* global windows (see [Window Assigners](#window-assigners)). For example, with an
-event-time-based windowing strategy that creates non-overlapping (or tumbling) windows every 5 minutes and has an allowed
-lateness of 1 min, Flink will create a new window for the interval between `12:00` and `12:05` when the first element with
-a timestamp that falls into this interval arrives, and it will remove it when the watermark passes the `12:06`
-timestamp.
+简单来说,一个窗口在第一个属于它的元素到达时就会被**创建**,然后在时间(event 或 processing time)
+超过窗口的“结束时间戳 + 用户定义的 `allowed lateness` (详见 [Allowed Lateness](#allowed-lateness))”时
+被**完全删除**。Flink 仅保证删除基于时间的窗口,其他类型的窗口不做保证,
+比如全局窗口(详见[Window Assigners](#window-assigners))。
+例如,对于一个基于event time且范围互不重合(滚动)的窗口策略,
+如果窗口设置的时长为五分钟、可容忍的迟到时间(allowed lateness)为1分钟,
+那么第一个元素落入 `12:00` 至 `12:05` 这个区间时, Flink就会为这个区间创建一个新的窗口。
+当watermark越过 `12:06` 时,这个窗口将被摧毁。
 
-In addition, each window will have a `Trigger` (see [Triggers](#triggers)) and a function (`ProcessWindowFunction`, `ReduceFunction`,
-or `AggregateFunction`) (see [Window Functions](#window-functions)) attached to it. The function will contain the computation to
-be applied to the contents of the window, while the `Trigger` specifies the conditions under which the window is
-considered ready for the function to be applied. A triggering policy might be something like "when the number of elements
-in the window is more than 4", or "when the watermark passes the end of the window". A trigger can also decide to
-purge a window's contents any time between its creation and removal. Purging in this case only refers to the elements
-in the window, and *not* the window metadata. This means that new data can still be added to that window.
+另外,每个窗口会设置自己的 `Trigger` (详见 [Triggers](#triggers))和function 
+(`ProcessWindowFunction`、`ReduceFunction`、或 `AggregateFunction`,
+详见 [Window Functions](#window-functions))。该 function 决定如何计算窗口中的内容,
+而 `Trigger` 决定何时窗口中的数据可以被 function 计算。
+Trigger 的触发(fire)条件可能是“当窗口中有多于4条数据”或“当 watermark 越过窗口的结束时间”等。
+Trigger 还可以在 window 被创建后、删除前的这段时间内定义何时清理(purge)窗口中的数据。
+这里的数据仅指窗口内的元素,不包括窗口的 meta data。也就是说,窗口在 purge 后仍然可以加入新的数据。
 
-Apart from the above, you can specify an `Evictor` (see [Evictors](#evictors)) which will be able to remove
-elements from the window after the trigger fires and before and/or after the function is applied.
+除此之外,你也可以指定一个 `Evictor` (详见 [Evictors](#evictors)),在 trigger 触发前后删除数据。
 
-In the following we go into more detail for each of the components above. We start with the required parts in the above
-snippet (see [Keyed vs Non-Keyed Windows](#keyed-vs-non-keyed-windows), [Window Assigner](#window-assigner), and
-[Window Function](#window-function)) before moving to the optional ones.
+接下来我们会更详细地介绍上面提到的内容。开头的例子中有必填项和可选项。
+我们先从必填项开始(详见 [Keyed vs Non-Keyed Windows](#keyed-vs-non-keyed-windows)、
+[Window Assigner](#window-assigner)、[Window Function](#window-function))。
 
-## Keyed vs Non-Keyed Windows
+## Keyed 和 Non-Keyed Windows
 
-The first thing to specify is whether your stream should be keyed or not. This has to be done before defining the window.
-Using the `keyBy(...)` will split your infinite stream into logical keyed streams. If `keyBy(...)` is not called, your
-stream is not keyed.
+首先必须要在定义窗口前确定的是你的 stream 是 keyed 还是 non-keyed。
+`keyBy(...)` 会将你的无界 stream 分割为逻辑上的 keyed stream。
+如果 `keyBy(...)` 没有被调用,你的 stream 就不是 keyed。
 
-In the case of keyed streams, any attribute of your incoming events can be used as a key
-(more details [here]({% link dev/stream/state/state.zh.md %}#keyed-datastream)). Having a keyed stream will
-allow your windowed computation to be performed in parallel by multiple tasks, as each logical keyed stream can be processed
-independently from the rest. All elements referring to the same key will be sent to the same parallel task.
+对于 keyed stream,其中数据的任何属性都可以作为 key
+(详见[此处here]({% link dev/stream/state/state.zh.md %}#keyed-datastream))。
+使用 keyed stream 允许你的窗口计算由多个 task 并行,因为每个逻辑上的 keyed stream 都可以被单独处理。
+属于同一个 key 的元素会被发送到同一个 task。
 
-In case of non-keyed streams, your original stream will not be split into multiple logical streams and all the windowing logic
-will be performed by a single task, *i.e.* with parallelism of 1.
+对于 non-keyed stream,你原始的 stream 不会被分割为多个逻辑上的 stream,
+所以所有的窗口计算会被同一个 task 完成,也就是 parallelism 为 1。
 
 ## Window Assigners
 
-After specifying whether your stream is keyed or not, the next step is to define a *window assigner*.
-The window assigner defines how elements are assigned to windows. This is done by specifying the `WindowAssigner`
-of your choice in the `window(...)` (for *keyed* streams) or the `windowAll()` (for *non-keyed* streams) call.
+指定了你的 stream 是否为 keyed 之后,下一步就是定义 *window assigner*。
 
-A `WindowAssigner` is responsible for assigning each incoming element to one or more windows. Flink comes
-with pre-defined window assigners for the most common use cases, namely *tumbling windows*,
-*sliding windows*, *session windows* and *global windows*. You can also implement a custom window assigner by
-extending the `WindowAssigner` class. All built-in window assigners (except the global
-windows) assign elements to windows based on time, which can either be processing time or event
-time. Please take a look at our section on [event time]({% link dev/event_time.zh.md %}) to learn
-about the difference between processing time and event time and how timestamps and watermarks are generated.
+Window assigner 定义了 stream 中的元素如何被分发到各个窗口。
+你可以在 `window(...)`(用于 *keyed* streams)或`windowAll(...)`
+(用于 non-keyed streams)中指定一个 `WindowAssigner`。
+`WindowAssigner`负责将 stream 中的每个数据分发到一个或多个窗口中。
+Flink 为最常用的情况提供了一些定义好的 window assigner,也就是  *tumbling windows*、
+*sliding windows*、 *session windows* 和 *global windows*。
+你也可以继承 `WindowAssigner` 类来实现自定义的 window assigner。
+所有内置的 window assigner(除了 global window)都是基于时间分发数据的,processing 或 event time 均可。
+请阅读我们对于 [event time]({% link dev/event_time.zh.md %}) 的介绍来了解这两者的区别,
+以及 timestamp 和 watermark 是如何产生的。
 
-Time-based windows have a *start timestamp* (inclusive) and an *end timestamp* (exclusive)
-that together describe the size of the window. In code, Flink uses `TimeWindow` when working with
-time-based windows which has methods for querying the start- and end-timestamp and also an
-additional method `maxTimestamp()` that returns the largest allowed timestamp for a given windows.
+基于时间的窗口用 *start timestamp*(包含)和 *end timestamp*(不包含)描述窗口的大小。
+在源代码中,Flink处理基于时间的窗口使用的是 `TimeWindow`,
+它有查询开始和结束timestamp以及返回窗口所能储存的最大 timestamp 的方法 `maxTimestamp()`。

Review comment:
       Thanks for the suggestion. How about the following translation? I think math notations would be the clearest and most concise.
   ```suggestion
   基于时间的窗口用 [*start timestamp*, *end timestamp*) 描述窗口的边界。
   在代码中,Flink 处理基于时间的窗口使用的是 `TimeWindow`,
   它有查询 start timestamp 和 end timestamp 的方法,以及返回窗口所能储存的最大 timestamp 的方法 `maxTimestamp()`。
   ```




----------------------------------------------------------------
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 #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552",
       "triggerID" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13339",
       "triggerID" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13343",
       "triggerID" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * ec78762bddcb8c064ecf990b1922b132fd002b92 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13339) 
   * aa11c3a56df1220308dc2d6fb6ce9371eb29d684 UNKNOWN
   * 8bc7297b9b8336691d9778d301c37930d61e0a57 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13343) 
   
   <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 #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552",
       "triggerID" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13339",
       "triggerID" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13343",
       "triggerID" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13353",
       "triggerID" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a63f91ca287d6a68e1bab682e82a0ba80d227ad0",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "a63f91ca287d6a68e1bab682e82a0ba80d227ad0",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * aa11c3a56df1220308dc2d6fb6ce9371eb29d684 UNKNOWN
   * ab3dc6709c23de8100d2ab79170b9ccb549e70ae Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13353) 
   * a63f91ca287d6a68e1bab682e82a0ba80d227ad0 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] XBaith commented on pull request #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   LGTM.Please resolve conflicts in this branch.


----------------------------------------------------------------
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 #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   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 a63f91ca287d6a68e1bab682e82a0ba80d227ad0 (Fri Feb 19 07:33:19 UTC 2021)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <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] flinkbot edited a comment on pull request #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552",
       "triggerID" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13339",
       "triggerID" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13343",
       "triggerID" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13353",
       "triggerID" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a63f91ca287d6a68e1bab682e82a0ba80d227ad0",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13360",
       "triggerID" : "a63f91ca287d6a68e1bab682e82a0ba80d227ad0",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * aa11c3a56df1220308dc2d6fb6ce9371eb29d684 UNKNOWN
   * a63f91ca287d6a68e1bab682e82a0ba80d227ad0 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13360) 
   
   <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] dijkwxyz commented on a change in pull request #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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



##########
File path: docs/dev/stream/operators/windows.zh.md
##########
@@ -491,10 +464,10 @@ An `AggregateFunction` can be defined and used like this:
  */
 private static class AverageAggregate
     implements AggregateFunction<Tuple2<String, Long>, Tuple2<Long, Long>, Double> {
-  @Override
-  public Tuple2<Long, Long> createAccumulator() {
+    @Override

Review comment:
       Thanks. I removed the extra spaces in other places as well.




----------------------------------------------------------------
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 #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552",
       "triggerID" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13339",
       "triggerID" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13343",
       "triggerID" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13353",
       "triggerID" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * aa11c3a56df1220308dc2d6fb6ce9371eb29d684 UNKNOWN
   * 8bc7297b9b8336691d9778d301c37930d61e0a57 Azure: [CANCELED](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13343) 
   * ab3dc6709c23de8100d2ab79170b9ccb549e70ae Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13353) 
   
   <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] dijkwxyz commented on a change in pull request #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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



##########
File path: docs/dev/stream/operators/windows.zh.md
##########
@@ -327,65 +312,63 @@ input
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
 val input: DataStream[T] = ...
-
-// event-time session windows with static gap
+// 设置了固定间隔的 event-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(EventTimeSessionWindows.withGap(Time.minutes(10)))
     .<windowed transformation>(<window function>)
 
-// event-time session windows with dynamic gap
+// 设置了动态间隔的 event-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(EventTimeSessionWindows.withDynamicGap(new SessionWindowTimeGapExtractor[String] {
       override def extract(element: String): Long = {
-        // determine and return session gap
+        // 决定并返回会话间隔
       }
     }))
     .<windowed transformation>(<window function>)
 
-// processing-time session windows with static gap
+// 设置了固定间隔的 processing-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(ProcessingTimeSessionWindows.withGap(Time.minutes(10)))
     .<windowed transformation>(<window function>)
 
-
-// processing-time session windows with dynamic gap
+// 设置了动态间隔的 processing-time 会话窗口
 input
     .keyBy(<key selector>)
     .window(DynamicProcessingTimeSessionWindows.withDynamicGap(new SessionWindowTimeGapExtractor[String] {
       override def extract(element: String): Long = {
-        // determine and return session gap
+        // 决定并返回会话间隔
       }
     }))
     .<windowed transformation>(<window function>)
 {% endhighlight %}
 </div>
 </div>
 
-Static gaps can be specified by using one of `Time.milliseconds(x)`, `Time.seconds(x)`,
-`Time.minutes(x)`, and so on.
+固定间隔可以使用 `Time.milliseconds(x)`、`Time.seconds(x)`、`Time.minutes(x)` 等来设置。
+
+动态间隔可以通过实现 `SessionWindowTimeGapExtractor` 接口来指定。
 
-Dynamic gaps are specified by implementing the `SessionWindowTimeGapExtractor` interface.
+需要的是,因为会话窗口并没有固定的开始或技术时间,他们与滑动和滚动窗口的计算方法不同。
+在 Flink 内部,会话窗口的算子会为每一条数据创建一个窗口,长度为定义好的间隔,然后将重叠的窗口合并。

Review comment:
       Sorry for the mistake. 




----------------------------------------------------------------
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] dijkwxyz commented on a change in pull request #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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



##########
File path: docs/dev/stream/operators/windows.zh.md
##########
@@ -491,10 +464,10 @@ An `AggregateFunction` can be defined and used like this:
  */
 private static class AverageAggregate
     implements AggregateFunction<Tuple2<String, Long>, Tuple2<Long, Long>, Double> {
-  @Override
-  public Tuple2<Long, Long> createAccumulator() {
+    @Override

Review comment:
       Thanks. I removed the extra spaces in other places as well. They are from the original .zh.md document.




----------------------------------------------------------------
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 #14773: [FLINK-16153] Translate "Operator/windows" into Chinese

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=12552",
       "triggerID" : "0da2330259082ab890d671077cca17cbae4c5db5",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13339",
       "triggerID" : "ec78762bddcb8c064ecf990b1922b132fd002b92",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "aa11c3a56df1220308dc2d6fb6ce9371eb29d684",
       "triggerType" : "PUSH"
     }, {
       "hash" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13343",
       "triggerID" : "8bc7297b9b8336691d9778d301c37930d61e0a57",
       "triggerType" : "PUSH"
     }, {
       "hash" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13353",
       "triggerID" : "ab3dc6709c23de8100d2ab79170b9ccb549e70ae",
       "triggerType" : "PUSH"
     }, {
       "hash" : "a63f91ca287d6a68e1bab682e82a0ba80d227ad0",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13360",
       "triggerID" : "a63f91ca287d6a68e1bab682e82a0ba80d227ad0",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * aa11c3a56df1220308dc2d6fb6ce9371eb29d684 UNKNOWN
   * a63f91ca287d6a68e1bab682e82a0ba80d227ad0 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=13360) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

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