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

StringKeyValueScheme doesn't override getOutputFields()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Abandoned
    • 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

        Issue Links

          Activity

            People

              Unassigned Unassigned
              asmaier Andreas Maier
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 20m
                  1h 20m