kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Apurva Mehta (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KAFKA-6053) NoSuchMethodError when creating ProducerRecord in upgrade system tests
Date Wed, 11 Oct 2017 16:29:00 GMT
Apurva Mehta created KAFKA-6053:

             Summary: 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:

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)
amehta-macbook-pro:worker6 apurva$

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

View raw message