[jira] [Commented] (KAFKA-7097) VerifiableProducer does not work properly with --message-create-time argument

2018-06-29 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on KAFKA-7097:
---

hachikuji closed pull request #5313: HOTFIX: KAFKA-7097; Set create time 
default to -1L
URL: https://github.com/apache/kafka/pull/5313
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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 168ce17908b..fafa9e6c8c6 100644
--- a/tools/src/main/java/org/apache/kafka/tools/VerifiableProducer.java
+++ b/tools/src/main/java/org/apache/kafka/tools/VerifiableProducer.java
@@ -164,7 +164,7 @@ private static ArgumentParser argParser() {
 parser.addArgument("--message-create-time")
 .action(store())
 .required(false)
-.setDefault(-1)
+.setDefault(-1L)
 .type(Long.class)
 .metavar("CREATETIME")
 .dest("createTime")


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> VerifiableProducer does not work properly with --message-create-time argument
> -
>
> Key: KAFKA-7097
> URL: https://issues.apache.org/jira/browse/KAFKA-7097
> Project: Kafka
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.0.0
>Reporter: Jasper Knulst
>Assignee: Ted Yu
>Priority: Major
> Fix For: 2.1.0
>
>
> If you run:
>  
> ./bin/kafka-verifiable-producer.sh --broker-list  --topic 
> test_topic_increasing_p2 --message-create-time  --acks -1 
> --max-messages 100
> the "" for --message-create-time doesn't take a 13 digit long 
> like 1529656934000. 
> The error message:
> verifiable-producer: error: argument --message-create-time: could not convert 
> '1529656934000' to Integer (For input string: "1529656934000")
>  
> When you provide a 10 digit (1529656934) epoch for the argument it does work 
> but this leads to your topic being cleaned up in a few minutes since the 
> retention time is expired.
>  
> The error seems to be obvious since VerifiableProducer.java has:
>         Long createTime = (long) res.getInt("createTime");
> when parsing the argument. This should be taken as a Long instead.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KAFKA-7097) VerifiableProducer does not work properly with --message-create-time argument

2018-06-29 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on KAFKA-7097:
---

guozhangwang opened a new pull request #5313: HOTFIX: KAFKA-7097; Set create 
time default to -1L
URL: https://github.com/apache/kafka/pull/5313
 
 
   @apovzner @tedyu @hachikuji 
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> VerifiableProducer does not work properly with --message-create-time argument
> -
>
> Key: KAFKA-7097
> URL: https://issues.apache.org/jira/browse/KAFKA-7097
> Project: Kafka
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.0.0
>Reporter: Jasper Knulst
>Assignee: Ted Yu
>Priority: Major
> Fix For: 2.1.0
>
>
> If you run:
>  
> ./bin/kafka-verifiable-producer.sh --broker-list  --topic 
> test_topic_increasing_p2 --message-create-time  --acks -1 
> --max-messages 100
> the "" for --message-create-time doesn't take a 13 digit long 
> like 1529656934000. 
> The error message:
> verifiable-producer: error: argument --message-create-time: could not convert 
> '1529656934000' to Integer (For input string: "1529656934000")
>  
> When you provide a 10 digit (1529656934) epoch for the argument it does work 
> but this leads to your topic being cleaned up in a few minutes since the 
> retention time is expired.
>  
> The error seems to be obvious since VerifiableProducer.java has:
>         Long createTime = (long) res.getInt("createTime");
> when parsing the argument. This should be taken as a Long instead.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KAFKA-7097) VerifiableProducer does not work properly with --message-create-time argument

2018-06-28 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on KAFKA-7097:
---

guozhangwang closed pull request #5292: KAFKA-7097 VerifiableProducer does not 
work properly with --message-create-time argument
URL: https://github.com/apache/kafka/pull/5292
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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 744142b2f64..3cf67c8ac5e 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 @@ private static ArgumentParser argParser() {
 .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 static VerifiableProducer 
createFromArgs(ArgumentParser parser, String[]
 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)


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> VerifiableProducer does not work properly with --message-create-time argument
> -
>
> Key: KAFKA-7097
> URL: https://issues.apache.org/jira/browse/KAFKA-7097
> Project: Kafka
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.0.0
>Reporter: Jasper Knulst
>Priority: Major
>
> If you run:
>  
> ./bin/kafka-verifiable-producer.sh --broker-list  --topic 
> test_topic_increasing_p2 --message-create-time  --acks -1 
> --max-messages 100
> the "" for --message-create-time doesn't take a 13 digit long 
> like 1529656934000. 
> The error message:
> verifiable-producer: error: argument --message-create-time: could not convert 
> '1529656934000' to Integer (For input string: "1529656934000")
>  
> When you provide a 10 digit (1529656934) epoch for the argument it does work 
> but this leads to your topic being cleaned up in a few minutes since the 
> retention time is expired.
>  
> The error seems to be obvious since VerifiableProducer.java has:
>         Long createTime = (long) res.getInt("createTime");
> when parsing the argument. This should be taken as a Long instead.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (KAFKA-7097) VerifiableProducer does not work properly with --message-create-time argument

2018-06-25 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on KAFKA-7097:
---

tedyu opened a new pull request #5292: KAFKA-7097 VerifiableProducer does not 
work properly with --message-create-time argument
URL: https://github.com/apache/kafka/pull/5292
 
 
   Currently create time is interpreted as integer.
   
   This PR makes the tool accept long values.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> VerifiableProducer does not work properly with --message-create-time argument
> -
>
> Key: KAFKA-7097
> URL: https://issues.apache.org/jira/browse/KAFKA-7097
> Project: Kafka
>  Issue Type: Bug
>  Components: core
>Affects Versions: 1.0.0
>Reporter: Jasper Knulst
>Priority: Major
>
> If you run:
>  
> ./bin/kafka-verifiable-producer.sh --broker-list  --topic 
> test_topic_increasing_p2 --message-create-time  --acks -1 
> --max-messages 100
> the "" for --message-create-time doesn't take a 13 digit long 
> like 1529656934000. 
> The error message:
> verifiable-producer: error: argument --message-create-time: could not convert 
> '1529656934000' to Integer (For input string: "1529656934000")
>  
> When you provide a 10 digit (1529656934) epoch for the argument it does work 
> but this leads to your topic being cleaned up in a few minutes since the 
> retention time is expired.
>  
> The error seems to be obvious since VerifiableProducer.java has:
>         Long createTime = (long) res.getInt("createTime");
> when parsing the argument. This should be taken as a Long instead.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)