DomGarguilo commented on PR #5966:
URL: https://github.com/apache/accumulo/pull/5966#issuecomment-3582544766
Here are some notes on what I have tried:
# env interpolation
In `accumulo.properties` set `rpc.bind.port=${env:RPC_PORT:-19000-19999}`
In `accumulo-env.sh` set:
```
case "$cmd" in
sserver) export RPC_PORT="20000-20049" ;;
compactor) export RPC_PORT="20050-20099" ;;
tserver) export RPC_PORT="20100-20149" ;;
monitor) export RPC_PORT="9995" ;;
esac
```
One thing to note is the `RPC_PORT` env var needs to be set beforehand or
else we get `ERROR: FATAL: BAD CONFIG improperly formatted value for key
(rpc.bind.port, type=port) : ${env:RPC_PORT} for site config`. Thats why we
have to do `rpc.bind.port=${env:RPC_PORT:-19000-19999}` and not
`rpc.bind.port=${env:RPC_PORT}`. That way the env var will just be replaced if
present, otherwise it defaults to `19000-19999`.
# sysprop
Similar to the env interpolation. Set
`rpc.bind.port=${sys:accumulo.rpc.bind.port:-19000-19999}` in
`accumulo.properties`
and in `accumulo-env.sh`:
```
case "$cmd" in
tserver) JAVA_OPTS=("-Daccumulo.rpc.bind.port=20001-20049"
"${JAVA_OPTS[@]}") ;;
compactor) JAVA_OPTS=("-Daccumulo.rpc.bind.port=20051-20099"
"${JAVA_OPTS[@]}") ;;
sserver) JAVA_OPTS=("-Daccumulo.rpc.bind.port=20101-20149"
"${JAVA_OPTS[@]}") ;;
monitor) JAVA_OPTS=("-Daccumulo.rpc.bind.port=9995" "${JAVA_OPTS[@]}") ;;
esac
```
# commons configuration `includes`
I am still trying to get this working but no luck yet
--
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]