mirror of https://gitee.com/bigwinds/arangodb
Add -r option for rocksDB engine to startLocalCluster.sh
This commit is contained in:
parent
31c9e04ae6
commit
1f842312f5
|
@ -16,6 +16,7 @@ function help() {
|
|||
echo " -x/--xterm XTerm command (default: xterm)"
|
||||
echo " -o/--xterm-options XTerm options (default: --geometry=80x43)"
|
||||
echo " -b/--offset-ports Offset ports (default: 0, i.e. A:4001, C:8530, D:8629)"
|
||||
echo " -r/--rocksDB Use RocksDB storage engine (default: not)"
|
||||
echo ""
|
||||
echo "EXAMPLES:"
|
||||
echo " $0"
|
||||
|
@ -43,6 +44,7 @@ SECONDARIES=0
|
|||
BUILD="build"
|
||||
JWT_SECRET=""
|
||||
PORT_OFFSET=0
|
||||
USE_ROCKSDB=""
|
||||
|
||||
while [[ ${1} ]]; do
|
||||
case "${1}" in
|
||||
|
@ -102,6 +104,10 @@ while [[ ${1} ]]; do
|
|||
BUILD=${2}
|
||||
shift
|
||||
;;
|
||||
-r|--rocksDB)
|
||||
USE_ROCKSDB=1
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Unknown parameter: ${1}" >&2
|
||||
help
|
||||
|
@ -113,4 +119,4 @@ while [[ ${1} ]]; do
|
|||
echo 'Missing parameter argument.' >&2
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
|
|
@ -6,6 +6,13 @@ if [ "$POOLSZ" == "" ] ; then
|
|||
POOLSZ=$NRAGENTS
|
||||
fi
|
||||
|
||||
if [ -z "USE_ROCKSDB" ] ; then
|
||||
STORAGE_ENGINE=""
|
||||
DEFAULT_REPLICATION=""
|
||||
else
|
||||
STORAGE_ENGINE="--server.storage-engine=rocksdb"
|
||||
DEFAULT_REPLICATION="--cluster.system-replication-factor=1"
|
||||
fi
|
||||
|
||||
printf "Starting agency ... \n"
|
||||
printf " # agents: %s," "$NRAGENTS"
|
||||
|
@ -103,6 +110,8 @@ for aid in `seq 0 $(( $NRAGENTS - 1 ))`; do
|
|||
--log.file cluster/$port.log \
|
||||
--log.force-direct true \
|
||||
--log.level agency=$LOG_LEVEL_AGENCY \
|
||||
$STORAGE_ENGINE \
|
||||
$DEFAULT_REPLICATION \
|
||||
$AUTHENTICATION \
|
||||
$SSLKEYFILE \
|
||||
> cluster/$port.stdout 2>&1 &
|
||||
|
@ -137,8 +146,10 @@ start() {
|
|||
--javascript.app-path cluster/apps$PORT \
|
||||
--log.force-direct true \
|
||||
--log.level cluster=$LOG_LEVEL_CLUSTER \
|
||||
$AUTHENTICATION \
|
||||
$SSLKEYFILE \
|
||||
$STORAGE_ENGINE \
|
||||
$DEFAULT_REPLICATION \
|
||||
$AUTHENTICATION \
|
||||
$SSLKEYFILE \
|
||||
> cluster/$PORT.stdout 2>&1 &
|
||||
}
|
||||
|
||||
|
@ -166,6 +177,8 @@ startTerminal() {
|
|||
--javascript.startup-directory ./js \
|
||||
--javascript.module-directory ./enterprise/js \
|
||||
--javascript.app-path ./js/apps \
|
||||
$STORAGE_ENGINE \
|
||||
$DEFAULT_REPLICATION \
|
||||
$AUTHENTICATION \
|
||||
$SSLKEYFILE \
|
||||
--console" &
|
||||
|
@ -195,6 +208,10 @@ startDebugger() {
|
|||
--javascript.startup-directory ./js \
|
||||
--javascript.module-directory ./enterprise/js \
|
||||
--javascript.app-path ./js/apps \
|
||||
$STORAGE_ENGINE \
|
||||
$DEFAULT_REPLICATION \
|
||||
$STORAGE_ENGINE \
|
||||
$DEFAULT_REPLICATION \
|
||||
$SSLKEYFILE \
|
||||
$AUTHENTICATION &
|
||||
$XTERM $XTERMOPTIONS -e "gdb ${BUILD}/bin/arangod -p $!" &
|
||||
|
@ -224,6 +241,8 @@ startRR() {
|
|||
--javascript.startup-directory ./js \
|
||||
--javascript.module-directory ./enterprise/js \
|
||||
--javascript.app-path ./js/apps \
|
||||
$STORAGE_ENGINE \
|
||||
$DEFAULT_REPLICATION \
|
||||
$AUTHENTICATION \
|
||||
$SSLKEYFILE \
|
||||
--console" &
|
||||
|
@ -314,6 +333,8 @@ if [ "$SECONDARIES" == "1" ] ; then
|
|||
--server.statistics true \
|
||||
--javascript.startup-directory ./js \
|
||||
--javascript.module-directory ./enterprise/js \
|
||||
$STORAGE_ENGINE \
|
||||
$DEFAULT_REPLICATION \
|
||||
$AUTHENTICATION \
|
||||
$SSLKEYFILE \
|
||||
--javascript.app-path ./js/apps \
|
||||
|
|
Loading…
Reference in New Issue