[
https://issues.apache.org/jira/browse/STORM-1505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15123169#comment-15123169
]
ASF GitHub Bot commented on STORM-1505:
---------------------------------------
Github user arunmahadevan commented on the pull request:
https://github.com/apache/storm/pull/1050#issuecomment-176632790
@ptgoetz the current filter implementation on top of each appeared like a
kludge. see
https://github.com/apache/storm/blob/master/storm-core/src/jvm/org/apache/storm/trident/operation/impl/FilterExecutor.java#L38.
It does not appear to emit anything but apparently its taken care at some
other level. Also `each` operation always appends the input fields to the
output fields, so I directly implemented it via the MapProcessor. I can
refactor it as you mentioned to re-use the existing code.
@satishd `each` emits input fields plus the new fileds, and the Function
interface expects the implementor to emit within the function making it less of
a pure function. map with the MapFunction interface is closer to the map
operation in other streams.
> Add map, flatMap and filter operations in trident api
> -----------------------------------------------------
>
> Key: STORM-1505
> URL: https://issues.apache.org/jira/browse/STORM-1505
> Project: Apache Storm
> Issue Type: Improvement
> Reporter: Arun Mahadevan
> Assignee: Arun Mahadevan
>
> map and flatMap are common stream operations.
> Right now in trident this has to be implemented via each() which also sends
> the input field values in addition to the mapped field values, so the map and
> flatmap should make things slightly more efficient and easy.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)