You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "Jungtaek Lim (JIRA)" <ji...@apache.org> on 2016/08/31 04:06:20 UTC

[jira] [Commented] (STORM-2072) Add map, flatMap with different outputs (T->V) in Trident

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

Jungtaek Lim commented on STORM-2072:
-------------------------------------

And I have use case of MapFunction which needs to be initialized.
Unfortunately MapFunction and FlatMapFunction doesn't extends neither Function nor Operation.

In order to address my use case without breaking API change, I'd like to suggest 'OperationAware'MapFunction and 'OperationAware'FlatMapFunction, which just extend Operation. When we call map with OperationAwareFlatMapFunction or flatMap() with OperationAwareMapFunction, Trident will call prepare() and also cleanup().

> Add map, flatMap with different outputs (T->V) in Trident
> ---------------------------------------------------------
>
>                 Key: STORM-2072
>                 URL: https://issues.apache.org/jira/browse/STORM-2072
>             Project: Apache Storm
>          Issue Type: Improvement
>          Components: storm-core
>            Reporter: Jungtaek Lim
>            Assignee: Jungtaek Lim
>
> In STORM-1505 we introduced map, flatMap, filter to Trident which are more familiar than what Trident originally had (users had to use each and project to do the similar thing).
> Current version of map and flatMap assume next output fields are same to current output fields, in other words, supporting only T -> T conversion. But in many situations we need to have T -> V conversion.
> This issue adds T -> V conversion (via method overloading) to both map and flatMap.



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