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

Ihor Kashperskyi commented on STORM-2121:
-----------------------------------------

[~asmaier] please review [#1822|https://github.com/apache/storm/pull/1822]

> StringKeyValueScheme doesn't override getOutputFields()
> -------------------------------------------------------
>
>                 Key: STORM-2121
>                 URL: https://issues.apache.org/jira/browse/STORM-2121
>             Project: Apache Storm
>          Issue Type: Bug
>          Components: storm-kafka
>            Reporter: Andreas Maier
>
> In org.apache.storm.kafka StringKeyValueScheme extends StringScheme. However 
> it doesn't override the method getOutputFields() from StringScheme 
> {code}
> public Fields getOutputFields() {
>         return new Fields(STRING_SCHEME_KEY);
>     }
> {code}
> And this method returns only one field, instead of two (one for key and one 
> for value), which causes problems. 
> It would be better to override the method getOutputFields() in 
> StringKeyValueScheme with e.g. 
> {code}
>     @Override
>     public Fields getOutputFields() {
>         return new Fields(FieldNameBasedTupleToKafkaMapper.BOLT_KEY, 
> FieldNameBasedTupleToKafkaMapper.BOLT_MESSAGE);
>     }
> {code}
> The important thing is, that getOutputFields() should return two fields and 
> not one. 



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

Reply via email to