You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by gu...@apache.org on 2018/06/28 21:46:30 UTC
[kafka] branch trunk updated: KAFKA-7097 VerifiableProducer does
not work properly with --message-create-time argument (#5292)
This is an automated email from the ASF dual-hosted git repository.
guozhang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push:
new 24b3844 KAFKA-7097 VerifiableProducer does not work properly with --message-create-time argument (#5292)
24b3844 is described below
commit 24b3844fe4163dbf7c6fcdffdf3531d052ec8e08
Author: tedyu <yu...@gmail.com>
AuthorDate: Thu Jun 28 14:46:26 2018 -0700
KAFKA-7097 VerifiableProducer does not work properly with --message-create-time argument (#5292)
Currently create time is interpreted as integer.
This PR makes the tool accept long values.
Reviewers: Manikumar Reddy O <ma...@gmail.com>, Guozhang Wang <wa...@gmail.com>
---
tools/src/main/java/org/apache/kafka/tools/VerifiableProducer.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/src/main/java/org/apache/kafka/tools/VerifiableProducer.java b/tools/src/main/java/org/apache/kafka/tools/VerifiableProducer.java
index 6dcde61..168ce17 100644
--- a/tools/src/main/java/org/apache/kafka/tools/VerifiableProducer.java
+++ b/tools/src/main/java/org/apache/kafka/tools/VerifiableProducer.java
@@ -165,7 +165,7 @@ public class VerifiableProducer {
.action(store())
.required(false)
.setDefault(-1)
- .type(Integer.class)
+ .type(Long.class)
.metavar("CREATETIME")
.dest("createTime")
.help("Send messages with creation time starting at the arguments value, in milliseconds since epoch");
@@ -215,7 +215,7 @@ public class VerifiableProducer {
int throughput = res.getInt("throughput");
String configFile = res.getString("producer.config");
Integer valuePrefix = res.getInt("valuePrefix");
- Long createTime = (long) res.getInt("createTime");
+ Long createTime = res.getLong("createTime");
Integer repeatingKeys = res.getInt("repeatingKeys");
if (createTime == -1L)