You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/10/11 17:00:11 UTC
[jira] [Commented] (KAFKA-6053) NoSuchMethodError when creating
ProducerRecord in upgrade system tests
[ https://issues.apache.org/jira/browse/KAFKA-6053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16200593#comment-16200593 ]
ASF GitHub Bot commented on KAFKA-6053:
---------------------------------------
GitHub user apurvam opened a pull request:
https://github.com/apache/kafka/pull/4057
KAFKA-6053: Fix NoSuchMethodError when creating ProducerRecords with older client versions
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apurvam/kafka KAFKA-6053-fix-no-such-method-error-in-producer-record
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/4057.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #4057
----
commit 221a96da1dc6221dd3f61786d5fc1119b6848a7f
Author: Apurva Mehta <ap...@confluent.io>
Date: 2017-10-11T16:58:44Z
Fix NoSuchMethodError when creating ProducerRecords with older client versions
----
> NoSuchMethodError when creating ProducerRecord in upgrade system tests
> ----------------------------------------------------------------------
>
> Key: KAFKA-6053
> URL: https://issues.apache.org/jira/browse/KAFKA-6053
> Project: Kafka
> Issue Type: Bug
> Reporter: Apurva Mehta
> Assignee: Apurva Mehta
>
> This patch https://github.com/apache/kafka/pull/4029 used a new constructor for {{ProducerRecord}} which doesn't exist in older clients. Hence system tests which use older clients fail with:
> {noformat}
> Exception in thread "main" java.lang.NoSuchMethodError: org.apache.kafka.clients.producer.ProducerRecord.<init>(Ljava/lang/String;Ljava/lang/Integer;Ljava/lang/Long;Ljava/lang/Object;Ljava/lang/Object;)V
> at org.apache.kafka.tools.VerifiableProducer.send(VerifiableProducer.java:232)
> at org.apache.kafka.tools.VerifiableProducer.run(VerifiableProducer.java:462)
> at org.apache.kafka.tools.VerifiableProducer.main(VerifiableProducer.java:500)
> {"timestamp":1507711495458,"name":"shutdown_complete"}
> {"timestamp":1507711495459,"name":"tool_data","sent":0,"acked":0,"target_throughput":10000,"avg_throughput":0.0}
> amehta-macbook-pro:worker6 apurva$
> {noformat}
> A trivial fix is to only use the new constructor if a message create time is explicitly passed to the VerifiableProducer, since older versions of the test would never use it.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)