You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/02/21 09:01:21 UTC

[GitHub] [flink] shuai-xu opened a new pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

shuai-xu opened a new pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168
 
 
   
   ## What is the purpose of the change
   
   *This pull request translates the CEP page into Chinese.*
   
   
   ## Verifying this change
   
   This change is a docs work without any test coverage.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (no)
     - If yes, how is the feature documented? (not applicable)
   

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


With regards,
Apache Git Services

[GitHub] [flink] libenchao commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
libenchao commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r382893889
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -63,13 +60,12 @@ add the FlinkCEP dependency to the `pom.xml` of your project.
 </div>
 </div>
 
-{% info %} FlinkCEP is not part of the binary distribution. See how to link with it for cluster execution [here]({{site.baseurl}}/dev/projectsetup/dependencies.html).
+{% info %} FlinkCEP不是二进制分发的一部分。在集群上执行如何链接它可以看[这里]({{site.baseurl}}/dev/projectsetup/dependencies.html)。
 
-Now you can start writing your first CEP program using the Pattern API.
+现在可以开始使用Pattern API写你的第一个CEP程序了。
 
-{% warn Attention %} The events in the `DataStream` to which
-you want to apply pattern matching must implement proper `equals()` and `hashCode()` methods
-because FlinkCEP uses them for comparing and matching events.
+{% warn Attention %} `DataStream`中的事件,如果你想在上面进行模式匹配的话,必须实现合适的 `equals()`和`hashCode()`方法,
 
 Review comment:
   Attention -> 注意

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


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387011223
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -23,23 +23,20 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-FlinkCEP is the Complex Event Processing (CEP) library implemented on top of Flink.
-It allows you to detect event patterns in an endless stream of events, giving you the opportunity to get hold of what's important in your
-data.
+FlinkCEP是在Flink上层实现的复杂事件处理库。
+它可以让你在无限事件流中检测出特定的事件模型,有机会掌握数据中重要的那部分。
 
-This page describes the API calls available in Flink CEP. We start by presenting the [Pattern API](#the-pattern-api),
-which allows you to specify the patterns that you want to detect in your stream, before presenting how you can
-[detect and act upon matching event sequences](#detecting-patterns). We then present the assumptions the CEP
-library makes when [dealing with lateness](#handling-lateness-in-event-time) in event time and how you can
-[migrate your job](#migrating-from-an-older-flink-versionpre-13) from an older Flink version to Flink-1.3.
+本页讲述了Flink CEP中可用的API,我们首先讲述[模式API](#模式api),它可以让你指定想在数据流中检测的模式,然后讲述如何[检测匹配的事件序列并进行处理](#检测模式)。
+再然后我们讲述Flink在按照事件时间[处理迟到事件](#按照事件时间处理晚到事件)时的假设,
 
 Review comment:
   晚到 -> 迟到?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387437963
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -736,41 +715,39 @@ Pattern<Event, ?> relaxedNot = start.notFollowedBy("not").where(...);
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
 
-// strict contiguity
+// 严格连续
 val strict: Pattern[Event, _] = start.next("middle").where(...)
 
-// relaxed contiguity
+// 松散连续
 val relaxed: Pattern[Event, _] = start.followedBy("middle").where(...)
 
-// non-deterministic relaxed contiguity
+// 不确定的松散连续
 val nonDetermin: Pattern[Event, _] = start.followedByAny("middle").where(...)
 
-// NOT pattern with strict contiguity
+// 严格连续的NOT模式
 val strictNot: Pattern[Event, _] = start.notNext("not").where(...)
 
-// NOT pattern with relaxed contiguity
+// 松散连续的NOT模式
 val relaxedNot: Pattern[Event, _] = start.notFollowedBy("not").where(...)
 
 {% endhighlight %}
 </div>
 </div>
 
-Relaxed contiguity means that only the first succeeding matching event will be matched, while
-with non-deterministic relaxed contiguity, multiple matches will be emitted for the same beginning. As an example,
-a pattern `"a b"`, given the event sequence `"a", "c", "b1", "b2"`, will give the following results:
+松散连续意味着跟着的事件中,只有第一个可匹配的事件会被匹配上,而不确定的松散连接情况下,有着同样起始的多个匹配会被输出。
+举例来说,模式`"a b"`,给定事件序列`"a","c","b1","b2"`,会产生如下的结果:
 
-1. Strict Contiguity between `"a"` and `"b"`: `{}` (no match), the `"c"` after `"a"` causes `"a"` to be discarded.
+1. `"a"`和`"b"`之间严格连续: `{}` (没有匹配),`"a"`之后的`"c"`导致`"a"`被丢弃。
 
-2. Relaxed Contiguity between `"a"` and `"b"`: `{a b1}`, as relaxed continuity is viewed as "skip non-matching events
-till the next matching one".
+2. `"a"`和`"b"`之间松散连续: `{a b1}`,松散连续会"跳过不匹配的事件直到匹配上的事件"。
 
-3. Non-Deterministic Relaxed Contiguity between `"a"` and `"b"`: `{a b1}`, `{a b2}`, as this is the most general form.
+3. `"a"`和`"b"`之间不确定的松散连续: `{a b1}`, `{a b2}`,这是最常见的情况。
 
-It's also possible to define a temporal constraint for the pattern to be valid.
-For example, you can define that a pattern should occur within 10 seconds via the `pattern.within()` method.
-Temporal patterns are supported for both [processing and event time]({{site.baseurl}}/dev/event_time.html).
+也可以为模式定义一个有效时间约束。
+例如,你可以通过`pattern.within()`方法指定一个模式应该在10秒内发生。
+这种暂时的模式支持[处理时间和事件时间]({{site.baseurl}}/zh/dev/event_time.html).
 
-{% warn Attention %} A pattern sequence can only have one temporal constraint. If multiple such constraints are defined on different individual patterns, then the smallest is applied.
+{% warn 注意 %} 一个模式序列只能有一个时间限制。如果在限制了多个时间在不同的单个模式上,会使用最小的那个时间限制。
 
 Review comment:
   done

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


With regards,
Apache Git Services

[GitHub] [flink] shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387438795
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -335,88 +332,87 @@ start.where(event => event.getName.startsWith("foo"))
 </div>
 </div>
 
-Finally, you can also restrict the type of the accepted event to a subtype of the initial event type (here `Event`)
-via the `pattern.subtype(subClass)` method.
+最后,你可以通过`pattern.subtype(subClass)`方法限制接受的事件类型是初始事件的子类型。
 
 <div class="codetabs" markdown="1">
 <div data-lang="java" markdown="1">
 {% highlight java %}
 start.subtype(SubEvent.class).where(new SimpleCondition<SubEvent>() {
     @Override
     public boolean filter(SubEvent value) {
-        return ... // some condition
+        return ... // 一些判断条件
     }
 });
 {% endhighlight %}
 </div>
 
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
-start.subtype(classOf[SubEvent]).where(subEvent => ... /* some condition */)
+start.subtype(classOf[SubEvent]).where(subEvent => ... /* 一些判断条件 */)
 {% endhighlight %}
 </div>
 </div>
 
-**Combining Conditions:** As shown above, you can combine the `subtype` condition with additional conditions. This holds for every condition. You can arbitrarily combine conditions by sequentially calling `where()`. The final result will be the logical **AND** of the results of the individual conditions. To combine conditions using **OR**, you can use the `or()` method, as shown below.
+**组合条件:** 如上所示,你可以把`subtype`条件和其他的条件结合起来使用。这适用于任何条件,你可以通过依次调用`where()`来组合条件。
+最终的结果是是每个单一条件的结果的逻辑**AND**。如果想使用**OR**来组合条件,你可以使用像下面这样使用`or()`方法。
 
 Review comment:
   done

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#issuecomment-589576910
 
 
   <!--
   Meta data
   Hash:8e08bdefc8f3a02ffdba8591620b4fea59889cc2 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/149965664 TriggerType:PUSH TriggerID:8e08bdefc8f3a02ffdba8591620b4fea59889cc2
   -->
   ## CI report:
   
   * 8e08bdefc8f3a02ffdba8591620b4fea59889cc2 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/149965664) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r386216591
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -63,13 +60,12 @@ add the FlinkCEP dependency to the `pom.xml` of your project.
 </div>
 </div>
 
-{% info %} FlinkCEP is not part of the binary distribution. See how to link with it for cluster execution [here]({{site.baseurl}}/dev/projectsetup/dependencies.html).
+{% info %} FlinkCEP不是二进制分发的一部分。在集群上执行如何链接它可以看[这里]({{site.baseurl}}/dev/projectsetup/dependencies.html)。
 
-Now you can start writing your first CEP program using the Pattern API.
+现在可以开始使用Pattern API写你的第一个CEP程序了。
 
-{% warn Attention %} The events in the `DataStream` to which
-you want to apply pattern matching must implement proper `equals()` and `hashCode()` methods
-because FlinkCEP uses them for comparing and matching events.
+{% warn Attention %} `DataStream`中的事件,如果你想在上面进行模式匹配的话,必须实现合适的 `equals()`和`hashCode()`方法,
 
 Review comment:
   done

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#issuecomment-589562914
 
 
   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 8e08bdefc8f3a02ffdba8591620b4fea59889cc2 (Fri Feb 21 09:03:59 UTC 2020)
   
    ✅no warnings
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </details>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#issuecomment-589576910
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/149965664",
       "triggerID" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5794",
       "triggerID" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151296073",
       "triggerID" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76146c2111a47b68765168064b4d1dd90448789c",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151304506",
       "triggerID" : "76146c2111a47b68765168064b4d1dd90448789c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76146c2111a47b68765168064b4d1dd90448789c",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5800",
       "triggerID" : "76146c2111a47b68765168064b4d1dd90448789c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "829770f1ca71973e386bf808fd6b9d813179061b",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "829770f1ca71973e386bf808fd6b9d813179061b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 76146c2111a47b68765168064b4d1dd90448789c Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/151304506) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5800) 
   * 829770f1ca71973e386bf808fd6b9d813179061b 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


With regards,
Apache Git Services

[GitHub] [flink] shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387435604
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -1598,17 +1554,17 @@ val timeoutResult: DataStream[TimeoutEvent] = result.getSideOutput(outputTag)
 </div>
 </div>
 
-## Time in CEP library
+## CEP库中的时间
 
-### Handling Lateness in Event Time
+### 按照事件时间处理晚到事件
 
-In `CEP` the order in which elements are processed matters. To guarantee that elements are processed in the correct order when working in event time, an incoming element is initially put in a buffer where elements are *sorted in ascending order based on their timestamp*, and when a watermark arrives, all the elements in this buffer with timestamps smaller than that of the watermark are processed. This implies that elements between watermarks are processed in event-time order.
+在`CEP`中,事件的处理顺序很重要。在使用事件时间时,为了保证事件按照正确的顺序被处理,一个事件到来后会先被放到一个缓冲区中,
+在缓冲区里事件都按照时间戳从小到大排序,当水位线到达后,缓冲区中所有小于水位线的事件被处理。这意味这水位线之间的数据都按照事件戳被顺序处理。
 
 Review comment:
   done

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#issuecomment-589576910
 
 
   <!--
   Meta data
   Hash:8e08bdefc8f3a02ffdba8591620b4fea59889cc2 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:8e08bdefc8f3a02ffdba8591620b4fea59889cc2
   -->
   ## CI report:
   
   * 8e08bdefc8f3a02ffdba8591620b4fea59889cc2 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


With regards,
Apache Git Services

[GitHub] [flink] shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387435594
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -1750,31 +1704,25 @@ val alerts = patternStream.select(createAlert(_))
 </div>
 </div>
 
-## Migrating from an older Flink version(pre 1.3)
+## 从旧版本迁移(1.3之前)
 
-### Migrating to 1.4+
+### 迁移到1.4+
 
-In Flink-1.4 the backward compatibility of CEP library with <= Flink 1.2 was dropped. Unfortunately 
-it is not possible to restore a CEP job that was once run with 1.2.x
+在Flink-1.4放弃了和<= Flink 1.2版本的兼容性。很不幸,不能再恢复用1.2.x运行过的CEP作业。
 
-### Migrating to 1.3.x
+### 迁移到1.3.x
 
-The CEP library in Flink-1.3 ships with a number of new features which have led to some changes in the API. Here we
-describe the changes that you need to make to your old CEP jobs, in order to be able to run them with Flink-1.3. After
-making these changes and recompiling your job, you will be able to resume its execution from a savepoint taken with the
-old version of your job, *i.e.* without having to re-process your past data.
+CEP库在Flink-1.3发布的一系列的新特性引入了一些API上的修改。这里我们描述你需要对旧的CEP作业所做的修改,以能够用Flink-1.3来运行它们。
+在做完这些修改并重新编译你的作业之后,可以从旧版本作业的保存点之后继续运行,*也就是说*不需要再重新处理旧的数据。
 
-The changes required are:
+需要的修改是:
 
-1. Change your conditions (the ones in the `where(...)` clause) to extend the `SimpleCondition` class instead of
-implementing the `FilterFunction` interface.
+1. 修改你的条件(在`where(...)`语句中的)来继承`SimpleCondition`类而不是实现`FilterFunction`接口。
 
-2. Change your functions provided as arguments to the `select(...)` and `flatSelect(...)` methods to expect a list of
-events associated with each pattern (`List` in `Java`, `Iterable` in `Scala`). This is because with the addition of
-the looping patterns, multiple input events can match a single (looping) pattern.
+2. 修改你作为`select(...)`和`flatSelect(...)`方法的参数的函数为期望每个模式关联一个事件列表(`Java`中`List`,`Scala`中`Iterable`)。
+这是因为增加了循环模式后,多个事件可能匹配一个单一的(循环)模式。
 
-3. The `followedBy()` in Flink 1.1 and 1.2 implied `non-deterministic relaxed contiguity` (see
-[here](#conditions-on-contiguity)). In Flink 1.3 this has changed and `followedBy()` implies `relaxed contiguity`,
-while `followedByAny()` should be used if `non-deterministic relaxed contiguity` is required.
+3. 在Flink 1.1和1.2中,`followedBy()` in Flink 1.1 and 1.2隐含了`不确定的松散连续` (参见[这里](#组合模式))。
 
 Review comment:
   done

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


With regards,
Apache Git Services

[GitHub] [flink] shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r386216554
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -23,23 +23,20 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-FlinkCEP is the Complex Event Processing (CEP) library implemented on top of Flink.
-It allows you to detect event patterns in an endless stream of events, giving you the opportunity to get hold of what's important in your
-data.
+FlinkCEP是在Flink上层实现的复杂事件处理库。
+它可以让你在无限事件流中检测出特定的事件模型,有机会掌握数据中重要的那部分。
 
-This page describes the API calls available in Flink CEP. We start by presenting the [Pattern API](#the-pattern-api),
-which allows you to specify the patterns that you want to detect in your stream, before presenting how you can
-[detect and act upon matching event sequences](#detecting-patterns). We then present the assumptions the CEP
-library makes when [dealing with lateness](#handling-lateness-in-event-time) in event time and how you can
-[migrate your job](#migrating-from-an-older-flink-versionpre-13) from an older Flink version to Flink-1.3.
+本页讲述了Flink CEP中可用的API,我们首先讲述[模式API](#模式api),它可以让你指定想在数据流中检测的模式,然后讲述如何[检测匹配的事件序列并进行处理](#检测模式)。
+再然后我们讲述Flink在按照事件时间[处理迟到事件](#按照事件时间处理晚到事件)时的假设,
+以及如何从旧版本的Flink向1.3之后的版本[迁移作业](#从旧版本迁移13之前)。
 
 * This will be replaced by the TOC
 {:toc}
 
-## Getting Started
+## 开始
 
-If you want to jump right in, [set up a Flink program]({{ site.baseurl }}/dev/projectsetup/dependencies.html) and
-add the FlinkCEP dependency to the `pom.xml` of your project.
+如果你想现在开始尝试,[创建一个Flink程序]({{ site.baseurl }}/dev/projectsetup/dependencies.html),
 
 Review comment:
   done

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


With regards,
Apache Git Services

[GitHub] [flink] libenchao commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
libenchao commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r382894320
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -665,12 +647,11 @@ pattern.oneOrMore().greedy()
 </div>
 </div>
 
-### Combining Patterns
+### 组合模式
 
-Now that you've seen what an individual pattern can look like, it is time to see how to combine them
-into a full pattern sequence.
+现在你已经看到单个的模式是什么样的了,改取看看如何把它们连接起来组成一个完整的模式序列。
 
 Review comment:
   改取 -> 该去

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387003888
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -1598,17 +1554,17 @@ val timeoutResult: DataStream[TimeoutEvent] = result.getSideOutput(outputTag)
 </div>
 </div>
 
-## Time in CEP library
+## CEP库中的时间
 
-### Handling Lateness in Event Time
+### 按照事件时间处理晚到事件
 
-In `CEP` the order in which elements are processed matters. To guarantee that elements are processed in the correct order when working in event time, an incoming element is initially put in a buffer where elements are *sorted in ascending order based on their timestamp*, and when a watermark arrives, all the elements in this buffer with timestamps smaller than that of the watermark are processed. This implies that elements between watermarks are processed in event-time order.
+在`CEP`中,事件的处理顺序很重要。在使用事件时间时,为了保证事件按照正确的顺序被处理,一个事件到来后会先被放到一个缓冲区中,
+在缓冲区里事件都按照时间戳从小到大排序,当水位线到达后,缓冲区中所有小于水位线的事件被处理。这意味这水位线之间的数据都按照事件戳被顺序处理。
 
 Review comment:
   意味这 -> 意味着

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387438715
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -1537,14 +1493,14 @@ class MyPatternProcessFunction<IN, OUT> extends PatternProcessFunction<IN, OUT>
 }
 {% endhighlight %}
 
-<span class="label label-info">Note</span> The `processTimedOutMatch` does not give one access to the main output. You can still emit results
-through [side-outputs]({{ site.baseurl }}/dev/stream/side_output.html) though, through the `Context` object.
+<span class="label label-info">Note</span> `processTimedOutMatch`不能访问主输出。
+但你可以通过`Context`对象把结果输出到[侧输出]({{ site.baseurl }}/zh/dev/stream/side_output.html)。
 
 
-#### Convenience API
+#### 便捷的API
 
-The aforementioned `PatternProcessFunction` was introduced in Flink 1.8 and since then it is the recommended way to interact with matches.
-One can still use the old style API like `select`/`flatSelect`, which internally will be translated into a `PatternProcessFunction`.
+前面提到的`PatternProcessFunction`是在Flink 1.8之后引入的,从那之后推荐使用这个接口来处理匹配到的结果。
+仍然可以使用像`select`/`flatSelect`这样旧格式的API,它们会在内部被转换为`PatternProcessFunction`。
 
 Review comment:
   done

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


With regards,
Apache Git Services

[GitHub] [flink] shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387438919
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -425,18 +421,17 @@ pattern.where(new IterativeCondition<Event>() {
         <tr>
             <td><strong>or(condition)</strong></td>
             <td>
-                <p>Adds a new condition which is ORed with an existing one. An event can match the pattern only if it
-                passes at least one of the conditions:</p>
+                <p>增加一个新的判断和当前的判断取或。一个事件只要满足至少一个判断条件就匹配到模式:</p>
 
 Review comment:
   done

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


With regards,
Apache Git Services

[GitHub] [flink] dianfu merged pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
dianfu merged pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168
 
 
   

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


With regards,
Apache Git Services

[GitHub] [flink] shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387435811
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -1509,18 +1466,17 @@ class MyPatternProcessFunction<IN, OUT> extends PatternProcessFunction<IN, OUT>
 }
 {% endhighlight %}
 
-The `PatternProcessFunction` gives access to a `Context` object. Thanks to it, one can access time related
-characteristics such as `currentProcessingTime` or `timestamp` of current match (which is the timestamp of the last element assigned to the match).
-For more info see [Time context](#time-context).
-Through this context one can also emit results to a [side-output]({{ site.baseurl }}/dev/stream/side_output.html).
+`PatternProcessFunction`可以访问`Context`对象。有了它之后,你可以访问时间属性比如`currentProcessingTime`或者当前匹配的`timestamp`
+(最新分配到匹配上的事件的时间戳).
 
 Review comment:
   done

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


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387004375
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -1537,14 +1493,14 @@ class MyPatternProcessFunction<IN, OUT> extends PatternProcessFunction<IN, OUT>
 }
 {% endhighlight %}
 
-<span class="label label-info">Note</span> The `processTimedOutMatch` does not give one access to the main output. You can still emit results
-through [side-outputs]({{ site.baseurl }}/dev/stream/side_output.html) though, through the `Context` object.
+<span class="label label-info">Note</span> `processTimedOutMatch`不能访问主输出。
+但你可以通过`Context`对象把结果输出到[侧输出]({{ site.baseurl }}/zh/dev/stream/side_output.html)。
 
 
-#### Convenience API
+#### 便捷的API
 
-The aforementioned `PatternProcessFunction` was introduced in Flink 1.8 and since then it is the recommended way to interact with matches.
-One can still use the old style API like `select`/`flatSelect`, which internally will be translated into a `PatternProcessFunction`.
+前面提到的`PatternProcessFunction`是在Flink 1.8之后引入的,从那之后推荐使用这个接口来处理匹配到的结果。
+仍然可以使用像`select`/`flatSelect`这样旧格式的API,它们会在内部被转换为`PatternProcessFunction`。
 
 Review comment:
   仍然 -> 用户仍然?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] libenchao commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
libenchao commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r382893781
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -63,13 +60,12 @@ add the FlinkCEP dependency to the `pom.xml` of your project.
 </div>
 </div>
 
-{% info %} FlinkCEP is not part of the binary distribution. See how to link with it for cluster execution [here]({{site.baseurl}}/dev/projectsetup/dependencies.html).
+{% info %} FlinkCEP不是二进制分发的一部分。在集群上执行如何链接它可以看[这里]({{site.baseurl}}/dev/projectsetup/dependencies.html)。
 
 Review comment:
   how about "二进制发行版” ?

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


With regards,
Apache Git Services

[GitHub] [flink] shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387437113
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -1509,18 +1466,17 @@ class MyPatternProcessFunction<IN, OUT> extends PatternProcessFunction<IN, OUT>
 }
 {% endhighlight %}
 
-The `PatternProcessFunction` gives access to a `Context` object. Thanks to it, one can access time related
-characteristics such as `currentProcessingTime` or `timestamp` of current match (which is the timestamp of the last element assigned to the match).
-For more info see [Time context](#time-context).
-Through this context one can also emit results to a [side-output]({{ site.baseurl }}/dev/stream/side_output.html).
+`PatternProcessFunction`可以访问`Context`对象。有了它之后,你可以访问时间属性比如`currentProcessingTime`或者当前匹配的`timestamp`
 
 Review comment:
   done

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


With regards,
Apache Git Services

[GitHub] [flink] shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387438680
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -1651,44 +1607,42 @@ val lateData: DataStream[String] = result.getSideOutput(lateDataOutputTag)
 </div>
 </div>
 
-### Time context
+### 时间上下文
 
-In [PatternProcessFunction](#selecting-from-patterns) as well as in [IterativeCondition](#conditions) user has access to a context
-that implements `TimeContext` as follows:
+在[PatternProcessFunction](#从模式中选取)中,用户可以和[IterativeCondition](#条件)中
+一样按照下面的方法使用实现了`TimeContext`的上下文:
 
 {% highlight java %}
 /**
- * Enables access to time related characteristics such as current processing time or timestamp of
- * currently processed element. Used in {@link PatternProcessFunction} and
- * {@link org.apache.flink.cep.pattern.conditions.IterativeCondition}
+ * 支持获取事件属性比如当前处理事件或当前正处理的事件的时间。
+ * 用在{@link PatternProcessFunction}和{@link org.apache.flink.cep.pattern.conditions.IterativeCondition}中
  */
 @PublicEvolving
 public interface TimeContext {
 
 	/**
-	 * Timestamp of the element currently being processed.
+	 * 当前正处理的事件的时间戳。
 	 *
-	 * <p>In case of {@link org.apache.flink.streaming.api.TimeCharacteristic#ProcessingTime} this
-	 * will be set to the time when event entered the cep operator.
+	 * <p>如果是{@link org.apache.flink.streaming.api.TimeCharacteristic#ProcessingTime},这个值会被设置为事件进入CEP算子的时间。
 	 */
 	long timestamp();
 
-	/** Returns the current processing time. */
+	/** 返回当前的处理时间。 */
 	long currentProcessingTime();
 }
 {% endhighlight %}
 
-This context gives user access to time characteristics of processed events (incoming records in case of `IterativeCondition` and matches in case of `PatternProcessFunction`).
-Call to `TimeContext#currentProcessingTime` always gives you the value of current processing time and this call should be preferred to e.g. calling `System.currentTimeMillis()`.
+这个上下文让用户可以获取处理的事件(在`IterativeCondition`时候是进来的记录,在`PatternProcessFunction`是匹配的结果)的时间属性。
+调用`TimeContext#currentProcessingTime`总是返回当前的处理时间,而且尽量去调用这个函数而不是调用其它的比如说`System.currentTimeMillis()`。
 
-In case of `TimeContext#timestamp()` the returned value is equal to assigned timestamp in case of `EventTime`. In `ProcessingTime` this will equal to the point of time when said event entered
-cep operator (or when the match was generated in case of `PatternProcessFunction`). This means that the value will be consistent across multiple calls to that method.
+使用`EventTime`时,`TimeContext#timestamp()`返回的值等于分配的时间戳。
+使用`ProcessingTime`是,这个值等于事件进入CEP算子的时间点(在`PatternProcessFunction`中是匹配产生的时间)。
 
 Review comment:
   done

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#issuecomment-589576910
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/149965664",
       "triggerID" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5794",
       "triggerID" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151296073",
       "triggerID" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76146c2111a47b68765168064b4d1dd90448789c",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151304506",
       "triggerID" : "76146c2111a47b68765168064b4d1dd90448789c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76146c2111a47b68765168064b4d1dd90448789c",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5800",
       "triggerID" : "76146c2111a47b68765168064b4d1dd90448789c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "829770f1ca71973e386bf808fd6b9d813179061b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5891",
       "triggerID" : "829770f1ca71973e386bf808fd6b9d813179061b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "829770f1ca71973e386bf808fd6b9d813179061b",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151669711",
       "triggerID" : "829770f1ca71973e386bf808fd6b9d813179061b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 76146c2111a47b68765168064b4d1dd90448789c Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/151304506) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5800) 
   * 829770f1ca71973e386bf808fd6b9d813179061b Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/151669711) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5891) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387040546
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -1509,18 +1466,17 @@ class MyPatternProcessFunction<IN, OUT> extends PatternProcessFunction<IN, OUT>
 }
 {% endhighlight %}
 
-The `PatternProcessFunction` gives access to a `Context` object. Thanks to it, one can access time related
-characteristics such as `currentProcessingTime` or `timestamp` of current match (which is the timestamp of the last element assigned to the match).
-For more info see [Time context](#time-context).
-Through this context one can also emit results to a [side-output]({{ site.baseurl }}/dev/stream/side_output.html).
+`PatternProcessFunction`可以访问`Context`对象。有了它之后,你可以访问时间属性比如`currentProcessingTime`或者当前匹配的`timestamp`
+(最新分配到匹配上的事件的时间戳).
 
 Review comment:
   . -> 。

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] libenchao commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
libenchao commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r382894111
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -136,140 +132,143 @@ val result: DataStream[Alert] = patternStream.process(
 </div>
 </div>
 
-## The Pattern API
+## 模式API
 
-The pattern API allows you to define complex pattern sequences that you want to extract from your input stream.
+模式API可以让你定义想从输入流中抽取的复杂模式序列。
 
-Each complex pattern sequence consists of multiple simple patterns, i.e. patterns looking for individual events with the same properties. From now on, we will call these simple patterns **patterns**, and the final complex pattern sequence we are searching for in the stream, the **pattern sequence**. You can see a pattern sequence as a graph of such patterns, where transitions from one pattern to the next occur based on user-specified
-*conditions*, e.g. `event.getName().equals("end")`. A **match** is a sequence of input events which visits all
-patterns of the complex pattern graph, through a sequence of valid pattern transitions.
+每个复杂的模式序列包括多个简单的模式,比如,寻找拥有相同属性事件序列的模式。从现在开始,我们把这些简单的模式称作**模式**,
+把我们在数据流中最终寻找的复杂模式序列称作**模式序列**,你可以把模式序列看作是这样的模式构成的图,
+这些模式基于用户指定的**条件**从一个转换到另外一个,比如 `event.getName().equals("end")`。
+一个**匹配**是输入事件的一个序列,这些事件通过一系列有效的模式转换,能够访问到复杂模式图中的所有模式。
 
-{% warn Attention %} Each pattern must have a unique name, which you use later to identify the matched events.
+{% warn Attention %} 每个模式必须有一个独一无二的名字,你可以在后面使用它来识别匹配到的事件。
 
-{% warn Attention %} Pattern names **CANNOT** contain the character `":"`.
+{% warn Attention %} 模式的名字不能包含字符`":"`.
 
-In the rest of this section we will first describe how to define [Individual Patterns](#individual-patterns), and then how you can combine individual patterns into [Complex Patterns](#combining-patterns).
+这一节的剩余部分我们会先讲述如何定义[单个模式](#单个模式),然后讲如何将单个模式组合成[复杂模式](#组合模式)。
 
-### Individual Patterns
+### 单个模式
 
-A **Pattern** can be either a *singleton* or a *looping* pattern. Singleton patterns accept a single
-event, while looping patterns can accept more than one. In pattern matching symbols, the pattern `"a b+ c? d"` (or `"a"`, followed by *one or more* `"b"`'s, optionally followed by a `"c"`, followed by a `"d"`), `a`, `c?`, and `d` are
-singleton patterns, while `b+` is a looping one. By default, a pattern is a singleton pattern and you can transform
-it to a looping one by using [Quantifiers](#quantifiers). Each pattern can have one or more
-[Conditions](#conditions) based on which it accepts events.
+一个**模式**可以是一个**单例**或者**循环**模式。单例模式只接受一个事件,循环模式可以接受多个事件。
+在模式匹配表达式中,模式`"a b+ c? d"`(或者`"a"`,后面跟着一个或者多个`"b"`,再往后可选择的跟着一个`"c"`,最后跟着一个`"d"`),
+`a`,`c?`,和 `d`都是单例模式,`b+`是一个循环模式。默认情况下,模式都是单例的,你可以通过使用[量词](#量词)把它们转换成循环模式。
+每个模式可以有一个或者多个[条件](#条件)来决定它接受哪些事件。
 
-#### Quantifiers
+#### 量词
 
-In FlinkCEP, you can specify looping patterns using these methods: `pattern.oneOrMore()`, for patterns that expect one or more occurrences of a given event (e.g. the `b+` mentioned before); and `pattern.times(#ofTimes)`, for patterns that
-expect a specific number of occurrences of a given type of event, e.g. 4 `a`'s; and `pattern.times(#fromTimes, #toTimes)`, for patterns that expect a specific minimum number of occurrences and a maximum number of occurrences of a given type of event, e.g. 2-4 `a`s.
+在FlinkCEP中,你可以通过这些方法指定循环模式:`pattern.oneOrMore()`,指定期望一个给定事件出现一次或者多次的模式(例如前面提到的`b+`模式);
+`pattern.times(#ofTimes)`,指定期望一个给定事件出现特定次数的模式,例如出现4次`a`;
+`pattern.times(#fromTimes, #toTimes)`,指定期望一个给定事件出现次数在一个最小值和最大值中间的模式,比如出现2-4次`a`。
 
-You can make looping patterns greedy using the `pattern.greedy()` method, but you cannot yet make group patterns greedy. You can make all patterns, looping or not, optional using the `pattern.optional()` method.
+你可以使用`pattern.greedy()`方法让循环模式变成贪心的,但现在还不能让模式组贪心。
+你可以使用`pattern.optional()`方法让所有的模式变成可选的,不管是否是循环模式。
 
-For a pattern named `start`, the following are valid quantifiers:
+对一个命名为`start`的模式,以下量词是有效的:
 
  <div class="codetabs" markdown="1">
  <div data-lang="java" markdown="1">
  {% highlight java %}
- // expecting 4 occurrences
+ // 期望出现4次
  start.times(4);
 
- // expecting 0 or 4 occurrences
+ // 期望出现0或者4次
  start.times(4).optional();
 
- // expecting 2, 3 or 4 occurrences
+ // 期望出现2、3或者4次
  start.times(2, 4);
 
- // expecting 2, 3 or 4 occurrences and repeating as many as possible
+ // 期望出现2、3或者4次,并且尽可能的重复次数多
  start.times(2, 4).greedy();
 
- // expecting 0, 2, 3 or 4 occurrences
+ // 期望出现0、2、3或者4次
  start.times(2, 4).optional();
 
- // expecting 0, 2, 3 or 4 occurrences and repeating as many as possible
+ // 期望出现0、2、3或者4次,并且尽可能的重复次数多
  start.times(2, 4).optional().greedy();
 
- // expecting 1 or more occurrences
+ // 期望出现1到多次
  start.oneOrMore();
 
- // expecting 1 or more occurrences and repeating as many as possible
+ // 期望出现1到多次,并且尽可能的重复次数多
  start.oneOrMore().greedy();
 
- // expecting 0 or more occurrences
+ // 期望出现0到多次
  start.oneOrMore().optional();
 
- // expecting 0 or more occurrences and repeating as many as possible
+ // 期望出现0到多次,并且尽可能的重复次数多
  start.oneOrMore().optional().greedy();
 
- // expecting 2 or more occurrences
+ // 期望出现2到多次
  start.timesOrMore(2);
 
- // expecting 2 or more occurrences and repeating as many as possible
+ // 期望出现2到多次,并且尽可能的重复次数多
  start.timesOrMore(2).greedy();
 
- // expecting 0, 2 or more occurrences and repeating as many as possible
+ // 期望出现0、2或多次
+ start.timesOrMore(2).optional();
+
+ // 期望出现0、2或多次,并且尽可能的重复次数多
  start.timesOrMore(2).optional().greedy();
  {% endhighlight %}
  </div>
 
  <div data-lang="scala" markdown="1">
  {% highlight scala %}
- // expecting 4 occurrences
+ // 期望出现4次
  start.times(4)
 
- // expecting 0 or 4 occurrences
+ // 期望出现0或者4次
  start.times(4).optional()
 
- // expecting 2, 3 or 4 occurrences
+ // 期望出现2、3或者4次
  start.times(2, 4)
 
- // expecting 2, 3 or 4 occurrences and repeating as many as possible
+ // 期望出现2、3或者4次,并且尽可能的重复次数多
  start.times(2, 4).greedy()
 
- // expecting 0, 2, 3 or 4 occurrences
+ // 期望出现0、2、3或者4次
  start.times(2, 4).optional()
 
- // expecting 0, 2, 3 or 4 occurrences and repeating as many as possible
+ // 期望出现0、2、3或者4次,并且尽可能的重复次数多
  start.times(2, 4).optional().greedy()
 
- // expecting 1 or more occurrences
+ // 期望出现1到多次
  start.oneOrMore()
 
- // expecting 1 or more occurrences and repeating as many as possible
+ // 期望出现1到多次,并且尽可能的重复次数多
  start.oneOrMore().greedy()
 
- // expecting 0 or more occurrences
+ // 期望出现0到多次
  start.oneOrMore().optional()
 
- // expecting 0 or more occurrences and repeating as many as possible
+ // 期望出现0到多次,并且尽可能的重复次数多
  start.oneOrMore().optional().greedy()
 
- // expecting 2 or more occurrences
+ // 期望出现2到多次
  start.timesOrMore(2)
 
- // expecting 2 or more occurrences and repeating as many as possible
+ // 期望出现2到多次,并且尽可能的重复次数多
  start.timesOrMore(2).greedy()
 
- // expecting 0, 2 or more occurrences
+ // 期望出现0、2或多次
  start.timesOrMore(2).optional()
 
- // expecting 0, 2 or more occurrences and repeating as many as possible
+ // 期望出现0、2或多次,并且尽可能的重复次数多
  start.timesOrMore(2).optional().greedy()
  {% endhighlight %}
  </div>
  </div>
 
-#### Conditions
+#### 条件
 
-For every pattern you can specify a condition that an incoming event has to meet in order to be "accepted" into the pattern e.g. its value should be larger than 5,
-or larger than the average value of the previously accepted events.
-You can specify conditions on the event properties via the `pattern.where()`, `pattern.or()` or `pattern.until()` methods.
-These can be either `IterativeCondition`s or `SimpleCondition`s.
+对每个模式你可以指定一个条件来决定一个进来的事件是否被接受进入模这个式,例如,它的value字段应该大于5,或者大于前面接受的事件的平均值。
 
 Review comment:
   是否被接受进入模这个式 -> 是否被接受进入这个模式

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387442140
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -445,15 +440,14 @@ pattern.where(new IterativeCondition<Event>() {
               <tr>
                  <td><strong>until(condition)</strong></td>
                  <td>
-                     <p>Specifies a stop condition for a looping pattern. Meaning if event matching the given condition occurs, no more
-                     events will be accepted into the pattern.</p>
-                     <p>Applicable only in conjunction with <code>oneOrMore()</code></p>
-                     <p><b>NOTE:</b> It allows for cleaning state for corresponding pattern on event-based condition.</p>
 
 Review comment:
   嗯,是的

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387440988
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -23,23 +23,20 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-FlinkCEP is the Complex Event Processing (CEP) library implemented on top of Flink.
-It allows you to detect event patterns in an endless stream of events, giving you the opportunity to get hold of what's important in your
-data.
+FlinkCEP是在Flink上层实现的复杂事件处理库。
+它可以让你在无限事件流中检测出特定的事件模型,有机会掌握数据中重要的那部分。
 
-This page describes the API calls available in Flink CEP. We start by presenting the [Pattern API](#the-pattern-api),
-which allows you to specify the patterns that you want to detect in your stream, before presenting how you can
-[detect and act upon matching event sequences](#detecting-patterns). We then present the assumptions the CEP
-library makes when [dealing with lateness](#handling-lateness-in-event-time) in event time and how you can
-[migrate your job](#migrating-from-an-older-flink-versionpre-13) from an older Flink version to Flink-1.3.
+本页讲述了Flink CEP中可用的API,我们首先讲述[模式API](#模式api),它可以让你指定想在数据流中检测的模式,然后讲述如何[检测匹配的事件序列并进行处理](#检测模式)。
+再然后我们讲述Flink在按照事件时间[处理迟到事件](#按照事件时间处理晚到事件)时的假设,
 
 Review comment:
   done

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#issuecomment-589576910
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/149965664",
       "triggerID" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5794",
       "triggerID" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151296073",
       "triggerID" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76146c2111a47b68765168064b4d1dd90448789c",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151304506",
       "triggerID" : "76146c2111a47b68765168064b4d1dd90448789c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76146c2111a47b68765168064b4d1dd90448789c",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5800",
       "triggerID" : "76146c2111a47b68765168064b4d1dd90448789c",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 76146c2111a47b68765168064b4d1dd90448789c Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/151304506) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5800) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387041879
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -1509,18 +1466,17 @@ class MyPatternProcessFunction<IN, OUT> extends PatternProcessFunction<IN, OUT>
 }
 {% endhighlight %}
 
-The `PatternProcessFunction` gives access to a `Context` object. Thanks to it, one can access time related
-characteristics such as `currentProcessingTime` or `timestamp` of current match (which is the timestamp of the last element assigned to the match).
-For more info see [Time context](#time-context).
-Through this context one can also emit results to a [side-output]({{ site.baseurl }}/dev/stream/side_output.html).
+`PatternProcessFunction`可以访问`Context`对象。有了它之后,你可以访问时间属性比如`currentProcessingTime`或者当前匹配的`timestamp`
+(最新分配到匹配上的事件的时间戳).
+更多信息可以看[时间上下文](#时间上下文)。
+通过这个上下文也可以将结果输出到[侧输出]({{ site.baseurl }}/zh/dev/stream/side_output.html).
 
 
-#### Handling Timed Out Partial Patterns
+#### 处理超时的部分匹配
 
-Whenever a pattern has a window length attached via the `within` keyword, it is possible that partial event sequences
-are discarded because they exceed the window length. To act upon a timed out partial match one can use `TimedOutPartialMatchHandler` interface.
-The interface is supposed to be used in a mixin style. This mean you can additionally implement this interface with your `PatternProcessFunction`.
-The `TimedOutPartialMatchHandler` provides the additional `processTimedOutMatch` method which will be called for every timed out partial match.
+当一个模式上通过`within`加上窗口长度后,部分匹配的事件序列就可能因为超过窗口长度而被丢弃。可以使用`TimedOutPartialMatchHandler`接口
+来处理超时的部分匹配。这个接口可以和其它的混合使用。也就是说你可以在自己的`PatternProcessFunction`里另外实现这个接口。
+`TimedOutPartialMatchHandler`提供了另外的`processTimedOutMatch`方法,这个方法对每个超时的部分匹配都对调用。
 
 Review comment:
   都对调用 -> 都会调用

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r386216501
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -665,12 +647,11 @@ pattern.oneOrMore().greedy()
 </div>
 </div>
 
-### Combining Patterns
+### 组合模式
 
-Now that you've seen what an individual pattern can look like, it is time to see how to combine them
-into a full pattern sequence.
+现在你已经看到单个的模式是什么样的了,改取看看如何把它们连接起来组成一个完整的模式序列。
 
 Review comment:
   done

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


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387002486
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -1651,44 +1607,42 @@ val lateData: DataStream[String] = result.getSideOutput(lateDataOutputTag)
 </div>
 </div>
 
-### Time context
+### 时间上下文
 
-In [PatternProcessFunction](#selecting-from-patterns) as well as in [IterativeCondition](#conditions) user has access to a context
-that implements `TimeContext` as follows:
+在[PatternProcessFunction](#从模式中选取)中,用户可以和[IterativeCondition](#条件)中
+一样按照下面的方法使用实现了`TimeContext`的上下文:
 
 {% highlight java %}
 /**
- * Enables access to time related characteristics such as current processing time or timestamp of
- * currently processed element. Used in {@link PatternProcessFunction} and
- * {@link org.apache.flink.cep.pattern.conditions.IterativeCondition}
+ * 支持获取事件属性比如当前处理事件或当前正处理的事件的时间。
+ * 用在{@link PatternProcessFunction}和{@link org.apache.flink.cep.pattern.conditions.IterativeCondition}中
  */
 @PublicEvolving
 public interface TimeContext {
 
 	/**
-	 * Timestamp of the element currently being processed.
+	 * 当前正处理的事件的时间戳。
 	 *
-	 * <p>In case of {@link org.apache.flink.streaming.api.TimeCharacteristic#ProcessingTime} this
-	 * will be set to the time when event entered the cep operator.
+	 * <p>如果是{@link org.apache.flink.streaming.api.TimeCharacteristic#ProcessingTime},这个值会被设置为事件进入CEP算子的时间。
 	 */
 	long timestamp();
 
-	/** Returns the current processing time. */
+	/** 返回当前的处理时间。 */
 	long currentProcessingTime();
 }
 {% endhighlight %}
 
-This context gives user access to time characteristics of processed events (incoming records in case of `IterativeCondition` and matches in case of `PatternProcessFunction`).
-Call to `TimeContext#currentProcessingTime` always gives you the value of current processing time and this call should be preferred to e.g. calling `System.currentTimeMillis()`.
+这个上下文让用户可以获取处理的事件(在`IterativeCondition`时候是进来的记录,在`PatternProcessFunction`是匹配的结果)的时间属性。
+调用`TimeContext#currentProcessingTime`总是返回当前的处理时间,而且尽量去调用这个函数而不是调用其它的比如说`System.currentTimeMillis()`。
 
-In case of `TimeContext#timestamp()` the returned value is equal to assigned timestamp in case of `EventTime`. In `ProcessingTime` this will equal to the point of time when said event entered
-cep operator (or when the match was generated in case of `PatternProcessFunction`). This means that the value will be consistent across multiple calls to that method.
+使用`EventTime`时,`TimeContext#timestamp()`返回的值等于分配的时间戳。
+使用`ProcessingTime`是,这个值等于事件进入CEP算子的时间点(在`PatternProcessFunction`中是匹配产生的时间)。
 
 Review comment:
   是 -> 时

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387438670
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -1598,17 +1554,17 @@ val timeoutResult: DataStream[TimeoutEvent] = result.getSideOutput(outputTag)
 </div>
 </div>
 
-## Time in CEP library
+## CEP库中的时间
 
-### Handling Lateness in Event Time
+### 按照事件时间处理晚到事件
 
-In `CEP` the order in which elements are processed matters. To guarantee that elements are processed in the correct order when working in event time, an incoming element is initially put in a buffer where elements are *sorted in ascending order based on their timestamp*, and when a watermark arrives, all the elements in this buffer with timestamps smaller than that of the watermark are processed. This implies that elements between watermarks are processed in event-time order.
+在`CEP`中,事件的处理顺序很重要。在使用事件时间时,为了保证事件按照正确的顺序被处理,一个事件到来后会先被放到一个缓冲区中,
+在缓冲区里事件都按照时间戳从小到大排序,当水位线到达后,缓冲区中所有小于水位线的事件被处理。这意味这水位线之间的数据都按照事件戳被顺序处理。
 
 Review comment:
   done

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


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387027890
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -335,88 +332,87 @@ start.where(event => event.getName.startsWith("foo"))
 </div>
 </div>
 
-Finally, you can also restrict the type of the accepted event to a subtype of the initial event type (here `Event`)
-via the `pattern.subtype(subClass)` method.
+最后,你可以通过`pattern.subtype(subClass)`方法限制接受的事件类型是初始事件的子类型。
 
 <div class="codetabs" markdown="1">
 <div data-lang="java" markdown="1">
 {% highlight java %}
 start.subtype(SubEvent.class).where(new SimpleCondition<SubEvent>() {
     @Override
     public boolean filter(SubEvent value) {
-        return ... // some condition
+        return ... // 一些判断条件
     }
 });
 {% endhighlight %}
 </div>
 
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
-start.subtype(classOf[SubEvent]).where(subEvent => ... /* some condition */)
+start.subtype(classOf[SubEvent]).where(subEvent => ... /* 一些判断条件 */)
 {% endhighlight %}
 </div>
 </div>
 
-**Combining Conditions:** As shown above, you can combine the `subtype` condition with additional conditions. This holds for every condition. You can arbitrarily combine conditions by sequentially calling `where()`. The final result will be the logical **AND** of the results of the individual conditions. To combine conditions using **OR**, you can use the `or()` method, as shown below.
+**组合条件:** 如上所示,你可以把`subtype`条件和其他的条件结合起来使用。这适用于任何条件,你可以通过依次调用`where()`来组合条件。
+最终的结果是是每个单一条件的结果的逻辑**AND**。如果想使用**OR**来组合条件,你可以使用像下面这样使用`or()`方法。
 
 Review comment:
   是是 -> 是
   使用像下面这样使用 -> 像下面这样使用

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387442283
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -736,41 +715,39 @@ Pattern<Event, ?> relaxedNot = start.notFollowedBy("not").where(...);
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
 
-// strict contiguity
+// 严格连续
 val strict: Pattern[Event, _] = start.next("middle").where(...)
 
-// relaxed contiguity
+// 松散连续
 val relaxed: Pattern[Event, _] = start.followedBy("middle").where(...)
 
-// non-deterministic relaxed contiguity
+// 不确定的松散连续
 val nonDetermin: Pattern[Event, _] = start.followedByAny("middle").where(...)
 
-// NOT pattern with strict contiguity
+// 严格连续的NOT模式
 val strictNot: Pattern[Event, _] = start.notNext("not").where(...)
 
-// NOT pattern with relaxed contiguity
+// 松散连续的NOT模式
 val relaxedNot: Pattern[Event, _] = start.notFollowedBy("not").where(...)
 
 {% endhighlight %}
 </div>
 </div>
 
-Relaxed contiguity means that only the first succeeding matching event will be matched, while
-with non-deterministic relaxed contiguity, multiple matches will be emitted for the same beginning. As an example,
-a pattern `"a b"`, given the event sequence `"a", "c", "b1", "b2"`, will give the following results:
+松散连续意味着跟着的事件中,只有第一个可匹配的事件会被匹配上,而不确定的松散连接情况下,有着同样起始的多个匹配会被输出。
+举例来说,模式`"a b"`,给定事件序列`"a","c","b1","b2"`,会产生如下的结果:
 
-1. Strict Contiguity between `"a"` and `"b"`: `{}` (no match), the `"c"` after `"a"` causes `"a"` to be discarded.
+1. `"a"`和`"b"`之间严格连续: `{}` (没有匹配),`"a"`之后的`"c"`导致`"a"`被丢弃。
 
-2. Relaxed Contiguity between `"a"` and `"b"`: `{a b1}`, as relaxed continuity is viewed as "skip non-matching events
-till the next matching one".
+2. `"a"`和`"b"`之间松散连续: `{a b1}`,松散连续会"跳过不匹配的事件直到匹配上的事件"。
 
-3. Non-Deterministic Relaxed Contiguity between `"a"` and `"b"`: `{a b1}`, `{a b2}`, as this is the most general form.
+3. `"a"`和`"b"`之间不确定的松散连续: `{a b1}`, `{a b2}`,这是最常见的情况。
 
-It's also possible to define a temporal constraint for the pattern to be valid.
-For example, you can define that a pattern should occur within 10 seconds via the `pattern.within()` method.
-Temporal patterns are supported for both [processing and event time]({{site.baseurl}}/dev/event_time.html).
+也可以为模式定义一个有效时间约束。
+例如,你可以通过`pattern.within()`方法指定一个模式应该在10秒内发生。
+这种暂时的模式支持[处理时间和事件时间]({{site.baseurl}}/zh/dev/event_time.html).
 
 Review comment:
   叫时间模式吧,这个好像合适一点

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387036342
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -736,41 +715,39 @@ Pattern<Event, ?> relaxedNot = start.notFollowedBy("not").where(...);
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
 
-// strict contiguity
+// 严格连续
 val strict: Pattern[Event, _] = start.next("middle").where(...)
 
-// relaxed contiguity
+// 松散连续
 val relaxed: Pattern[Event, _] = start.followedBy("middle").where(...)
 
-// non-deterministic relaxed contiguity
+// 不确定的松散连续
 val nonDetermin: Pattern[Event, _] = start.followedByAny("middle").where(...)
 
-// NOT pattern with strict contiguity
+// 严格连续的NOT模式
 val strictNot: Pattern[Event, _] = start.notNext("not").where(...)
 
-// NOT pattern with relaxed contiguity
+// 松散连续的NOT模式
 val relaxedNot: Pattern[Event, _] = start.notFollowedBy("not").where(...)
 
 {% endhighlight %}
 </div>
 </div>
 
-Relaxed contiguity means that only the first succeeding matching event will be matched, while
-with non-deterministic relaxed contiguity, multiple matches will be emitted for the same beginning. As an example,
-a pattern `"a b"`, given the event sequence `"a", "c", "b1", "b2"`, will give the following results:
+松散连续意味着跟着的事件中,只有第一个可匹配的事件会被匹配上,而不确定的松散连接情况下,有着同样起始的多个匹配会被输出。
+举例来说,模式`"a b"`,给定事件序列`"a","c","b1","b2"`,会产生如下的结果:
 
-1. Strict Contiguity between `"a"` and `"b"`: `{}` (no match), the `"c"` after `"a"` causes `"a"` to be discarded.
+1. `"a"`和`"b"`之间严格连续: `{}` (没有匹配),`"a"`之后的`"c"`导致`"a"`被丢弃。
 
-2. Relaxed Contiguity between `"a"` and `"b"`: `{a b1}`, as relaxed continuity is viewed as "skip non-matching events
-till the next matching one".
+2. `"a"`和`"b"`之间松散连续: `{a b1}`,松散连续会"跳过不匹配的事件直到匹配上的事件"。
 
-3. Non-Deterministic Relaxed Contiguity between `"a"` and `"b"`: `{a b1}`, `{a b2}`, as this is the most general form.
+3. `"a"`和`"b"`之间不确定的松散连续: `{a b1}`, `{a b2}`,这是最常见的情况。
 
-It's also possible to define a temporal constraint for the pattern to be valid.
-For example, you can define that a pattern should occur within 10 seconds via the `pattern.within()` method.
-Temporal patterns are supported for both [processing and event time]({{site.baseurl}}/dev/event_time.html).
+也可以为模式定义一个有效时间约束。
+例如,你可以通过`pattern.within()`方法指定一个模式应该在10秒内发生。
+这种暂时的模式支持[处理时间和事件时间]({{site.baseurl}}/zh/dev/event_time.html).
 
-{% warn Attention %} A pattern sequence can only have one temporal constraint. If multiple such constraints are defined on different individual patterns, then the smallest is applied.
+{% warn 注意 %} 一个模式序列只能有一个时间限制。如果在限制了多个时间在不同的单个模式上,会使用最小的那个时间限制。
 
 Review comment:
   如果在限制了多个时间在不同的 -> 如果限制了多个不同的时间在

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387039738
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -1509,18 +1466,17 @@ class MyPatternProcessFunction<IN, OUT> extends PatternProcessFunction<IN, OUT>
 }
 {% endhighlight %}
 
-The `PatternProcessFunction` gives access to a `Context` object. Thanks to it, one can access time related
-characteristics such as `currentProcessingTime` or `timestamp` of current match (which is the timestamp of the last element assigned to the match).
-For more info see [Time context](#time-context).
-Through this context one can also emit results to a [side-output]({{ site.baseurl }}/dev/stream/side_output.html).
+`PatternProcessFunction`可以访问`Context`对象。有了它之后,你可以访问时间属性比如`currentProcessingTime`或者当前匹配的`timestamp`
 
 Review comment:
   你可以访问时间属性 后面加个逗号?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] libenchao commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
libenchao commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r382893837
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -23,23 +23,20 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-FlinkCEP is the Complex Event Processing (CEP) library implemented on top of Flink.
-It allows you to detect event patterns in an endless stream of events, giving you the opportunity to get hold of what's important in your
-data.
+FlinkCEP是在Flink上层实现的复杂事件处理库。
+它可以让你在无限事件流中检测出特定的事件模型,有机会掌握数据中重要的那部分。
 
-This page describes the API calls available in Flink CEP. We start by presenting the [Pattern API](#the-pattern-api),
-which allows you to specify the patterns that you want to detect in your stream, before presenting how you can
-[detect and act upon matching event sequences](#detecting-patterns). We then present the assumptions the CEP
-library makes when [dealing with lateness](#handling-lateness-in-event-time) in event time and how you can
-[migrate your job](#migrating-from-an-older-flink-versionpre-13) from an older Flink version to Flink-1.3.
+本页讲述了Flink CEP中可用的API,我们首先讲述[模式API](#模式api),它可以让你指定想在数据流中检测的模式,然后讲述如何[检测匹配的事件序列并进行处理](#检测模式)。
+再然后我们讲述Flink在按照事件时间[处理迟到事件](#按照事件时间处理晚到事件)时的假设,
+以及如何从旧版本的Flink向1.3之后的版本[迁移作业](#从旧版本迁移13之前)。
 
 * This will be replaced by the TOC
 {:toc}
 
-## Getting Started
+## 开始
 
-If you want to jump right in, [set up a Flink program]({{ site.baseurl }}/dev/projectsetup/dependencies.html) and
-add the FlinkCEP dependency to the `pom.xml` of your project.
+如果你想现在开始尝试,[创建一个Flink程序]({{ site.baseurl }}/dev/projectsetup/dependencies.html),
 
 Review comment:
   +n to all other links

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


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387058688
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -1750,31 +1704,25 @@ val alerts = patternStream.select(createAlert(_))
 </div>
 </div>
 
-## Migrating from an older Flink version(pre 1.3)
+## 从旧版本迁移(1.3之前)
 
-### Migrating to 1.4+
+### 迁移到1.4+
 
-In Flink-1.4 the backward compatibility of CEP library with <= Flink 1.2 was dropped. Unfortunately 
-it is not possible to restore a CEP job that was once run with 1.2.x
+在Flink-1.4放弃了和<= Flink 1.2版本的兼容性。很不幸,不能再恢复用1.2.x运行过的CEP作业。
 
-### Migrating to 1.3.x
+### 迁移到1.3.x
 
-The CEP library in Flink-1.3 ships with a number of new features which have led to some changes in the API. Here we
-describe the changes that you need to make to your old CEP jobs, in order to be able to run them with Flink-1.3. After
-making these changes and recompiling your job, you will be able to resume its execution from a savepoint taken with the
-old version of your job, *i.e.* without having to re-process your past data.
+CEP库在Flink-1.3发布的一系列的新特性引入了一些API上的修改。这里我们描述你需要对旧的CEP作业所做的修改,以能够用Flink-1.3来运行它们。
+在做完这些修改并重新编译你的作业之后,可以从旧版本作业的保存点之后继续运行,*也就是说*不需要再重新处理旧的数据。
 
-The changes required are:
+需要的修改是:
 
-1. Change your conditions (the ones in the `where(...)` clause) to extend the `SimpleCondition` class instead of
-implementing the `FilterFunction` interface.
+1. 修改你的条件(在`where(...)`语句中的)来继承`SimpleCondition`类而不是实现`FilterFunction`接口。
 
-2. Change your functions provided as arguments to the `select(...)` and `flatSelect(...)` methods to expect a list of
-events associated with each pattern (`List` in `Java`, `Iterable` in `Scala`). This is because with the addition of
-the looping patterns, multiple input events can match a single (looping) pattern.
+2. 修改你作为`select(...)`和`flatSelect(...)`方法的参数的函数为期望每个模式关联一个事件列表(`Java`中`List`,`Scala`中`Iterable`)。
+这是因为增加了循环模式后,多个事件可能匹配一个单一的(循环)模式。
 
-3. The `followedBy()` in Flink 1.1 and 1.2 implied `non-deterministic relaxed contiguity` (see
-[here](#conditions-on-contiguity)). In Flink 1.3 this has changed and `followedBy()` implies `relaxed contiguity`,
-while `followedByAny()` should be used if `non-deterministic relaxed contiguity` is required.
+3. 在Flink 1.1和1.2中,`followedBy()` in Flink 1.1 and 1.2隐含了`不确定的松散连续` (参见[这里](#组合模式))。
 
 Review comment:
   and -> 和

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#issuecomment-589576910
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/149965664",
       "triggerID" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5794",
       "triggerID" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151296073",
       "triggerID" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76146c2111a47b68765168064b4d1dd90448789c",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "76146c2111a47b68765168064b4d1dd90448789c",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7546b4bef354ec3acb52245f867c3338107d0995 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/151296073) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5794) 
   * 76146c2111a47b68765168064b4d1dd90448789c 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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#issuecomment-589576910
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/149965664",
       "triggerID" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5794",
       "triggerID" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151296073",
       "triggerID" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7546b4bef354ec3acb52245f867c3338107d0995 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/151296073) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5794) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387042710
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -1598,17 +1554,17 @@ val timeoutResult: DataStream[TimeoutEvent] = result.getSideOutput(outputTag)
 </div>
 </div>
 
-## Time in CEP library
+## CEP库中的时间
 
-### Handling Lateness in Event Time
+### 按照事件时间处理晚到事件
 
-In `CEP` the order in which elements are processed matters. To guarantee that elements are processed in the correct order when working in event time, an incoming element is initially put in a buffer where elements are *sorted in ascending order based on their timestamp*, and when a watermark arrives, all the elements in this buffer with timestamps smaller than that of the watermark are processed. This implies that elements between watermarks are processed in event-time order.
+在`CEP`中,事件的处理顺序很重要。在使用事件时间时,为了保证事件按照正确的顺序被处理,一个事件到来后会先被放到一个缓冲区中,
+在缓冲区里事件都按照时间戳从小到大排序,当水位线到达后,缓冲区中所有小于水位线的事件被处理。这意味这水位线之间的数据都按照事件戳被顺序处理。
 
 Review comment:
   事件戳 -> 时间戳

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#issuecomment-589576910
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/149965664",
       "triggerID" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5794",
       "triggerID" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151296073",
       "triggerID" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76146c2111a47b68765168064b4d1dd90448789c",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151304506",
       "triggerID" : "76146c2111a47b68765168064b4d1dd90448789c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76146c2111a47b68765168064b4d1dd90448789c",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5800",
       "triggerID" : "76146c2111a47b68765168064b4d1dd90448789c",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 76146c2111a47b68765168064b4d1dd90448789c Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/151304506) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5800) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387438639
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -136,140 +132,143 @@ val result: DataStream[Alert] = patternStream.process(
 </div>
 </div>
 
-## The Pattern API
+## 模式API
 
-The pattern API allows you to define complex pattern sequences that you want to extract from your input stream.
+模式API可以让你定义想从输入流中抽取的复杂模式序列。
 
-Each complex pattern sequence consists of multiple simple patterns, i.e. patterns looking for individual events with the same properties. From now on, we will call these simple patterns **patterns**, and the final complex pattern sequence we are searching for in the stream, the **pattern sequence**. You can see a pattern sequence as a graph of such patterns, where transitions from one pattern to the next occur based on user-specified
-*conditions*, e.g. `event.getName().equals("end")`. A **match** is a sequence of input events which visits all
-patterns of the complex pattern graph, through a sequence of valid pattern transitions.
+每个复杂的模式序列包括多个简单的模式,比如,寻找拥有相同属性事件序列的模式。从现在开始,我们把这些简单的模式称作**模式**,
+把我们在数据流中最终寻找的复杂模式序列称作**模式序列**,你可以把模式序列看作是这样的模式构成的图,
+这些模式基于用户指定的**条件**从一个转换到另外一个,比如 `event.getName().equals("end")`。
+一个**匹配**是输入事件的一个序列,这些事件通过一系列有效的模式转换,能够访问到复杂模式图中的所有模式。
 
-{% warn Attention %} Each pattern must have a unique name, which you use later to identify the matched events.
+{% warn 注意 %} 每个模式必须有一个独一无二的名字,你可以在后面使用它来识别匹配到的事件。
 
-{% warn Attention %} Pattern names **CANNOT** contain the character `":"`.
+{% warn 注意 %} 模式的名字不能包含字符`":"`.
 
-In the rest of this section we will first describe how to define [Individual Patterns](#individual-patterns), and then how you can combine individual patterns into [Complex Patterns](#combining-patterns).
+这一节的剩余部分我们会先讲述如何定义[单个模式](#单个模式),然后讲如何将单个模式组合成[复杂模式](#组合模式)。
 
-### Individual Patterns
+### 单个模式
 
-A **Pattern** can be either a *singleton* or a *looping* pattern. Singleton patterns accept a single
-event, while looping patterns can accept more than one. In pattern matching symbols, the pattern `"a b+ c? d"` (or `"a"`, followed by *one or more* `"b"`'s, optionally followed by a `"c"`, followed by a `"d"`), `a`, `c?`, and `d` are
-singleton patterns, while `b+` is a looping one. By default, a pattern is a singleton pattern and you can transform
-it to a looping one by using [Quantifiers](#quantifiers). Each pattern can have one or more
-[Conditions](#conditions) based on which it accepts events.
+一个**模式**可以是一个**单例**或者**循环**模式。单例模式只接受一个事件,循环模式可以接受多个事件。
+在模式匹配表达式中,模式`"a b+ c? d"`(或者`"a"`,后面跟着一个或者多个`"b"`,再往后可选择的跟着一个`"c"`,最后跟着一个`"d"`),
+`a`,`c?`,和 `d`都是单例模式,`b+`是一个循环模式。默认情况下,模式都是单例的,你可以通过使用[量词](#量词)把它们转换成循环模式。
+每个模式可以有一个或者多个[条件](#条件)来决定它接受哪些事件。
 
-#### Quantifiers
+#### 量词
 
-In FlinkCEP, you can specify looping patterns using these methods: `pattern.oneOrMore()`, for patterns that expect one or more occurrences of a given event (e.g. the `b+` mentioned before); and `pattern.times(#ofTimes)`, for patterns that
-expect a specific number of occurrences of a given type of event, e.g. 4 `a`'s; and `pattern.times(#fromTimes, #toTimes)`, for patterns that expect a specific minimum number of occurrences and a maximum number of occurrences of a given type of event, e.g. 2-4 `a`s.
+在FlinkCEP中,你可以通过这些方法指定循环模式:`pattern.oneOrMore()`,指定期望一个给定事件出现一次或者多次的模式(例如前面提到的`b+`模式);
+`pattern.times(#ofTimes)`,指定期望一个给定事件出现特定次数的模式,例如出现4次`a`;
+`pattern.times(#fromTimes, #toTimes)`,指定期望一个给定事件出现次数在一个最小值和最大值中间的模式,比如出现2-4次`a`。
 
-You can make looping patterns greedy using the `pattern.greedy()` method, but you cannot yet make group patterns greedy. You can make all patterns, looping or not, optional using the `pattern.optional()` method.
+你可以使用`pattern.greedy()`方法让循环模式变成贪心的,但现在还不能让模式组贪心。
+你可以使用`pattern.optional()`方法让所有的模式变成可选的,不管是否是循环模式。
 
-For a pattern named `start`, the following are valid quantifiers:
+对一个命名为`start`的模式,以下量词是有效的:
 
 <div class="codetabs" markdown="1">
 <div data-lang="java" markdown="1">
 {% highlight java %}
-// expecting 4 occurrences
+// 期望出现4次
 start.times(4);
 
-// expecting 0 or 4 occurrences
+// 期望出现0或者4次
 start.times(4).optional();
 
-// expecting 2, 3 or 4 occurrences
+// 期望出现2、3或者4次
 start.times(2, 4);
 
-// expecting 2, 3 or 4 occurrences and repeating as many as possible
+// 期望出现2、3或者4次,并且尽可能的重复次数多
 start.times(2, 4).greedy();
 
-// expecting 0, 2, 3 or 4 occurrences
+// 期望出现0、2、3或者4次
 start.times(2, 4).optional();
 
-// expecting 0, 2, 3 or 4 occurrences and repeating as many as possible
+// 期望出现0、2、3或者4次,并且尽可能的重复次数多
 start.times(2, 4).optional().greedy();
 
-// expecting 1 or more occurrences
+// 期望出现1到多次
 start.oneOrMore();
 
-// expecting 1 or more occurrences and repeating as many as possible
+// 期望出现1到多次,并且尽可能的重复次数多
 start.oneOrMore().greedy();
 
-// expecting 0 or more occurrences
+// 期望出现0到多次
 start.oneOrMore().optional();
 
-// expecting 0 or more occurrences and repeating as many as possible
+// 期望出现0到多次,并且尽可能的重复次数多
 start.oneOrMore().optional().greedy();
 
-// expecting 2 or more occurrences
+// 期望出现2到多次
 start.timesOrMore(2);
 
-// expecting 2 or more occurrences and repeating as many as possible
+// 期望出现2到多次,并且尽可能的重复次数多
 start.timesOrMore(2).greedy();
 
-// expecting 0, 2 or more occurrences and repeating as many as possible
+// 期望出现0、2或多次
+start.timesOrMore(2).optional();
+
+// 期望出现0、2或多次,并且尽可能的重复次数多
 start.timesOrMore(2).optional().greedy();
 {% endhighlight %}
 </div>
 
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
-// expecting 4 occurrences
+// 期望出现4次
 start.times(4)
 
-// expecting 0 or 4 occurrences
+// 期望出现0或者4次
 start.times(4).optional()
 
-// expecting 2, 3 or 4 occurrences
+// 期望出现2、3或者4次
 start.times(2, 4)
 
-// expecting 2, 3 or 4 occurrences and repeating as many as possible
+// 期望出现2、3或者4次,并且尽可能的重复次数多
 start.times(2, 4).greedy()
 
-// expecting 0, 2, 3 or 4 occurrences
+// 期望出现0、2、3或者4次
 start.times(2, 4).optional()
 
-// expecting 0, 2, 3 or 4 occurrences and repeating as many as possible
+// 期望出现0、2、3或者4次,并且尽可能的重复次数多
 start.times(2, 4).optional().greedy()
 
-// expecting 1 or more occurrences
+// 期望出现1到多次
 start.oneOrMore()
 
-// expecting 1 or more occurrences and repeating as many as possible
+// 期望出现1到多次,并且尽可能的重复次数多
 start.oneOrMore().greedy()
 
-// expecting 0 or more occurrences
+// 期望出现0到多次
 start.oneOrMore().optional()
 
-// expecting 0 or more occurrences and repeating as many as possible
+// 期望出现0到多次,并且尽可能的重复次数多
 start.oneOrMore().optional().greedy()
 
-// expecting 2 or more occurrences
+// 期望出现2到多次
 start.timesOrMore(2)
 
-// expecting 2 or more occurrences and repeating as many as possible
+// 期望出现2到多次,并且尽可能的重复次数多
 start.timesOrMore(2).greedy()
 
-// expecting 0, 2 or more occurrences
+// 期望出现0、2或多次
 start.timesOrMore(2).optional()
 
-// expecting 0, 2 or more occurrences and repeating as many as possible
+// 期望出现0、2或多次,并且尽可能的重复次数多
 start.timesOrMore(2).optional().greedy()
 {% endhighlight %}
 </div>
 </div>
 
-#### Conditions
+#### 条件
 
-For every pattern you can specify a condition that an incoming event has to meet in order to be "accepted" into the pattern e.g. its value should be larger than 5,
-or larger than the average value of the previously accepted events.
-You can specify conditions on the event properties via the `pattern.where()`, `pattern.or()` or `pattern.until()` methods.
-These can be either `IterativeCondition`s or `SimpleCondition`s.
+对每个模式你可以指定一个条件来决定一个进来的事件是否被接受进入这个模式,例如,它的value字段应该大于5,或者大于前面接受的事件的平均值。
+指定判断事件属性的条件可以通过`pattern.where()`、`pattern.or()`或者`pattern.until()`方法。
+这些可以是`IterativeCondition`或者`SimpleCondition`。
 
-**Iterative Conditions:** This is the most general type of condition. This is how you can specify a condition that
-accepts subsequent events based on properties of the previously accepted events or a statistic over a subset of them.
+**迭代条件:** 这是最普遍的条件类型。使用它可以指定一个基于前面已经被接受的事件的属性或者它们的一个子集的统计数据来决定是否接受时间序列的条件。
 
-Below is the code for an iterative condition that accepts the next event for a pattern named "middle" if its name starts
-with "foo", and if the sum of the prices of the previously accepted events for that pattern plus the price of the current event do not exceed the value of 5.0. Iterative conditions can be powerful, especially in combination with looping patterns, e.g. `oneOrMore()`.
+下面是一个迭代条件的代码,它接受"middle"模式下一个事件的名称开头是"foo", 并且前面已经匹配到的事件的加个加上这个事件的价格小于5.0。
 
 Review comment:
   done

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#issuecomment-589576910
 
 
   <!--
   Meta data
   Hash:8e08bdefc8f3a02ffdba8591620b4fea59889cc2 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/149965664 TriggerType:PUSH TriggerID:8e08bdefc8f3a02ffdba8591620b4fea59889cc2
   -->
   ## CI report:
   
   * 8e08bdefc8f3a02ffdba8591620b4fea59889cc2 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/149965664) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#issuecomment-589576910
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/149965664",
       "triggerID" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8e08bdefc8f3a02ffdba8591620b4fea59889cc2 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/149965664) 
   * 7546b4bef354ec3acb52245f867c3338107d0995 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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#issuecomment-589576910
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/149965664",
       "triggerID" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8e08bdefc8f3a02ffdba8591620b4fea59889cc2 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/149965664) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387029193
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -445,15 +440,14 @@ pattern.where(new IterativeCondition<Event>() {
               <tr>
                  <td><strong>until(condition)</strong></td>
                  <td>
-                     <p>Specifies a stop condition for a looping pattern. Meaning if event matching the given condition occurs, no more
-                     events will be accepted into the pattern.</p>
-                     <p>Applicable only in conjunction with <code>oneOrMore()</code></p>
-                     <p><b>NOTE:</b> It allows for cleaning state for corresponding pattern on event-based condition.</p>
 
 Review comment:
   NOTE -> 注意

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


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387029451
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -472,10 +465,10 @@ pattern.subtype(SubEvent.class);
        <tr>
           <td><strong>oneOrMore()</strong></td>
           <td>
-              <p>Specifies that this pattern expects at least one occurrence of a matching event.</p>
-              <p>By default a relaxed internal contiguity (between subsequent events) is used. For more info on
-              internal contiguity see <a href="#consecutive_java">consecutive</a>.</p>
-              <p><b>NOTE:</b> It is advised to use either <code>until()</code> or <code>within()</code> to enable state clearing</p>
 
 Review comment:
   NOTE -> 注意

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


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#issuecomment-589576910
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/149965664",
       "triggerID" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5794",
       "triggerID" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151296073",
       "triggerID" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 8e08bdefc8f3a02ffdba8591620b4fea59889cc2 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/149965664) 
   * 7546b4bef354ec3acb52245f867c3338107d0995 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/151296073) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5794) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r386216484
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -136,140 +132,143 @@ val result: DataStream[Alert] = patternStream.process(
 </div>
 </div>
 
-## The Pattern API
+## 模式API
 
-The pattern API allows you to define complex pattern sequences that you want to extract from your input stream.
+模式API可以让你定义想从输入流中抽取的复杂模式序列。
 
-Each complex pattern sequence consists of multiple simple patterns, i.e. patterns looking for individual events with the same properties. From now on, we will call these simple patterns **patterns**, and the final complex pattern sequence we are searching for in the stream, the **pattern sequence**. You can see a pattern sequence as a graph of such patterns, where transitions from one pattern to the next occur based on user-specified
-*conditions*, e.g. `event.getName().equals("end")`. A **match** is a sequence of input events which visits all
-patterns of the complex pattern graph, through a sequence of valid pattern transitions.
+每个复杂的模式序列包括多个简单的模式,比如,寻找拥有相同属性事件序列的模式。从现在开始,我们把这些简单的模式称作**模式**,
+把我们在数据流中最终寻找的复杂模式序列称作**模式序列**,你可以把模式序列看作是这样的模式构成的图,
+这些模式基于用户指定的**条件**从一个转换到另外一个,比如 `event.getName().equals("end")`。
+一个**匹配**是输入事件的一个序列,这些事件通过一系列有效的模式转换,能够访问到复杂模式图中的所有模式。
 
-{% warn Attention %} Each pattern must have a unique name, which you use later to identify the matched events.
+{% warn Attention %} 每个模式必须有一个独一无二的名字,你可以在后面使用它来识别匹配到的事件。
 
-{% warn Attention %} Pattern names **CANNOT** contain the character `":"`.
+{% warn Attention %} 模式的名字不能包含字符`":"`.
 
-In the rest of this section we will first describe how to define [Individual Patterns](#individual-patterns), and then how you can combine individual patterns into [Complex Patterns](#combining-patterns).
+这一节的剩余部分我们会先讲述如何定义[单个模式](#单个模式),然后讲如何将单个模式组合成[复杂模式](#组合模式)。
 
-### Individual Patterns
+### 单个模式
 
-A **Pattern** can be either a *singleton* or a *looping* pattern. Singleton patterns accept a single
-event, while looping patterns can accept more than one. In pattern matching symbols, the pattern `"a b+ c? d"` (or `"a"`, followed by *one or more* `"b"`'s, optionally followed by a `"c"`, followed by a `"d"`), `a`, `c?`, and `d` are
-singleton patterns, while `b+` is a looping one. By default, a pattern is a singleton pattern and you can transform
-it to a looping one by using [Quantifiers](#quantifiers). Each pattern can have one or more
-[Conditions](#conditions) based on which it accepts events.
+一个**模式**可以是一个**单例**或者**循环**模式。单例模式只接受一个事件,循环模式可以接受多个事件。
+在模式匹配表达式中,模式`"a b+ c? d"`(或者`"a"`,后面跟着一个或者多个`"b"`,再往后可选择的跟着一个`"c"`,最后跟着一个`"d"`),
+`a`,`c?`,和 `d`都是单例模式,`b+`是一个循环模式。默认情况下,模式都是单例的,你可以通过使用[量词](#量词)把它们转换成循环模式。
+每个模式可以有一个或者多个[条件](#条件)来决定它接受哪些事件。
 
-#### Quantifiers
+#### 量词
 
-In FlinkCEP, you can specify looping patterns using these methods: `pattern.oneOrMore()`, for patterns that expect one or more occurrences of a given event (e.g. the `b+` mentioned before); and `pattern.times(#ofTimes)`, for patterns that
-expect a specific number of occurrences of a given type of event, e.g. 4 `a`'s; and `pattern.times(#fromTimes, #toTimes)`, for patterns that expect a specific minimum number of occurrences and a maximum number of occurrences of a given type of event, e.g. 2-4 `a`s.
+在FlinkCEP中,你可以通过这些方法指定循环模式:`pattern.oneOrMore()`,指定期望一个给定事件出现一次或者多次的模式(例如前面提到的`b+`模式);
+`pattern.times(#ofTimes)`,指定期望一个给定事件出现特定次数的模式,例如出现4次`a`;
+`pattern.times(#fromTimes, #toTimes)`,指定期望一个给定事件出现次数在一个最小值和最大值中间的模式,比如出现2-4次`a`。
 
-You can make looping patterns greedy using the `pattern.greedy()` method, but you cannot yet make group patterns greedy. You can make all patterns, looping or not, optional using the `pattern.optional()` method.
+你可以使用`pattern.greedy()`方法让循环模式变成贪心的,但现在还不能让模式组贪心。
+你可以使用`pattern.optional()`方法让所有的模式变成可选的,不管是否是循环模式。
 
-For a pattern named `start`, the following are valid quantifiers:
+对一个命名为`start`的模式,以下量词是有效的:
 
  <div class="codetabs" markdown="1">
  <div data-lang="java" markdown="1">
  {% highlight java %}
- // expecting 4 occurrences
+ // 期望出现4次
  start.times(4);
 
- // expecting 0 or 4 occurrences
+ // 期望出现0或者4次
  start.times(4).optional();
 
- // expecting 2, 3 or 4 occurrences
+ // 期望出现2、3或者4次
  start.times(2, 4);
 
- // expecting 2, 3 or 4 occurrences and repeating as many as possible
+ // 期望出现2、3或者4次,并且尽可能的重复次数多
  start.times(2, 4).greedy();
 
- // expecting 0, 2, 3 or 4 occurrences
+ // 期望出现0、2、3或者4次
  start.times(2, 4).optional();
 
- // expecting 0, 2, 3 or 4 occurrences and repeating as many as possible
+ // 期望出现0、2、3或者4次,并且尽可能的重复次数多
  start.times(2, 4).optional().greedy();
 
- // expecting 1 or more occurrences
+ // 期望出现1到多次
  start.oneOrMore();
 
- // expecting 1 or more occurrences and repeating as many as possible
+ // 期望出现1到多次,并且尽可能的重复次数多
  start.oneOrMore().greedy();
 
- // expecting 0 or more occurrences
+ // 期望出现0到多次
  start.oneOrMore().optional();
 
- // expecting 0 or more occurrences and repeating as many as possible
+ // 期望出现0到多次,并且尽可能的重复次数多
  start.oneOrMore().optional().greedy();
 
- // expecting 2 or more occurrences
+ // 期望出现2到多次
  start.timesOrMore(2);
 
- // expecting 2 or more occurrences and repeating as many as possible
+ // 期望出现2到多次,并且尽可能的重复次数多
  start.timesOrMore(2).greedy();
 
- // expecting 0, 2 or more occurrences and repeating as many as possible
+ // 期望出现0、2或多次
+ start.timesOrMore(2).optional();
+
+ // 期望出现0、2或多次,并且尽可能的重复次数多
  start.timesOrMore(2).optional().greedy();
  {% endhighlight %}
  </div>
 
  <div data-lang="scala" markdown="1">
  {% highlight scala %}
- // expecting 4 occurrences
+ // 期望出现4次
  start.times(4)
 
- // expecting 0 or 4 occurrences
+ // 期望出现0或者4次
  start.times(4).optional()
 
- // expecting 2, 3 or 4 occurrences
+ // 期望出现2、3或者4次
  start.times(2, 4)
 
- // expecting 2, 3 or 4 occurrences and repeating as many as possible
+ // 期望出现2、3或者4次,并且尽可能的重复次数多
  start.times(2, 4).greedy()
 
- // expecting 0, 2, 3 or 4 occurrences
+ // 期望出现0、2、3或者4次
  start.times(2, 4).optional()
 
- // expecting 0, 2, 3 or 4 occurrences and repeating as many as possible
+ // 期望出现0、2、3或者4次,并且尽可能的重复次数多
  start.times(2, 4).optional().greedy()
 
- // expecting 1 or more occurrences
+ // 期望出现1到多次
  start.oneOrMore()
 
- // expecting 1 or more occurrences and repeating as many as possible
+ // 期望出现1到多次,并且尽可能的重复次数多
  start.oneOrMore().greedy()
 
- // expecting 0 or more occurrences
+ // 期望出现0到多次
  start.oneOrMore().optional()
 
- // expecting 0 or more occurrences and repeating as many as possible
+ // 期望出现0到多次,并且尽可能的重复次数多
  start.oneOrMore().optional().greedy()
 
- // expecting 2 or more occurrences
+ // 期望出现2到多次
  start.timesOrMore(2)
 
- // expecting 2 or more occurrences and repeating as many as possible
+ // 期望出现2到多次,并且尽可能的重复次数多
  start.timesOrMore(2).greedy()
 
- // expecting 0, 2 or more occurrences
+ // 期望出现0、2或多次
  start.timesOrMore(2).optional()
 
- // expecting 0, 2 or more occurrences and repeating as many as possible
+ // 期望出现0、2或多次,并且尽可能的重复次数多
  start.timesOrMore(2).optional().greedy()
  {% endhighlight %}
  </div>
  </div>
 
-#### Conditions
+#### 条件
 
-For every pattern you can specify a condition that an incoming event has to meet in order to be "accepted" into the pattern e.g. its value should be larger than 5,
-or larger than the average value of the previously accepted events.
-You can specify conditions on the event properties via the `pattern.where()`, `pattern.or()` or `pattern.until()` methods.
-These can be either `IterativeCondition`s or `SimpleCondition`s.
+对每个模式你可以指定一个条件来决定一个进来的事件是否被接受进入模这个式,例如,它的value字段应该大于5,或者大于前面接受的事件的平均值。
 
 Review comment:
   done

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


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387026588
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -136,140 +132,143 @@ val result: DataStream[Alert] = patternStream.process(
 </div>
 </div>
 
-## The Pattern API
+## 模式API
 
-The pattern API allows you to define complex pattern sequences that you want to extract from your input stream.
+模式API可以让你定义想从输入流中抽取的复杂模式序列。
 
-Each complex pattern sequence consists of multiple simple patterns, i.e. patterns looking for individual events with the same properties. From now on, we will call these simple patterns **patterns**, and the final complex pattern sequence we are searching for in the stream, the **pattern sequence**. You can see a pattern sequence as a graph of such patterns, where transitions from one pattern to the next occur based on user-specified
-*conditions*, e.g. `event.getName().equals("end")`. A **match** is a sequence of input events which visits all
-patterns of the complex pattern graph, through a sequence of valid pattern transitions.
+每个复杂的模式序列包括多个简单的模式,比如,寻找拥有相同属性事件序列的模式。从现在开始,我们把这些简单的模式称作**模式**,
+把我们在数据流中最终寻找的复杂模式序列称作**模式序列**,你可以把模式序列看作是这样的模式构成的图,
+这些模式基于用户指定的**条件**从一个转换到另外一个,比如 `event.getName().equals("end")`。
+一个**匹配**是输入事件的一个序列,这些事件通过一系列有效的模式转换,能够访问到复杂模式图中的所有模式。
 
-{% warn Attention %} Each pattern must have a unique name, which you use later to identify the matched events.
+{% warn 注意 %} 每个模式必须有一个独一无二的名字,你可以在后面使用它来识别匹配到的事件。
 
-{% warn Attention %} Pattern names **CANNOT** contain the character `":"`.
+{% warn 注意 %} 模式的名字不能包含字符`":"`.
 
-In the rest of this section we will first describe how to define [Individual Patterns](#individual-patterns), and then how you can combine individual patterns into [Complex Patterns](#combining-patterns).
+这一节的剩余部分我们会先讲述如何定义[单个模式](#单个模式),然后讲如何将单个模式组合成[复杂模式](#组合模式)。
 
-### Individual Patterns
+### 单个模式
 
-A **Pattern** can be either a *singleton* or a *looping* pattern. Singleton patterns accept a single
-event, while looping patterns can accept more than one. In pattern matching symbols, the pattern `"a b+ c? d"` (or `"a"`, followed by *one or more* `"b"`'s, optionally followed by a `"c"`, followed by a `"d"`), `a`, `c?`, and `d` are
-singleton patterns, while `b+` is a looping one. By default, a pattern is a singleton pattern and you can transform
-it to a looping one by using [Quantifiers](#quantifiers). Each pattern can have one or more
-[Conditions](#conditions) based on which it accepts events.
+一个**模式**可以是一个**单例**或者**循环**模式。单例模式只接受一个事件,循环模式可以接受多个事件。
+在模式匹配表达式中,模式`"a b+ c? d"`(或者`"a"`,后面跟着一个或者多个`"b"`,再往后可选择的跟着一个`"c"`,最后跟着一个`"d"`),
+`a`,`c?`,和 `d`都是单例模式,`b+`是一个循环模式。默认情况下,模式都是单例的,你可以通过使用[量词](#量词)把它们转换成循环模式。
+每个模式可以有一个或者多个[条件](#条件)来决定它接受哪些事件。
 
-#### Quantifiers
+#### 量词
 
-In FlinkCEP, you can specify looping patterns using these methods: `pattern.oneOrMore()`, for patterns that expect one or more occurrences of a given event (e.g. the `b+` mentioned before); and `pattern.times(#ofTimes)`, for patterns that
-expect a specific number of occurrences of a given type of event, e.g. 4 `a`'s; and `pattern.times(#fromTimes, #toTimes)`, for patterns that expect a specific minimum number of occurrences and a maximum number of occurrences of a given type of event, e.g. 2-4 `a`s.
+在FlinkCEP中,你可以通过这些方法指定循环模式:`pattern.oneOrMore()`,指定期望一个给定事件出现一次或者多次的模式(例如前面提到的`b+`模式);
+`pattern.times(#ofTimes)`,指定期望一个给定事件出现特定次数的模式,例如出现4次`a`;
+`pattern.times(#fromTimes, #toTimes)`,指定期望一个给定事件出现次数在一个最小值和最大值中间的模式,比如出现2-4次`a`。
 
-You can make looping patterns greedy using the `pattern.greedy()` method, but you cannot yet make group patterns greedy. You can make all patterns, looping or not, optional using the `pattern.optional()` method.
+你可以使用`pattern.greedy()`方法让循环模式变成贪心的,但现在还不能让模式组贪心。
+你可以使用`pattern.optional()`方法让所有的模式变成可选的,不管是否是循环模式。
 
-For a pattern named `start`, the following are valid quantifiers:
+对一个命名为`start`的模式,以下量词是有效的:
 
 <div class="codetabs" markdown="1">
 <div data-lang="java" markdown="1">
 {% highlight java %}
-// expecting 4 occurrences
+// 期望出现4次
 start.times(4);
 
-// expecting 0 or 4 occurrences
+// 期望出现0或者4次
 start.times(4).optional();
 
-// expecting 2, 3 or 4 occurrences
+// 期望出现2、3或者4次
 start.times(2, 4);
 
-// expecting 2, 3 or 4 occurrences and repeating as many as possible
+// 期望出现2、3或者4次,并且尽可能的重复次数多
 start.times(2, 4).greedy();
 
-// expecting 0, 2, 3 or 4 occurrences
+// 期望出现0、2、3或者4次
 start.times(2, 4).optional();
 
-// expecting 0, 2, 3 or 4 occurrences and repeating as many as possible
+// 期望出现0、2、3或者4次,并且尽可能的重复次数多
 start.times(2, 4).optional().greedy();
 
-// expecting 1 or more occurrences
+// 期望出现1到多次
 start.oneOrMore();
 
-// expecting 1 or more occurrences and repeating as many as possible
+// 期望出现1到多次,并且尽可能的重复次数多
 start.oneOrMore().greedy();
 
-// expecting 0 or more occurrences
+// 期望出现0到多次
 start.oneOrMore().optional();
 
-// expecting 0 or more occurrences and repeating as many as possible
+// 期望出现0到多次,并且尽可能的重复次数多
 start.oneOrMore().optional().greedy();
 
-// expecting 2 or more occurrences
+// 期望出现2到多次
 start.timesOrMore(2);
 
-// expecting 2 or more occurrences and repeating as many as possible
+// 期望出现2到多次,并且尽可能的重复次数多
 start.timesOrMore(2).greedy();
 
-// expecting 0, 2 or more occurrences and repeating as many as possible
+// 期望出现0、2或多次
+start.timesOrMore(2).optional();
+
+// 期望出现0、2或多次,并且尽可能的重复次数多
 start.timesOrMore(2).optional().greedy();
 {% endhighlight %}
 </div>
 
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
-// expecting 4 occurrences
+// 期望出现4次
 start.times(4)
 
-// expecting 0 or 4 occurrences
+// 期望出现0或者4次
 start.times(4).optional()
 
-// expecting 2, 3 or 4 occurrences
+// 期望出现2、3或者4次
 start.times(2, 4)
 
-// expecting 2, 3 or 4 occurrences and repeating as many as possible
+// 期望出现2、3或者4次,并且尽可能的重复次数多
 start.times(2, 4).greedy()
 
-// expecting 0, 2, 3 or 4 occurrences
+// 期望出现0、2、3或者4次
 start.times(2, 4).optional()
 
-// expecting 0, 2, 3 or 4 occurrences and repeating as many as possible
+// 期望出现0、2、3或者4次,并且尽可能的重复次数多
 start.times(2, 4).optional().greedy()
 
-// expecting 1 or more occurrences
+// 期望出现1到多次
 start.oneOrMore()
 
-// expecting 1 or more occurrences and repeating as many as possible
+// 期望出现1到多次,并且尽可能的重复次数多
 start.oneOrMore().greedy()
 
-// expecting 0 or more occurrences
+// 期望出现0到多次
 start.oneOrMore().optional()
 
-// expecting 0 or more occurrences and repeating as many as possible
+// 期望出现0到多次,并且尽可能的重复次数多
 start.oneOrMore().optional().greedy()
 
-// expecting 2 or more occurrences
+// 期望出现2到多次
 start.timesOrMore(2)
 
-// expecting 2 or more occurrences and repeating as many as possible
+// 期望出现2到多次,并且尽可能的重复次数多
 start.timesOrMore(2).greedy()
 
-// expecting 0, 2 or more occurrences
+// 期望出现0、2或多次
 start.timesOrMore(2).optional()
 
-// expecting 0, 2 or more occurrences and repeating as many as possible
+// 期望出现0、2或多次,并且尽可能的重复次数多
 start.timesOrMore(2).optional().greedy()
 {% endhighlight %}
 </div>
 </div>
 
-#### Conditions
+#### 条件
 
-For every pattern you can specify a condition that an incoming event has to meet in order to be "accepted" into the pattern e.g. its value should be larger than 5,
-or larger than the average value of the previously accepted events.
-You can specify conditions on the event properties via the `pattern.where()`, `pattern.or()` or `pattern.until()` methods.
-These can be either `IterativeCondition`s or `SimpleCondition`s.
+对每个模式你可以指定一个条件来决定一个进来的事件是否被接受进入这个模式,例如,它的value字段应该大于5,或者大于前面接受的事件的平均值。
+指定判断事件属性的条件可以通过`pattern.where()`、`pattern.or()`或者`pattern.until()`方法。
+这些可以是`IterativeCondition`或者`SimpleCondition`。
 
-**Iterative Conditions:** This is the most general type of condition. This is how you can specify a condition that
-accepts subsequent events based on properties of the previously accepted events or a statistic over a subset of them.
+**迭代条件:** 这是最普遍的条件类型。使用它可以指定一个基于前面已经被接受的事件的属性或者它们的一个子集的统计数据来决定是否接受时间序列的条件。
 
-Below is the code for an iterative condition that accepts the next event for a pattern named "middle" if its name starts
-with "foo", and if the sum of the prices of the previously accepted events for that pattern plus the price of the current event do not exceed the value of 5.0. Iterative conditions can be powerful, especially in combination with looping patterns, e.g. `oneOrMore()`.
+下面是一个迭代条件的代码,它接受"middle"模式下一个事件的名称开头是"foo", 并且前面已经匹配到的事件的加个加上这个事件的价格小于5.0。
 
 Review comment:
   删除“的加个”?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387438690
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -335,88 +332,87 @@ start.where(event => event.getName.startsWith("foo"))
 </div>
 </div>
 
-Finally, you can also restrict the type of the accepted event to a subtype of the initial event type (here `Event`)
-via the `pattern.subtype(subClass)` method.
+最后,你可以通过`pattern.subtype(subClass)`方法限制接受的事件类型是初始事件的子类型。
 
 <div class="codetabs" markdown="1">
 <div data-lang="java" markdown="1">
 {% highlight java %}
 start.subtype(SubEvent.class).where(new SimpleCondition<SubEvent>() {
     @Override
     public boolean filter(SubEvent value) {
-        return ... // some condition
+        return ... // 一些判断条件
     }
 });
 {% endhighlight %}
 </div>
 
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
-start.subtype(classOf[SubEvent]).where(subEvent => ... /* some condition */)
+start.subtype(classOf[SubEvent]).where(subEvent => ... /* 一些判断条件 */)
 {% endhighlight %}
 </div>
 </div>
 
-**Combining Conditions:** As shown above, you can combine the `subtype` condition with additional conditions. This holds for every condition. You can arbitrarily combine conditions by sequentially calling `where()`. The final result will be the logical **AND** of the results of the individual conditions. To combine conditions using **OR**, you can use the `or()` method, as shown below.
+**组合条件:** 如上所示,你可以把`subtype`条件和其他的条件结合起来使用。这适用于任何条件,你可以通过依次调用`where()`来组合条件。
+最终的结果是是每个单一条件的结果的逻辑**AND**。如果想使用**OR**来组合条件,你可以使用像下面这样使用`or()`方法。
 
 Review comment:
   done

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


With regards,
Apache Git Services

[GitHub] [flink] shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387441314
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -445,15 +440,14 @@ pattern.where(new IterativeCondition<Event>() {
               <tr>
                  <td><strong>until(condition)</strong></td>
                  <td>
-                     <p>Specifies a stop condition for a looping pattern. Meaning if event matching the given condition occurs, no more
-                     events will be accepted into the pattern.</p>
-                     <p>Applicable only in conjunction with <code>oneOrMore()</code></p>
-                     <p><b>NOTE:</b> It allows for cleaning state for corresponding pattern on event-based condition.</p>
 
 Review comment:
   叫提示更好一点吧

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#issuecomment-589576910
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/149965664",
       "triggerID" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5794",
       "triggerID" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "status" : "FAILURE",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151296073",
       "triggerID" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76146c2111a47b68765168064b4d1dd90448789c",
       "status" : "PENDING",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151304506",
       "triggerID" : "76146c2111a47b68765168064b4d1dd90448789c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76146c2111a47b68765168064b4d1dd90448789c",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5800",
       "triggerID" : "76146c2111a47b68765168064b4d1dd90448789c",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 7546b4bef354ec3acb52245f867c3338107d0995 Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/151296073) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5794) 
   * 76146c2111a47b68765168064b4d1dd90448789c Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/151304506) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5800) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
shuai-xu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387435614
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -1509,18 +1466,17 @@ class MyPatternProcessFunction<IN, OUT> extends PatternProcessFunction<IN, OUT>
 }
 {% endhighlight %}
 
-The `PatternProcessFunction` gives access to a `Context` object. Thanks to it, one can access time related
-characteristics such as `currentProcessingTime` or `timestamp` of current match (which is the timestamp of the last element assigned to the match).
-For more info see [Time context](#time-context).
-Through this context one can also emit results to a [side-output]({{ site.baseurl }}/dev/stream/side_output.html).
+`PatternProcessFunction`可以访问`Context`对象。有了它之后,你可以访问时间属性比如`currentProcessingTime`或者当前匹配的`timestamp`
+(最新分配到匹配上的事件的时间戳).
+更多信息可以看[时间上下文](#时间上下文)。
+通过这个上下文也可以将结果输出到[侧输出]({{ site.baseurl }}/zh/dev/stream/side_output.html).
 
 
-#### Handling Timed Out Partial Patterns
+#### 处理超时的部分匹配
 
-Whenever a pattern has a window length attached via the `within` keyword, it is possible that partial event sequences
-are discarded because they exceed the window length. To act upon a timed out partial match one can use `TimedOutPartialMatchHandler` interface.
-The interface is supposed to be used in a mixin style. This mean you can additionally implement this interface with your `PatternProcessFunction`.
-The `TimedOutPartialMatchHandler` provides the additional `processTimedOutMatch` method which will be called for every timed out partial match.
+当一个模式上通过`within`加上窗口长度后,部分匹配的事件序列就可能因为超过窗口长度而被丢弃。可以使用`TimedOutPartialMatchHandler`接口
+来处理超时的部分匹配。这个接口可以和其它的混合使用。也就是说你可以在自己的`PatternProcessFunction`里另外实现这个接口。
+`TimedOutPartialMatchHandler`提供了另外的`processTimedOutMatch`方法,这个方法对每个超时的部分匹配都对调用。
 
 Review comment:
   done

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


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
dianfu commented on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#issuecomment-594374801
 
 
   @shuai-xu Thanks for the update. Merging...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#issuecomment-589576910
 
 
   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/149965664",
       "triggerID" : "8e08bdefc8f3a02ffdba8591620b4fea59889cc2",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5794",
       "triggerID" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "triggerType" : "PUSH"
     }, {
       "hash" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151296073",
       "triggerID" : "7546b4bef354ec3acb52245f867c3338107d0995",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76146c2111a47b68765168064b4d1dd90448789c",
       "status" : "DELETED",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151304506",
       "triggerID" : "76146c2111a47b68765168064b4d1dd90448789c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "76146c2111a47b68765168064b4d1dd90448789c",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5800",
       "triggerID" : "76146c2111a47b68765168064b4d1dd90448789c",
       "triggerType" : "PUSH"
     }, {
       "hash" : "829770f1ca71973e386bf808fd6b9d813179061b",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5891",
       "triggerID" : "829770f1ca71973e386bf808fd6b9d813179061b",
       "triggerType" : "PUSH"
     }, {
       "hash" : "829770f1ca71973e386bf808fd6b9d813179061b",
       "status" : "SUCCESS",
       "url" : "https://travis-ci.com/flink-ci/flink/builds/151669711",
       "triggerID" : "829770f1ca71973e386bf808fd6b9d813179061b",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 829770f1ca71973e386bf808fd6b9d813179061b Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/151669711) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=5891) 
   
   <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


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387032631
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -736,41 +715,39 @@ Pattern<Event, ?> relaxedNot = start.notFollowedBy("not").where(...);
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
 
-// strict contiguity
+// 严格连续
 val strict: Pattern[Event, _] = start.next("middle").where(...)
 
-// relaxed contiguity
+// 松散连续
 val relaxed: Pattern[Event, _] = start.followedBy("middle").where(...)
 
-// non-deterministic relaxed contiguity
+// 不确定的松散连续
 val nonDetermin: Pattern[Event, _] = start.followedByAny("middle").where(...)
 
-// NOT pattern with strict contiguity
+// 严格连续的NOT模式
 val strictNot: Pattern[Event, _] = start.notNext("not").where(...)
 
-// NOT pattern with relaxed contiguity
+// 松散连续的NOT模式
 val relaxedNot: Pattern[Event, _] = start.notFollowedBy("not").where(...)
 
 {% endhighlight %}
 </div>
 </div>
 
-Relaxed contiguity means that only the first succeeding matching event will be matched, while
-with non-deterministic relaxed contiguity, multiple matches will be emitted for the same beginning. As an example,
-a pattern `"a b"`, given the event sequence `"a", "c", "b1", "b2"`, will give the following results:
+松散连续意味着跟着的事件中,只有第一个可匹配的事件会被匹配上,而不确定的松散连接情况下,有着同样起始的多个匹配会被输出。
+举例来说,模式`"a b"`,给定事件序列`"a","c","b1","b2"`,会产生如下的结果:
 
-1. Strict Contiguity between `"a"` and `"b"`: `{}` (no match), the `"c"` after `"a"` causes `"a"` to be discarded.
+1. `"a"`和`"b"`之间严格连续: `{}` (没有匹配),`"a"`之后的`"c"`导致`"a"`被丢弃。
 
-2. Relaxed Contiguity between `"a"` and `"b"`: `{a b1}`, as relaxed continuity is viewed as "skip non-matching events
-till the next matching one".
+2. `"a"`和`"b"`之间松散连续: `{a b1}`,松散连续会"跳过不匹配的事件直到匹配上的事件"。
 
-3. Non-Deterministic Relaxed Contiguity between `"a"` and `"b"`: `{a b1}`, `{a b2}`, as this is the most general form.
+3. `"a"`和`"b"`之间不确定的松散连续: `{a b1}`, `{a b2}`,这是最常见的情况。
 
-It's also possible to define a temporal constraint for the pattern to be valid.
-For example, you can define that a pattern should occur within 10 seconds via the `pattern.within()` method.
-Temporal patterns are supported for both [processing and event time]({{site.baseurl}}/dev/event_time.html).
+也可以为模式定义一个有效时间约束。
+例如,你可以通过`pattern.within()`方法指定一个模式应该在10秒内发生。
+这种暂时的模式支持[处理时间和事件时间]({{site.baseurl}}/zh/dev/event_time.html).
 
 Review comment:
   “暂时的”感觉不太准确,要不  “这种暂时的模式支持” -> “这种模式支持”?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r387028678
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -425,18 +421,17 @@ pattern.where(new IterativeCondition<Event>() {
         <tr>
             <td><strong>or(condition)</strong></td>
             <td>
-                <p>Adds a new condition which is ORed with an existing one. An event can match the pattern only if it
-                passes at least one of the conditions:</p>
+                <p>增加一个新的判断和当前的判断取或。一个事件只要满足至少一个判断条件就匹配到模式:</p>
 
 Review comment:
   增加一个新的判断 后面加个逗号?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
dianfu commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r386995217
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -335,88 +332,87 @@ start.where(event => event.getName.startsWith("foo"))
 </div>
 </div>
 
-Finally, you can also restrict the type of the accepted event to a subtype of the initial event type (here `Event`)
-via the `pattern.subtype(subClass)` method.
+最后,你可以通过`pattern.subtype(subClass)`方法限制接受的事件类型是初始事件的子类型。
 
 <div class="codetabs" markdown="1">
 <div data-lang="java" markdown="1">
 {% highlight java %}
 start.subtype(SubEvent.class).where(new SimpleCondition<SubEvent>() {
     @Override
     public boolean filter(SubEvent value) {
-        return ... // some condition
+        return ... // 一些判断条件
     }
 });
 {% endhighlight %}
 </div>
 
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
-start.subtype(classOf[SubEvent]).where(subEvent => ... /* some condition */)
+start.subtype(classOf[SubEvent]).where(subEvent => ... /* 一些判断条件 */)
 {% endhighlight %}
 </div>
 </div>
 
-**Combining Conditions:** As shown above, you can combine the `subtype` condition with additional conditions. This holds for every condition. You can arbitrarily combine conditions by sequentially calling `where()`. The final result will be the logical **AND** of the results of the individual conditions. To combine conditions using **OR**, you can use the `or()` method, as shown below.
+**组合条件:** 如上所示,你可以把`subtype`条件和其他的条件结合起来使用。这适用于任何条件,你可以通过依次调用`where()`来组合条件。
+最终的结果是是每个单一条件的结果的逻辑**AND**。如果想使用**OR**来组合条件,你可以使用像下面这样使用`or()`方法。
 
 Review comment:
   是是 -> 是

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] libenchao commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese

Posted by GitBox <gi...@apache.org>.
libenchao commented on a change in pull request #11168: [FLINK-16140] [docs-zh] Translate Event Processing (CEP) page into Chinese
URL: https://github.com/apache/flink/pull/11168#discussion_r382893750
 
 

 ##########
 File path: docs/dev/libs/cep.zh.md
 ##########
 @@ -23,23 +23,20 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-FlinkCEP is the Complex Event Processing (CEP) library implemented on top of Flink.
-It allows you to detect event patterns in an endless stream of events, giving you the opportunity to get hold of what's important in your
-data.
+FlinkCEP是在Flink上层实现的复杂事件处理库。
+它可以让你在无限事件流中检测出特定的事件模型,有机会掌握数据中重要的那部分。
 
-This page describes the API calls available in Flink CEP. We start by presenting the [Pattern API](#the-pattern-api),
-which allows you to specify the patterns that you want to detect in your stream, before presenting how you can
-[detect and act upon matching event sequences](#detecting-patterns). We then present the assumptions the CEP
-library makes when [dealing with lateness](#handling-lateness-in-event-time) in event time and how you can
-[migrate your job](#migrating-from-an-older-flink-versionpre-13) from an older Flink version to Flink-1.3.
+本页讲述了Flink CEP中可用的API,我们首先讲述[模式API](#模式api),它可以让你指定想在数据流中检测的模式,然后讲述如何[检测匹配的事件序列并进行处理](#检测模式)。
+再然后我们讲述Flink在按照事件时间[处理迟到事件](#按照事件时间处理晚到事件)时的假设,
+以及如何从旧版本的Flink向1.3之后的版本[迁移作业](#从旧版本迁移13之前)。
 
 * This will be replaced by the TOC
 {:toc}
 
-## Getting Started
+## 开始
 
-If you want to jump right in, [set up a Flink program]({{ site.baseurl }}/dev/projectsetup/dependencies.html) and
-add the FlinkCEP dependency to the `pom.xml` of your project.
+如果你想现在开始尝试,[创建一个Flink程序]({{ site.baseurl }}/dev/projectsetup/dependencies.html),
 
 Review comment:
   Add `/zh` to the link.

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


With regards,
Apache Git Services