You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Guozhang Wang (JIRA)" <ji...@apache.org> on 2017/05/30 20:55:04 UTC
[jira] [Resolved] (KAFKA-4603) the argument of shell in doc wrong
and command parsed error
[ https://issues.apache.org/jira/browse/KAFKA-4603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guozhang Wang resolved KAFKA-4603.
----------------------------------
Resolution: Fixed
Fix Version/s: 0.11.0.0
Issue resolved by pull request 2349
[https://github.com/apache/kafka/pull/2349]
> the argument of shell in doc wrong and command parsed error
> -----------------------------------------------------------
>
> Key: KAFKA-4603
> URL: https://issues.apache.org/jira/browse/KAFKA-4603
> Project: Kafka
> Issue Type: Bug
> Components: admin, documentation
> Affects Versions: 0.10.0.1, 0.10.2.0
> Environment: suse
> Reporter: Xin
> Assignee: Xin
> Priority: Minor
> Fix For: 0.11.0.0
>
>
> according to the 7.6.2 Migrating clusters of document :
> ./zookeeper-security-migration.sh --zookeeper.acl=secure --zookeeper.connection=localhost:2181
> joptsimple.OptionArgumentConversionException: Cannot parse argument 'localhost:2181' of option zookeeper.connection.timeout
> at joptsimple.AbstractOptionSpec.convertWith(AbstractOptionSpec.java:93)
> at joptsimple.ArgumentAcceptingOptionSpec.convert(ArgumentAcceptingOptionSpec.java:274)
> at joptsimple.OptionSet.valuesOf(OptionSet.java:223)
> at joptsimple.OptionSet.valueOf(OptionSet.java:172)
> at kafka.admin.ZkSecurityMigrator$.run(ZkSecurityMigrator.scala:111)
> at kafka.admin.ZkSecurityMigrator$.main(ZkSecurityMigrator.scala:119)
> at kafka.admin.ZkSecurityMigrator.main(ZkSecurityMigrator.scala)
> Caused by: joptsimple.internal.ReflectionException: java.lang.NumberFormatException: For input string: "localhost:2181"
> at joptsimple.internal.Reflection.reflectionException(Reflection.java:140)
> at joptsimple.internal.Reflection.invoke(Reflection.java:122)
> at joptsimple.internal.MethodInvokingValueConverter.convert(MethodInvokingValueConverter.java:48)
> at joptsimple.internal.Reflection.convertWith(Reflection.java:128)
> at joptsimple.AbstractOptionSpec.convertWith(AbstractOptionSpec.java:90)
> ... 6 more
> Caused by: java.lang.NumberFormatException: For input string: "localhost:2181"
> at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> at java.lang.Integer.parseInt(Integer.java:492)
> at java.lang.Integer.valueOf(Integer.java:582)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at joptsimple.internal.Reflection.invoke(Reflection.java:119)
> ... 9 more
> ===>the argument "zookeeper.connection" has been parsed to "zookeeper.connection.timeout"
> using help i found that the argument is :
> --zookeeper.connect Sets the ZooKeeper connect string
> (ensemble). This parameter takes a
> comma-separated list of host:port
> pairs. (default: localhost:2181)
> --zookeeper.connection.timeout Sets the ZooKeeper connection timeout.
> the document describe wrong, and the code also has something wrong:
> in ZkSecurityMigrator.scala,
> val parser = new OptionParse()==>
> Any of --v, --ve, ... are accepted on the command line and treated as though you had typed --verbose.
> To suppress this behavior, use the OptionParser constructor OptionParser(boolean allowAbbreviations) and pass a value of false.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)