[ https://issues.apache.org/jira/browse/STORM-2295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jungtaek Lim resolved STORM-2295. --------------------------------- Resolution: Fixed Assignee: Sachin Pasalkar Fix Version/s: 1.1.0 2.0.0 Thanks [~Sachin], I merged into master and 1.x branches. > 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 > Assignee: Sachin Pasalkar > Priority: Blocker > Fix For: 2.0.0, 1.1.0 > > Time Spent: 1h 50m > Remaining Estimate: 0h > > 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)