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

StringKeyValueScheme doesn't override getOutputFields()

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsAdd voteVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • storm-kafka
    • None

    Description

      In org.apache.storm.kafka StringKeyValueScheme extends StringScheme. However it doesn't override the method getOutputFields() from StringScheme

      public Fields getOutputFields() {
              return new Fields(STRING_SCHEME_KEY);
          }
      

      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.

          @Override
          public Fields getOutputFields() {
              return new Fields(FieldNameBasedTupleToKafkaMapper.BOLT_KEY, FieldNameBasedTupleToKafkaMapper.BOLT_MESSAGE);
          }
      

      The important thing is, that getOutputFields() should return two fields and not one.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned Assign to me
            asmaier Andreas Maier

            Dates

              Created:
              Updated:

              Time Tracking

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

              Slack

                Issue deployment