You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@edgent.apache.org by "Will Marshall (JIRA)" <ji...@apache.org> on 2016/08/24 17:44:20 UTC

[jira] [Commented] (EDGENT-231) Add event-time time-based windows

    [ https://issues.apache.org/jira/browse/EDGENT-231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15435374#comment-15435374 ] 

Will Marshall commented on EDGENT-231:
--------------------------------------

To make sure I understand, *timestampFn* is a function which takes a tuple and produces a long representing epoch time (in ms)  ?

> Add event-time time-based windows
> ---------------------------------
>
>                 Key: EDGENT-231
>                 URL: https://issues.apache.org/jira/browse/EDGENT-231
>             Project: Edgent
>          Issue Type: New Feature
>            Reporter: Dale LaBossiere
>
> TStream.last(period,unit,keyFn) creates an insertion-time time-based TWindow - a tuple's timestamp, hence its lifetime in the time-based window, is based on the time it is inserted into the window.
> On a couple of occasions some folks have asked about event-time time-based windows - a tuple's timestamp (event-time) is present as a property in the tuple and that timestamp is used for insertion and eviction processing.  Tuples need not be added to the window in their event-time order though the partition contents are maintained in event-time order.
> The TStream API for such a time-based window could be:
> ```
>     <K> TWindow<T, K> last(long time, TimeUnit unit, Function<T, K> keyFunction, ToLongFunction<T> timestampFn);
> ```
> See also: QUARKS-230



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)