ddanielr commented on code in PR #4445:
URL: https://github.com/apache/accumulo/pull/4445#discussion_r1560346544
##########
assemble/bin/accumulo-cluster:
##########
@@ -141,7 +141,7 @@ function control_service() {
ACCUMULO_SERVICE_INSTANCE=""
[[ $service == "tserver" && ${NUM_TSERVERS:-1} -gt 1 ]] &&
ACCUMULO_SERVICE_INSTANCE=${inst_id}
[[ $service == "compactor" ]] &&
ACCUMULO_SERVICE_INSTANCE="${inst_id}_${5}"
- [[ $service == "sserver" && ${NUM_SSERVERS:-1} -gt 1 ]] &&
ACCUMULO_SERVICE_INSTANCE=${inst_id}
+ [[ $service == "sserver" ]] && ACCUMULO_SERVICE_INSTANCE="${inst_id}_${5}"
Review Comment:
We could simplify the code a bit more and only use the `sserver1_<group>` or
`compactor1_<queue>` patterns when there's more than one of each type.
```
ACCUMULO_SERVICE_INSTANCE=""
# Only increment the service name when more than one service is desired.
[[ last_instance_id -gt 1 ]] && ACCUMULO_SERVICE_INSTANCE="${inst_id}"
[[ $service == "compactor" || $service == "sserver" ]] &&
ACCUMULO_SERVICE_INSTANCE="${ACCUMULO_SERVICE_INSTANCE}_${5}"
```
--
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]