ddanielr commented on issue #5196:
URL: https://github.com/apache/accumulo/issues/5196#issuecomment-2552089740

   Tested on the current branch for #5174. 
   It does not catch the issue as we currently support passing extra args at 
the end of accumulo-cluster. 
   
   We have at least three different ways to handle the situation.
   
   The first is to support a mis-typing of start here or stop here and fix it 
around line 586. 
   Probably should also add a check to do if $@ is equal to 1. 
   ```
   # Handle missing hyphens
   if [[ "$1" == "here" ]]; then
      cmd="$cmd-$1"
      shift
   fi
   ```
   
   The second would be to dis-allow it entirely in by checking if "$@" is 
greater than zero at the end of parse_args and not supporting additional values 
at all when calling `accumulo-cluster`. 
   
   That would solve the error cases of missing the hyphen and also misspelling 
the word. `stop heer` or `stop hre`. 
   
   The third would be to not support a default case of `stop` or `start` and 
always require at least one argument flag to be set i.e `start --all`  `stop 
--all`. or `start --local` `stop --local`
   
   Option 1 seems extremely limited in scope and wouldn't prevent other error 
conditions. 
   Option 2 would prevent error conditions but would also remove a current 
ability we support.
   Option 3 pushes users to be more direct in their commands, but would cause a 
breakage for any current SOPs for starting/stopping accumulo. 
   
   @ctubbsii What do you think of the current options and can you think of any 
other code-based alternatives? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to