-
Notifications
You must be signed in to change notification settings - Fork 227
/
filodb-dev-start.sh
executable file
·49 lines (41 loc) · 1.51 KB
/
filodb-dev-start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env bash
set -e
#set -x
function showHelp {
echo "`basename $0` [-h] [-d] [-o arg]"
echo " -h help"
echo " -d start downsample server"
echo " -o ordinal number of this dev server"
echo "configuration used is hard-coded to conf/timeseries-filodb-server.conf"
}
ORDINAL="0"
DOWNSAMPLE=""
while getopts "ho:d" opt; do
case "$opt" in
h|\?) showHelp
exit 1
;;
o) ORDINAL=$OPTARG
;;
d) DOWNSAMPLE="-ds"
esac
done
cd "$(dirname "$0")"
# if downsample arg is present choose the downsample config. Otherwise regular server config
CONFIG=conf/timeseries-filodb-server$DOWNSAMPLE.conf
if [ $ORDINAL -eq "0" ]; then
ADDL_JAVA_OPTS=" -Dfilodb.cluster-discovery.localhost-ordinal=0"
elif [ $ORDINAL -eq "1" ]; then
ADDL_JAVA_OPTS=" -Dfilodb.cluster-discovery.localhost-ordinal=1 -Dakka.remote.netty.tcp.port=3552 -Dfilodb.http.bind-port=0 -Dkamon.environment.service=filodb-local2"
else
echo "Only ordinals 0 and 1 are supported"
exit
fi
if [ ! -f standalone/target/scala-2.12/standalone-assembly-*-SNAPSHOT.jar ]; then
echo "Standalone assembly not found. Building..."
sbt standalone/assembly
fi
FIXED_JAVA_OPTS="-Xmx2G -Dconfig.file=$CONFIG -Dlogback.configurationFile=conf/logback-dev.xml "
echo "Starting FiloDB standalone server ..."
echo "Java Opts Used: $FIXED_JAVA_OPTS $ADDL_JAVA_OPTS"
java $FIXED_JAVA_OPTS $ADDL_JAVA_OPTS -cp standalone/target/scala-2.12/standalone-assembly-*-SNAPSHOT.jar filodb.standalone.FiloServer