mirror of https://gitee.com/bigwinds/arangodb
Add rr support for startLocalCluster.
This commit is contained in:
parent
c2049b8ee1
commit
55998ba0a9
|
@ -22,6 +22,9 @@ if [ ! -z "$3" ] ; then
|
|||
elif [ "$3" == "D" ] ; then
|
||||
CLUSTERDEBUGGER=1
|
||||
echo Running cluster in debugger.
|
||||
elif [ "$3" == "R" ] ; then
|
||||
RRDEBUGGER=1
|
||||
echo Running cluster in rr with --console.
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -117,10 +120,39 @@ startDebugger() {
|
|||
xterm $XTERMOPTIONS -title "$TYPE $PORT" -e gdb build/bin/arangod -p $! &
|
||||
}
|
||||
|
||||
startRR() {
|
||||
if [ "$1" == "dbserver" ]; then
|
||||
ROLE="PRIMARY"
|
||||
elif [ "$1" == "coordinator" ]; then
|
||||
ROLE="COORDINATOR"
|
||||
fi
|
||||
TYPE=$1
|
||||
PORT=$2
|
||||
mkdir cluster/data$PORT
|
||||
echo Starting $TYPE on port $PORT with rr tracer
|
||||
xterm $XTERMOPTIONS -title "$TYPE $PORT" -e rr build/bin/arangod \
|
||||
--database.directory cluster/data$PORT \
|
||||
--cluster.agency-endpoint tcp://127.0.0.1:4001 \
|
||||
--cluster.my-address tcp://127.0.0.1:$PORT \
|
||||
--server.endpoint tcp://127.0.0.1:$PORT \
|
||||
--cluster.my-local-info $TYPE:127.0.0.1:$PORT \
|
||||
--cluster.my-role $ROLE \
|
||||
--log.file cluster/$PORT.log \
|
||||
--log.requests-file cluster/$PORT.req \
|
||||
--server.disable-statistics true \
|
||||
--javascript.startup-directory ./js \
|
||||
--javascript.app-path ./js/apps \
|
||||
--server.disable-authentication true \
|
||||
--server.foxx-queues false \
|
||||
--console &
|
||||
}
|
||||
|
||||
PORTTOPDB=`expr 8629 + $NRDBSERVERS - 1`
|
||||
for p in `seq 8629 $PORTTOPDB` ; do
|
||||
if [ "$CLUSTERDEBUGGER" == "1" ] ; then
|
||||
startDebugger dbserver $p
|
||||
elif [ "$RRDEBUGGER" == "1" ] ; then
|
||||
startRR dbserver $p
|
||||
else
|
||||
start dbserver $p
|
||||
fi
|
||||
|
@ -131,6 +163,8 @@ for p in `seq 8530 $PORTTOPCO` ; do
|
|||
startDebugger coordinator $p
|
||||
elif [ $p == "8530" -a ! -z "$COORDINATORCONSOLE" ] ; then
|
||||
startTerminal coordinator $p
|
||||
elif [ "$RRDEBUGGER" == "1" ] ; then
|
||||
startRR coordinator $p
|
||||
else
|
||||
start coordinator $p
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue