ctubbsii commented on code in PR #5174:
URL: https://github.com/apache/accumulo/pull/5174#discussion_r1887298900
##########
assemble/bin/accumulo-cluster:
##########
@@ -27,598 +35,517 @@ Options:
Commands:
create-config Creates cluster config
- restart Restarts the Accumulo cluster
- start Starts Accumulo cluster
- stop Stops Accumulo cluster
- kill Kills Accumulo cluster
- start-non-tservers Deprecated. Starts all services except tservers
- start-servers [--all|--tservers|--no-tservers|--sservers
[group]|--compactors [queue]]
- Starts various server types, can optionally
specify a queue or group
- stop-servers [--all|--tservers| --no-tservers|--sservers
[group]|--compactors [queue]]
- Starts various server types, can optionally
specify a queue or group
- start-tservers Deprecated. Starts all tservers on cluster
- stop-tservers Deprecated. Stops all tservers on cluster
- start-here Starts all services on this node
- stop-here Stops all services on this node
+ start-non-tservers Deprecated. Alias for "start --manager --gc
--monitor --compaction-coordinator --sservers --compactors"
+ start-servers Deprecated. Alias for "start"
+ stop-servers Deprecated. Alias for "stop"
+ start-tservers Deprecated. Alias for "start --tservers"
+ stop-tservers Deprecated. Alias for "stop --tservers"
+ start-here Deprecated. Alias for "start --local --all"
+ stop-here Deprecated. Alias for "stop --local --all"
+ restart [--local] [--all | [--manager] [--gc] [--monitor]
[--compaction-coordinator] [--tservers] [--sservers[=group]]
[--compactors[=group]]
+ Restarts Accumulo cluster services
+ start [--local] [--all | [--manager] [--gc] [--monitor]
[--compaction-coordinator] [--tservers] [--sservers[=group]]
[--compactors[=group]]
+ Starts Accumulo cluster services
+ stop [--local] [--all | [--manager] [--gc] [--monitor]
[--compaction-coordinator] [--tservers] [--sservers[=group]]
[--compactors[=group]]
+ Stops Accumulo cluster services
+ kill [--local] [--all | [--manager] [--gc] [--monitor]
[--compaction-coordinator] [--tservers] [--sservers[=group]]
[--compactors[=group]]
+ Kills Accumulo cluster services
+
+ Examples:
+
+ accumulo-cluster start # start all servers
+ accumulo-cluster start --dry-run # print debug
information and commands to be executed
+ accumulo-cluster start --local # start all local
services
+ accumulo-cluster start --local --manager # start local
manager services
+ accumulo-cluster start --tservers # start all tservers
+ accumulo-cluster start --sservers=group1 # start all group1
sservers
+ accumulo-cluster start --local --manager --tservers # Start the local
manager and local tservers
+
EOF
}
+function parse_args {
+ DEBUG=0
+ ARG_LOCAL=0
+ ARG_ALL=0
+ ARG_MANAGER=0
+ ARG_GC=0
+ ARG_MONITOR=0
+ ARG_COORDINATOR=0
+ ARG_TSERVER=0
+ ARG_TSERVER_GROUP=""
+ ARG_SSERVER=0
+ ARG_SSERVER_GROUP=""
+ ARG_COMPACTOR=0
+ ARG_COMPACTOR_GROUP=""
+
+ PARSE_OUTPUT=$(getopt -o "" --long
"dry-run,all,local,manager,gc,monitor,compaction-coordinator,no-tservers,tservers,sservers::,compactors::"
-n 'accumulo-cluster' -- "$@")
Review Comment:
And by "For simplicity", I mean it was nearly impossible to parse the option
out otherwise. It had to be added to getopt somehow, and the logic for only
being applicable for `start`, but only when `start` was called via
`start-tservers` was a bit too complicated, and completely unnecessary, since
the deprecated functionality could still be supported by just adding it to all
the commands.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]