[ 
https://issues.apache.org/jira/browse/KAFKA-5919?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paolo Patierno updated KAFKA-5919:
----------------------------------
    Description: 
Hi,
the kafka-delete-records script allows user to pass information about records 
to delete through a JSON file. Such file, as described in the command help, is 
made by a "partitions" array and a "version" field. Reading 
[KIP-107|https://cwiki.apache.org/confluence/display/KAFKA/KIP-107%3A+Add+purgeDataBefore%28%29+API+in+AdminClient]
 and the DeleteRecords API (Key: 21) description it's not clear what such field 
is and even it's not used at all (in the current implementation).
It turned out that the field is for having backward compatibility in the future 
where the JSON format could change. This JIRA is about adding more checks on 
the "version" field having it not mandatory but assuming the earliest version 
(current 1) if it's omitted from the JSON file.

The same for the kafka-reassign-partitions which has a topics-to-move JSON file 
as input (used with --generate option) and the partitions-to-move.json (used 
with --execute option). In both cases the same logic can be applied as above.

  was:
Hi,
the kafka-delete-records script allows user to pass information about records 
to delete through a JSON file. Such file, as described in the command help, is 
made by a "partitions" array and a "version" field. Reading 
[KIP-107|https://cwiki.apache.org/confluence/display/KAFKA/KIP-107%3A+Add+purgeDataBefore%28%29+API+in+AdminClient]
 and the DeleteRecords API (Key: 21) description it's not clear what such field 
is and even it's not used at all (in the current implementation).
It turned out that the field is for having backward compatibility in the future 
where the JSON format could change. This JIRA is about adding more checks on 
the "version" field having it not mandatory but assuming the earliest version 
(current 1) if it's omitted from the JSON file.


> Adding checks on "version" field for tools using it
> ---------------------------------------------------
>
>                 Key: KAFKA-5919
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5919
>             Project: Kafka
>          Issue Type: Bug
>          Components: tools
>            Reporter: Paolo Patierno
>            Assignee: Paolo Patierno
>            Priority: Minor
>             Fix For: 1.0.0
>
>
> Hi,
> the kafka-delete-records script allows user to pass information about records 
> to delete through a JSON file. Such file, as described in the command help, 
> is made by a "partitions" array and a "version" field. Reading 
> [KIP-107|https://cwiki.apache.org/confluence/display/KAFKA/KIP-107%3A+Add+purgeDataBefore%28%29+API+in+AdminClient]
>  and the DeleteRecords API (Key: 21) description it's not clear what such 
> field is and even it's not used at all (in the current implementation).
> It turned out that the field is for having backward compatibility in the 
> future where the JSON format could change. This JIRA is about adding more 
> checks on the "version" field having it not mandatory but assuming the 
> earliest version (current 1) if it's omitted from the JSON file.
> The same for the kafka-reassign-partitions which has a topics-to-move JSON 
> file as input (used with --generate option) and the partitions-to-move.json 
> (used with --execute option). In both cases the same logic can be applied as 
> above.



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

Reply via email to