You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Li Ye (JIRA)" <ji...@apache.org> on 2016/02/14 04:24:18 UTC

[jira] [Updated] (FLUME-2872) Kafka Sink should be able to select which header as the key

     [ https://issues.apache.org/jira/browse/FLUME-2872?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Li Ye updated FLUME-2872:
-------------------------
    Attachment: FLUME-2872-1.patch

A new configuration item called keyHeader is added for Kafka Sink. It can be used to specify which header is used as the key of Kafka message. Its default value is "key", so this patch is compatible with Flume 1.6.

> Kafka Sink should be able to select which header as the key
> -----------------------------------------------------------
>
>                 Key: FLUME-2872
>                 URL: https://issues.apache.org/jira/browse/FLUME-2872
>             Project: Flume
>          Issue Type: Improvement
>          Components: Sinks+Sources
>    Affects Versions: v1.6.0
>            Reporter: Li Ye
>              Labels: features
>             Fix For: v1.7.0
>
>         Attachments: FLUME-2872-1.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> In Flume 1.6.0, Kafka Sink uses the topic and key properties from the FlumeEvent headers to send events to Kafka. If topic exists in the headers, the event will be sent to that specific topic, overriding the topic configured for the Sink. If key exists in the headers, the key will used by Kafka to partition the data between the topic partitions. Events with same key will be sent to the same partition. If the key is null, events will be sent to random partitions.
> But if Kafka Sink is able to select which header as the key, much convieience will be brought to Flume users.



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