Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-2915

The kafka channel using new APIs will be stuck when the sink is avro sink

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.0
    • Fix Version/s: 1.7.0
    • Component/s: Channel
    • Labels:
      None

      Description

      The avro sink was stuck when I using the kafka channel which using the new APIs.
      After couple of hours I found the issue at KafkaChannel.java#L384:

      e.getHeaders().put(KEY_HEADER, record.key());

      and change it to:

      if (record.key() != null) {
      e.getHeaders().put(KEY_HEADER, record.key());
      }

      The reason is:
      record.key() could be null if the user didn't set it. And the avro serialize the event will throw a NullPointerException.

        Attachments

        1. FLUME-2915v2.patch
          3 kB
          Jeff Holoman
        2. FLUME-2915.patch
          3 kB
          Jeff Holoman

          Activity

            People

            • Assignee:
              jholoman Jeff Holoman
              Reporter:
              zhangzhonglai Julian Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: