Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-2295

KafkaSpoutStreamsNamedTopics changing the sequence of fields name while emitting data

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.x
    • Fix Version/s: 2.0.0, 1.1.0
    • Component/s: storm-kafka-client
    • Labels:
      None

      Description

      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.

      	@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));
      	}
      

      Changes needed is below

      final Set<String> allFields = new LinkedHashSet<>();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Sachin Sachin Pasalkar
                Reporter:
                Sachin Sachin Pasalkar
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m