[
https://issues.apache.org/jira/browse/ACCUMULO-995?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13563194#comment-13563194
]
Michael Allen commented on ACCUMULO-995:
----------------------------------------
I think the root of this is the way JCommander parses "commands" versus
"options", and how the shell script invokes the Java code.
The Java code gets invoked from stop-all.sh as follows:
${bin}/accumulo admin stopAll "$@"
In other words, put all arguments to the stopAll "command" after the command,
as though they are parameters to the command but not to the "admin" part of it.
In fact, the parser is set up such that stopAll expects no arguments, while
the Admin class itself is expecting all the normal client options (-u, -p,
etc.) plus an additional -f option for forcing.
I think the fix here is easy:
${bin}/accumulo admin "$@" stopAll
Just put the options behind the stopAll command.
> stop-all.sh parameter passing does not accept -u root -p password params
> properly
> ---------------------------------------------------------------------------------
>
> Key: ACCUMULO-995
> URL: https://issues.apache.org/jira/browse/ACCUMULO-995
> Project: Accumulo
> Issue Type: Bug
> Components: scripts
> Affects Versions: 1.5.0
> Environment: Accumulo 1.5.0 from trunk, running on my OS X laptop.
> Reporter: Michael Allen
> Assignee: John Vines
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> Recreation steps:
> 1. Install Accumulo 1.5.0 from trunk, and start server (start-all.sh).
> 2. Now stop the server:
> bin/stop-all.sh -u root -p password
> Expected outcome:
> stop-all.sh command would use supplied credentials to attach to the server.
> Actual outcome:
> The eventual implementation class (o.a.a.s.util.Admin) throws a parse
> exception for the command line parameters:
> Caused by: com.beust.jcommander.ParameterException: Unknown option: -u
> at com.beust.jcommander.JCommander.parseValues(JCommander.java:735)
> at com.beust.jcommander.JCommander.parse(JCommander.java:279)
> at com.beust.jcommander.JCommander.parse(JCommander.java:262)
> at com.beust.jcommander.JCommander.parseValues(JCommander.java:780)
> at com.beust.jcommander.JCommander.parse(JCommander.java:279)
> at com.beust.jcommander.JCommander.parse(JCommander.java:262)
> at org.apache.accumulo.server.util.Admin.main(Admin.java:76)
> ... 6 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira