ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roman Shtykh (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (IGNITE-4140) KafkaStreamer should use tuple extractor instead of decoders
Date Thu, 08 Dec 2016 00:35:59 GMT

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

Roman Shtykh edited comment on IGNITE-4140 at 12/8/16 12:35 AM:
----------------------------------------------------------------

[~avinogradov] My concern is -- we create the next 1.9 release from the master branch and
this modification will go into 1.9 release instead of 2.0. Is it a valid concern?


was (Author: roman_s):
@avinogradov My concern is -- we create the next 1.9 release from the master branch and this
modification will go into 1.9 release instead of 2.0. Is it a valid concern?

> KafkaStreamer should use tuple extractor instead of decoders
> ------------------------------------------------------------
>
>                 Key: IGNITE-4140
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4140
>             Project: Ignite
>          Issue Type: Improvement
>          Components: streaming
>    Affects Versions: 1.7
>            Reporter: Valentin Kulichenko
>            Assignee: Anil
>              Labels: patch-available
>             Fix For: 1.9
>
>
> Current design of {{KafkaStreamer}} looks incorrect to me. In particular, it extends
{{StreamAdapter}}, but ignores tuple extractors provided there and uses native Kafka decoders
instead. This for example makes impossible to produce several entries from one message, like
it can be done via {{StreamMultipleTupleExtractor}} in other streamers.
> To fix this, we should:
> # Declare the {{KafkaStreamer}} like this:
> {code}
> KafkaStreamer<K, V> extends StreamAdapter<MessageAndMetadata<byte[], byte[]>,
K, V>
> {code}
> # Remove {{keyDecoder}} and {{valDecoder}} in favor of tuple extractors.
> # Instead of doing {{getStreamer().addData(...)}} directly, call {{addMessage(...)}}
method providing the raw message consumed from Kafka ({{MessageAndMetadata<byte[], byte[]>}}).
This method will make sure that configured extractor is invoked and that all entries are added
to {{IgniteDataStreamer}}.



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

Mime
View raw message