You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Kenneth Knowles (JIRA)" <ji...@apache.org> on 2016/11/04 18:05:58 UTC

[jira] [Commented] (BEAM-912) Trigger can be more flexible

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

Kenneth Knowles commented on BEAM-912:
--------------------------------------

Hello!

Your example does not actually seem to include triggers at all. Can you explain?

As for the suggestion itself: we have deliberately removed the {{onElement}} method and the rest of the state machine from Beam's triggers and made them "just syntax". There are a few reasons for this:

 - User-defined triggers are not cross-language, yet. We need to design a language-independent way for runners to invoke user-defined triggers.
 - Runners may actually have better ways of executing some triggers, so we don't want them to necessarily be black boxes.
 - There are many {{onElement}}-based state machines that are not correct triggers. Even the triggers we have today took a while to get right - they are not usable enough yet. So when we do create a cross-language cross-runner user-defined trigger API, it won't look like the current API, but will be more like the details I've added to BEAM-101. Basically a combiner and a predicate.


> Trigger can be more flexible
> ------------------------------
>
>                 Key: BEAM-912
>                 URL: https://issues.apache.org/jira/browse/BEAM-912
>             Project: Beam
>          Issue Type: New Feature
>          Components: beam-model
>            Reporter: Jingsong Lee
>            Assignee: Frances Perry
>
> 1.We can support some data-driven trigger, so we need expose data in OnElementContext of onElement method. 
> 2.We can support more flexible join, so we need expose buffer tag in TriggerContext, now this buffer tag is in SystemReduceFn.
> for example: SELECT STREAM * FROM Orders AS o JOIN Shipments AS s
> ON o.orderId = s.orderId AND s.rowtime BETWEEN o.rowtime AND o.rowtime + INTERVAL '1' HOUR;
> link: https://issues.apache.org/jira/browse/BEAM-101



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