Xin created KAFKA-4603:
--------------------------
Summary: argument error,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
Priority: Minor
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.4#6332)