You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Jakub Scholz (JIRA)" <ji...@apache.org> on 2017/09/25 09:02:00 UTC

[jira] [Created] (KAFKA-5969) bin/kafka-preferred-replica-election.sh gives misleading error when invalid JSON file is passed as parameter

Jakub Scholz created KAFKA-5969:
-----------------------------------

             Summary: bin/kafka-preferred-replica-election.sh gives misleading error when invalid JSON file is passed as parameter
                 Key: KAFKA-5969
                 URL: https://issues.apache.org/jira/browse/KAFKA-5969
             Project: Kafka
          Issue Type: Bug
          Components: tools
            Reporter: Jakub Scholz


When invalid JSON file is passed to the bin/kafka-preferred-replica-election.sh / PreferredReplicaLeaderElectionCommand tool it gives a misleading error:
{code}
kafka.admin.AdminOperationException: Preferred replica election data is empty
	at kafka.admin.PreferredReplicaLeaderElectionCommand$.parsePreferredReplicaElectionData(PreferredReplicaLeaderElectionCommand.scala:97)
	at kafka.admin.PreferredReplicaLeaderElectionCommand$.main(PreferredReplicaLeaderElectionCommand.scala:66)
	at kafka.admin.PreferredReplicaLeaderElectionCommand.main(PreferredReplicaLeaderElectionCommand.scala)
{code}

It suggests that the data is empty instead of invalid. This can confuse people. The exception text should be fixed.



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