[
https://issues.apache.org/jira/browse/KUDU-3421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17635666#comment-17635666
]
ASF subversion and git services commented on KUDU-3421:
-------------------------------------------------------
Commit c1ff2fdb9a0362ad0a8ac38c2feeb6f64b8fa7b9 in kudu's branch
refs/heads/master from Ádám Bakai
[ https://gitbox.apache.org/repos/asf?p=kudu.git;h=c1ff2fdb9 ]
KUDU-3421 Specify the error causing CLI argument
The new error message helps to locate the exact word that caused the
problem by printing the first argument that is not a flag in
applications that only use flag arguments. This can happen if the user
forgets to put "-" to one of the arguments or incorrectly tries to use
an argument in space separated format.
Change-Id: I4d832615d4b70718ce581ab72a27bad012d6a87f
Reviewed-on: http://gerrit.cloudera.org:8080/19253
Tested-by: Kudu Jenkins
Reviewed-by: Alexey Serbin <[email protected]>
> Make command line error message more useful
> -------------------------------------------
>
> Key: KUDU-3421
> URL: https://issues.apache.org/jira/browse/KUDU-3421
> Project: Kudu
> Issue Type: Improvement
> Components: CLI
> Reporter: Bakai Ádám
> Priority: Major
> Labels: newbie
>
> If the user runs this command for example:
> {code:java}
> /data/9/abakai/kudu/build/debug%
> /data/9/abakai/kudu/build/debug/bin/kudu-tserver
> --fs_data_dirs=/data/9/abakai/kudu/build/debug/tserver-2/data
> --fs_wal_dir=/data/9/abakai/kudu/build/debug/tserver-2/wal
> --log_dir=/data/9/abakai/kudu/build/debug/tserver-2/log
> --rpc_bind_addresses=127.0.0.1:19874 --time_source=system_unsync
> --unlock_unsafe_flags --webserver_interface=127.0.0.1 --webserver_port=19875
> --tserver_master_addrs=127.0.0.1:18764
> --webserver_doc_root=/data/9/abakai/kudu/build/debug/../../www
> --memory_limit_hard_bytes=72050161527 -block_manager log {code}
> it works fine. But if the user adds "-logtostderr true", it will throw an
> error:
> {code:java}
> [abakai@va1022]/data/9/abakai/kudu/build/debug%
> /data/9/abakai/kudu/build/debug/bin/kudu-tserver
> --fs_data_dirs=/data/9/abakai/kudu/build/debug/tserver-2/data
> --fs_wal_dir=/data/9/abakai/kudu/build/debug/tserver-2/wal
> --log_dir=/data/9/abakai/kudu/build/debug/tserver-2/log
> --rpc_bind_addresses=127.0.0.1:19874 --time_source=system_unsync
> --unlock_unsafe_flags --webserver_interface=127.0.0.1 --webserver_port=19875
> --tserver_master_addrs=127.0.0.1:18764
> --webserver_doc_root=/data/9/abakai/kudu/build/debug/../../www
> --memory_limit_hard_bytes=72050161527 -block_manager log -logtostderr true
> usage: /data/9/abakai/kudu/build/debug/bin/kudu-tserver {code}
> Which doesn't really help to identify which command line option is incorrect
> (and maybe how is it incorrect)
> (By the way the problem with the second command is that logtostderr doesn't
> need true or false option, it's existence indicates that logtostderr should
> be switched to true)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)