8000 Added --rr parameter to startLocalCluster.sh (#6906) · mnemosdev/arangodb@129d075 · GitHub
[go: up one dir, main page]

Skip to content

Commit 129d075

Browse files
goedderzjsteemann
authored andcommitted
Added --rr parameter to startLocalCluster.sh (arangodb#6906)
1 parent b1d9847 commit 129d075

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

scripts/cluster-run-common.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ function help() {
55
echo ""
66
echo "OPTIONS:"
77
echo " -a/--nagents # agents (odd integer default: 1))"
8-
echo " -c/--ncoordinators # coordinators (odd integer default: 1))"
9-
echo " -d/--ndbservers # db servers (odd integer default: 2))"
8+
echo " -c/--ncoordinators # coordinators (integer default: 1))"
9+
echo " -d/--ndbservers # db servers (integer default: 2))"
1010
echo " -t/--transport Protocol (ssl|tcp default: tcp)"
1111
echo " -j/--jwt-secret JWT-Secret (string default: )"
1212
echo " --log-level-agency Log level (agency) (string default: )"
@@ -20,6 +20,7 @@ function help() {
2020
echo " -q/--source-dir ArangoDB source dir (default: .)"
2121
echo " -B/--bin-dir ArangoDB binary dir (default: ./build)"
2222
echo " -O/--ongoing-ports Ongoing ports (default: false)"
23+
echo " --rr Run arangod with rr (true|false default: false)"
2324
echo ""
2425
echo "EXAMPLES:"
2526
echo " $0"
@@ -47,6 +48,7 @@ BUILD="./build"
4748
JWT_SECRET=""
4849
PORT_OFFSET=0
4950
SRC_DIR="."
51+
USE_RR="false"
5052

5153
parse_args(){
5254
while [[ -n "$1" ]]; do
@@ -119,6 +121,17 @@ while [[ -n "$1" ]]; do
119121
ONGOING_PORTS=${2}
120122
shift
121123
;;
124+
--rr)
125+
USE_RR=${2}
126+
if [ "$USE_RR" != "false" ] && [ "$USE_RR" != "true" ] ; then
127+
echo 'Invalid parameter: '\
128+
'`--rr` expects `true` or `false`, but got `'"$USE_RR"'`' \
129+
>&2
130+
help
131+
exit 1
132+
fi
133+
shift
134+
;;
122135
*)
123136
echo "Unknown parameter: ${1}" >&2
124137
help

scripts/startLocalCluster.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,14 @@ start() {
174174
CMD=$ARANGOD
175175
fi
176176

177+
if [ "$USE_RR" = "true" ]; then
178+
if ! which rr > /dev/null; then
179+
echo 'rr binary not found in PATH!' >&2
180+
exit 1
181+
fi
182+
CMD="rr $CMD"
183+
fi
184+
177185
TYPE=$1
178186
PORT=$2
179187
mkdir -p cluster/data$PORT cluster/apps$PORT

0 commit comments

Comments
 (0)
0