Andreas Maier created STORM-2121:
------------------------------------
Summary: 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)