[ 
https://issues.apache.org/jira/browse/FLUME-2915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15324461#comment-15324461
 ] 

ASF subversion and git services commented on FLUME-2915:
--------------------------------------------------------

Commit a619cc15748d76357f84bd3d0fa0a3e496ee61a1 in flume's branch 
refs/heads/trunk from [~jarcec]
[ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=a619cc1 ]

FLUME-2915: The kafka channel using new APIs will be stuck when the sink is 
avro sink

(Jeff Holoman via Jarek Jarcec Cecho)


> The kafka channel using new APIs will be stuck when the sink is avro sink
> -------------------------------------------------------------------------
>
>                 Key: FLUME-2915
>                 URL: https://issues.apache.org/jira/browse/FLUME-2915
>             Project: Flume
>          Issue Type: Bug
>          Components: Channel
>    Affects Versions: v1.7.0
>            Reporter: Julian Zhang
>            Assignee: Jeff Holoman
>         Attachments: FLUME-2915.patch, FLUME-2915v2.patch
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to