You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@storm.apache.org by "Sachin Pasalkar (JIRA)" <ji...@apache.org> on 2017/01/16 14:44:26 UTC
[jira] [Updated] (STORM-2295) KafkaSpoutStreamsNamedTopics changing
the sequence of fields name while emitting data
[ https://issues.apache.org/jira/browse/STORM-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sachin Pasalkar updated STORM-2295:
-----------------------------------
Affects Version/s: (was: 1.0.0)
1.x
> KafkaSpoutStreamsNamedTopics changing the sequence of fields name while emitting data
> -------------------------------------------------------------------------------------
>
> Key: STORM-2295
> URL: https://issues.apache.org/jira/browse/STORM-2295
> Project: Apache Storm
> Issue Type: Bug
> Components: storm-kafka-client
> Affects Versions: 1.x
> Reporter: Sachin Pasalkar
> Priority: Blocker
>
> If you look at below code *allFields* variable is HashSet. To which we have added the o/p of *kafkaSpoutStream.getOutputFields().toList()*. That sort data on hash basis rather than keeping same sequence.
> {code:java}
> @Override
> public Fields getOutputFields() {
> final Set<String> allFields = new HashSet<>();
> for (KafkaSpoutStream kafkaSpoutStream : topicToStream.values()) {
> allFields.addAll(kafkaSpoutStream.getOutputFields().toList());
> }
> return new Fields(new ArrayList<>(allFields));
> }
> {code}
> Changes needed is below
> {code:java}
> final Set<String> allFields = new LinkedHashSet<>();
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)