Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E9559200BB6 for ; Fri, 4 Nov 2016 15:05:59 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E801B160AE8; Fri, 4 Nov 2016 14:05:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 3AFE8160AE9 for ; Fri, 4 Nov 2016 15:05:59 +0100 (CET) Received: (qmail 23844 invoked by uid 500); 4 Nov 2016 14:05:58 -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 23822 invoked by uid 99); 4 Nov 2016 14:05:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Nov 2016 14:05:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 5298A2C0087 for ; Fri, 4 Nov 2016 14:05:58 +0000 (UTC) Date: Fri, 4 Nov 2016 14:05:58 +0000 (UTC) From: "Jamie Grier (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (FLINK-5012) Provide Timestamp in TimelyFlatMapFunction MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 04 Nov 2016 14:06:00 -0000 [ https://issues.apache.org/jira/browse/FLINK-5012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15636428#comment-15636428 ] Jamie Grier edited comment on FLINK-5012 at 11/4/16 2:05 PM: ------------------------------------------------------------- Okay, makes sense about RuntimeContext.. I also like your "ideal" solution best -- or maybe: {code:java} void flatMap(I value, Context ctx) throws Exception; interface Context { Long timestamp(); TimerService timerService(); Collector collector(); } {code} Maybe the above is "close enough" to what people are used to since it still uses the Collector interface. was (Author: jgrier): Okay, makes sense about RuntimeContext.. I also like your "ideal" solution best -- or maybe: {code:java} void flatMap(I value, Context ctx) throws Exception; interface Context { Long timestamp(); TimerService timerService(); Collector collector(); } {code} > Provide Timestamp in TimelyFlatMapFunction > ------------------------------------------ > > Key: FLINK-5012 > URL: https://issues.apache.org/jira/browse/FLINK-5012 > Project: Flink > Issue Type: Improvement > Components: Streaming > Reporter: Aljoscha Krettek > > Right now, {{TimelyFlatMapFunction}} does not give the timestamp of the element in {{flatMap()}}. > The signature is currently this: > {code} > void flatMap(I value, TimerService timerService, Collector out) throws Exception; > {code} > if we add the timestamp it would become this: > {code} > void flatMap(I value, Long timestamp, TimerService timerService, Collector out) throws Exception; > {code} > The reason why it's a {{Long}} and not a {{long}} is that an element might not have a timestamp, in that case we should hand in {{null}} here. > This is becoming quite look so we could add a {{Context}} parameter that provides access to the timestamp and timer service. -- This message was sent by Atlassian JIRA (v6.3.4#6332)