You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Manikumar (JIRA)" <ji...@apache.org> on 2018/06/05 10:03:00 UTC
[jira] [Resolved] (KAFKA-5940) kafka-delete-records.sh doesn't give
any feedback when the JSON offset configuration file is invalid
[ https://issues.apache.org/jira/browse/KAFKA-5940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Manikumar resolved KAFKA-5940.
------------------------------
Resolution: Fixed
Fixed in KAFKA-5919
> 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
> Priority: Major
>
> 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
(v7.6.3#76005)