-
Notifications
You must be signed in to change notification settings - Fork 0
/
start_griddb.sh
executable file
·107 lines (99 loc) · 2.99 KB
/
start_griddb.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#!/bin/bash
chown gsadm.gridstore /var/lib/gridstore/data
IP=`grep $HOSTNAME /etc/hosts | awk ' { print $1 }'`
cat << EOF > /var/lib/gridstore/conf/gs_cluster.json
{
"dataStore":{
"partitionNum":128,
"storeBlockSize":"64KB"
},
"cluster":{
"clusterName":"defaultCluster",
"replicationNum":1,
"notificationInterval":"5s",
"heartbeatInterval":"5s",
"loadbalanceCheckInterval":"180s",
"notificationMember": [
{
"cluster": {"address":"$IP", "port":10010},
"sync": {"address":"$IP", "port":10020},
"system": {"address":"$IP", "port":10080},
"transaction": {"address":"$IP", "port":10001},
"sql": {"address":"$IP", "port":20001}
}
]
},
"sync":{
"timeoutInterval":"30s"
}
}
EOF
cat << EOF > /var/lib/gridstore/conf/gs_node.json
{
"dataStore":{
"dbPath":"data",
"backupPath":"backup",
"syncTempPath":"sync",
"storeMemoryLimit":"1024MB",
"storeWarmStart":false,
"storeCompressionMode":"NO_COMPRESSION",
"concurrency":2,
"logWriteMode":1,
"persistencyMode":"NORMAL",
"affinityGroupSize":4,
"autoExpire":false
},
"checkpoint":{
"checkpointInterval":"60s",
"checkpointMemoryLimit":"1024MB",
"useParallelMode":false
},
"cluster":{
"servicePort":10010
},
"sync":{
"servicePort":10020
},
"system":{
"servicePort":10040,
"eventLogPath":"log"
},
"transaction":{
"servicePort":10001,
"connectionLimit":5000
},
"trace":{
"default":"LEVEL_ERROR",
"dataStore":"LEVEL_ERROR",
"collection":"LEVEL_ERROR",
"timeSeries":"LEVEL_ERROR",
"chunkManager":"LEVEL_ERROR",
"objectManager":"LEVEL_ERROR",
"checkpointFile":"LEVEL_ERROR",
"checkpointService":"LEVEL_INFO",
"logManager":"LEVEL_WARNING",
"clusterService":"LEVEL_ERROR",
"syncService":"LEVEL_ERROR",
"systemService":"LEVEL_INFO",
"transactionManager":"LEVEL_ERROR",
"transactionService":"LEVEL_ERROR",
"transactionTimeout":"LEVEL_WARNING",
"triggerService":"LEVEL_ERROR",
"sessionTimeout":"LEVEL_WARNING",
"replicationTimeout":"LEVEL_WARNING",
"recoveryManager":"LEVEL_INFO",
"eventEngine":"LEVEL_WARNING",
"clusterOperation":"LEVEL_INFO",
"ioMonitor":"LEVEL_WARNING"
}
}
EOF
gs_passwd admin -p admin
gs_startnode
sleep 5
while gs_stat -u admin/admin | grep RECOV > /dev/null; do
echo Waiting for GridDB to be ready.
sleep 5
done
gs_joincluster -n 1 -u admin/admin
tail -f /var/lib/gridstore/log/gridstore*.log