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

KafkaSpoutStreamsNamedTopics changing the sequence of fields name while emitting data

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.x
    • 2.0.0, 1.1.0
    • storm-kafka-client
    • 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

              Sachin Sachin Pasalkar
              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