[ https://issues.apache.org/jira/browse/KAFKA-8402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16846315#comment-16846315 ]
huxihx commented on KAFKA-8402: ------------------------------- A possible solution is to throw an exception when the length of the encoded byte array hits the 1MB threshold. > bin/kafka-preferred-replica-election.sh fails if generated json is bigger > than 1MB > ---------------------------------------------------------------------------------- > > Key: KAFKA-8402 > URL: https://issues.apache.org/jira/browse/KAFKA-8402 > Project: Kafka > Issue Type: Bug > Components: tools > Affects Versions: 1.1.1 > Reporter: Vyacheslav Stepanov > Priority: Major > > If I run script {{bin/kafka-preferred-replica-election.sh}} without > specifying the list of topics/partitions - it will get all topics/partitions > from zookeeper and transform that to json, then it will create zookeeper node > at {{/admin/preferred_replica_election}} using this json as data for that > zookeeper node. If the generated json is bigger than 1MB (default max size of > data of zookeeper node) - the script will fail without giving a good > description of failure. The size of 1MB can be reached if the amount of > topics/partitions is high enough. -- This message was sent by Atlassian JIRA (v7.6.3#76005)