[
https://issues.apache.org/jira/browse/IGNITE-1370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14736683#comment-14736683
]
Raúl Kripalani commented on IGNITE-1370:
----------------------------------------
Hey Valentin,
Sorry for the delay. Yes, we can definitely do that. Currently I validate that
both are not null, but we can definitely add the extra validation if both are
set.
The reason why I wouldn't deprecate single altogether is that multiple forces
the user to create a Map. If you know your message will only ever return 1
tuple, creating a Map is extra overhead and leads to unnecessary GC.
However, I think we should rename StreamTupleExtractor to
Stream*Single*TupleExtractor. To do this without breaking the API I suggest we
perform the rename and then create StreamTupleExtractor again extending the new
StreamSingleTupleExtractor and marking it as @Deprecated.
What do you think?
> StreamTupleExtractor should allow extracting multiple tuples from a single
> event
> --------------------------------------------------------------------------------
>
> Key: IGNITE-1370
> URL: https://issues.apache.org/jira/browse/IGNITE-1370
> Project: Ignite
> Issue Type: Improvement
> Components: streaming
> Affects Versions: ignite-1.4
> Reporter: Raúl Kripalani
> Assignee: Raúl Kripalani
>
> Currently the {{StreamTupleExtractor}} interface contains a single method:
> {code}
> public Map.Entry<K, V> extract(T msg);
> {code}
> Which only allows extracting a single Entry from an incoming event.
> In real life, it could be that an event contains multiple entries.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)