VerifiableProducer does not work properly with --message-create-time argument
Currently create time is interpreted as integer.
This PR makes the tool accept long values.
Reviewers: Manikumar Reddy O Guozhang Wang
@@ -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)
