kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-5940) kafka-delete-records.sh doesn't give any feedback when the JSON offset configuration file is invalid
Date Fri, 29 Sep 2017 12:43:00 GMT

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

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

Github user scholzj closed the pull request at:

    https://github.com/apache/kafka/pull/3920


> kafka-delete-records.sh doesn't give any feedback when the JSON offset configuration
file is invalid
> ----------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-5940
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5940
>             Project: Kafka
>          Issue Type: Improvement
>          Components: tools
>            Reporter: Jakub Scholz
>            Assignee: Jakub Scholz
>
> When deleting records using {{bin/kafka-delete-records.sh}}, the user has to pass a JSON
file with the list of topics/partitions and the offset to which the records should be deleted.
However, currently when such file is invalid the utility doesn't print any visible error:
> {code}
> $ bin/kafka-delete-records.sh --bootstrap-server localhost:9092 --offset-json-file offset.json
> Executing records delete operation
> Records delete operation completed:
> $
> {code}
> Instead, I would suggest that it throws an exception to make it clear that the problem
is the invalid JSON file:
> {code}
> $ bin/kafka-delete-records.sh --bootstrap-server localhost:9092 --offset-json-file offset.json
> Exception in thread "main" kafka.common.AdminCommandFailedException: Offset json file
doesn't contain valid JSON data.
> 	at kafka.admin.DeleteRecordsCommand$.parseOffsetJsonStringWithoutDedup(DeleteRecordsCommand.scala:54)
> 	at kafka.admin.DeleteRecordsCommand$.execute(DeleteRecordsCommand.scala:62)
> 	at kafka.admin.DeleteRecordsCommand$.main(DeleteRecordsCommand.scala:37)
> 	at kafka.admin.DeleteRecordsCommand.main(DeleteRecordsCommand.scala)
> $
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message