From issues-return-169882-archive-asf-public=cust-asf.ponee.io@flink.apache.org Fri Jun 1 14:11:20 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id A906C180677 for ; Fri, 1 Jun 2018 14:11:19 +0200 (CEST) Received: (qmail 99837 invoked by uid 500); 1 Jun 2018 12:11:18 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 99813 invoked by uid 99); 1 Jun 2018 12:11:18 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Jun 2018 12:11:18 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9255DE0BE8; Fri, 1 Jun 2018 12:11:18 +0000 (UTC) From: dawidwys To: issues@flink.apache.org Reply-To: issues@flink.apache.org References: In-Reply-To: Subject: [GitHub] flink pull request #6104: [FLINK-9476]Emit late elements in CEP as sideOutPu... Content-Type: text/plain Message-Id: <20180601121118.9255DE0BE8@git1-us-west.apache.org> Date: Fri, 1 Jun 2018 12:11:18 +0000 (UTC) Github user dawidwys commented on a diff in the pull request: https://github.com/apache/flink/pull/6104#discussion_r192340339 --- Diff: docs/dev/libs/cep.md --- @@ -1524,7 +1524,52 @@ In `CEP` the order in which elements are processed matters. To guarantee that el To guarantee that elements across watermarks are processed in event-time order, Flink's CEP library assumes *correctness of the watermark*, and considers as *late* elements whose timestamp is smaller than that of the last -seen watermark. Late elements are not further processed. +seen watermark. Late elements are not further processed. Also, you can specify a sideOutput tag to collect the late elements come after the last seen watermark, you can use it like this. + +
+
+ +{% highlight java %} +PatternStream patternStream = CEP.pattern(input, pattern); + +OutputTag lateDataOutputTag = new OutputTag("late-data""){}; + +OutputTag outputTag = new OutputTag("side-output""){}; --- End diff -- I would use version without timed out results to simplify the example. ---