hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hongyuan Li (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HADOOP-14623) fixed some bugs in KafkaSink
Date Sun, 23 Jul 2017 09:33:00 GMT

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

Hongyuan Li edited comment on HADOOP-14623 at 7/23/17 9:32 AM:
---------------------------------------------------------------

Hi, [~bharatviswa]. i resubmit the patch 003 according to the discussion above with modification
below
1、set the {{acks}} to 1
2、Use  {{ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG}} instead of {{key.serializer}}.
3、set the key type from {{Integer}} to {{byte[]}}

*Update* 
patch 004 is the latest.


was (Author: hongyuan li):
Hi, [~bharatviswa]. i resubmit the patch 003 according to the discussion above with modification
below
1、set the {{acks}} to 1
2、Use  {{ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG}} instead of {{key.serializer}}.
3、set the key type from {{Integer}} to {{byte[]}}

> fixed some bugs in KafkaSink 
> -----------------------------
>
>                 Key: HADOOP-14623
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14623
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: common, tools
>    Affects Versions: 3.0.0-alpha3
>            Reporter: Hongyuan Li
>            Assignee: Hongyuan Li
>         Attachments: HADOOP-14623-001.patch, HADOOP-14623-002.patch, HADOOP-14623-003.patch,
HADOOP-14623-004.patch
>
>
> {{KafkaSink}}#{{init}}  should set ack to *1* to make sure the message has been written
to the broker at least.
> current code list below:
> {code}
>   
>     props.put("request.required.acks", "0");
> {code}
> *Update*
> find another bug about this class, {{key.serializer}} used {{org.apache.kafka.common.serialization.ByteArraySerializer}},
however, the key properties of Producer is Integer, codes list below:
> {code}
>     props.put("key.serializer",
>         "org.apache.kafka.common.serialization.ByteArraySerializer");
> ……………
>  producer = new KafkaProducer<Integer, byte[]>(props);
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message