You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Swapnil Ghike (JIRA)" <ji...@apache.org> on 2013/03/04 05:29:12 UTC

[jira] [Comment Edited] (KAFKA-779) Standardize Zk data structures for Re-assign partitions and Preferred replication election

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

Swapnil Ghike edited comment on KAFKA-779 at 3/4/13 4:29 AM:
-------------------------------------------------------------

Changes:

1. Zk data format standardization for admin/reassign_partitions and admin/preffered_replica_election. (These changes still hit the bug mentioned in KAFKA-780 which occurred without the changes in this patch.)

2. I changed Json manipulation related functions in Utils, because mergeJsonObjects had a bug which could screw up a JSON string that included a nested object or an array, while attempting to sort the fields in the string. I replaced it with a new function mergeJsonFields and created a new function mapToJsonFields. As it turned out, these two functions also helped reduce some lines of code in other JSON related functions in Utils. 

3. Ran optimize imports on the entire source code. Three files unrelated to this patch have been touched.

Testing done - 
i. Unit tests pass
ii. Verified the format of all Zk data structures as mentioned in the wiki to ensure 2 above didn't break anything. Verified that the fields are sorted.
iii. Tested reassign-partitions tool and preferred-replica-election admin tools, but they hit the exception mentioned in KAFKA-780.
                
      was (Author: swapnilghike):
    Changes:

1. Zk data format standardization for admin/reassign_partitions and admin/preffered_replica_election. (These changes still hit the bug mentioned in KAFKA-780 which occurred without the changes in this patch.)

2. I changed Json manipulation related functions in Utils, because mergeJsonObjects had a bug which could screw up a JSON string that included a nested object or an array, while attempting to sort the fields in the string. I replaced it with a new function mergeJsonFields and created a new function mapToJsonFields. As it turned out, these two functions are reusable and it helped reduce some lines of code in Utils. 

3. Ran optimize imports on the entire source code. Three files unrelated to this patch have been touched.

Testing done - 
i. Unit tests pass
ii. Verified the format of all Zk data structures as mentioned in the wiki to ensure 2 above didn't break anything. Verified that the fields are sorted.
iii. Tested reassign-partitions tool and preferred-replica-election admin tools, but they hit the exception mentioned in KAFKA-780.
                  
> Standardize Zk data structures for Re-assign partitions and Preferred replication election
> ------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-779
>                 URL: https://issues.apache.org/jira/browse/KAFKA-779
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 0.8
>            Reporter: Swapnil Ghike
>            Assignee: Swapnil Ghike
>            Priority: Blocker
>              Labels: kafka-0.8, p2
>             Fix For: 0.8
>
>         Attachments: kafka-779-v1.patch
>
>
> Follow the schema at https://cwiki.apache.org/confluence/display/KAFKA/Kafka+data+structures+in+Zookeeper

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira