-
Notifications
You must be signed in to change notification settings - Fork 0
/
db-telco.yaml
293 lines (293 loc) · 18.8 KB
/
db-telco.yaml
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
apiVersion: insights.kx.com/v1
kind: Assembly
metadata:
name: db-telco
labels:
insights.kx.com/databaseID: 5bd540bc-caa8-0945-b935-e2ca2c8ea37d
spec:
labels:
kxname: db-telco
tables:
main:
name: main
type: partitioned
primaryKeys: []
prtnCol: ts
columns:
- type: timestamp
attrDisk: parted
attrOrd: parted
name: ts
- type: symbol
name: cellID
- type: ""
name: phase
- type: string
name: imsi
- type: string
name: imei
- type: float
name: dspeed
- type: float
name: uspeed
- type: float
name: lat
- type: float
name: lng
- type: float
name: cellDistance
errs:
columns:
- type: timestamp
attrDisk: parted
attrOrd: parted
name: ts
- type: symbol
name: imsi
- type: long
name: count0
name: errs
type: partitioned
primaryKeys: []
prtnCol: ts
mounts:
rdb:
type: stream
baseURI: none
partition: none
dependency:
- idb
volume: {}
idb:
type: local
baseURI: file:///data/db/idb
partition: ordinal
volume:
size: 250Gi
hdb:
type: local
baseURI: file:///data/db/hdb
partition: date
dependency:
- idb
volume:
size: 2Ti
elements:
dap:
instances:
da:
rtLogVolume:
size: 40Gi
size: 1
source: db-telco
k8sPolicy:
resources:
requests:
cpu: 100m
memory: 2Gi
limits:
cpu: 200m
memory: 4Gi
mountList:
- rdb
- idb
- hdb
sm:
source: db-telco
eodPeachLevel: part
size: 1
rtLogVolume:
size: 40Gi
tiers:
- mount: rdb
name: rdb
retain: {}
- compression:
algorithm: qipc
block: 14
mount: idb
name: idb
schedule:
freq: 0D00:10:00
retain: {}
- compression:
algorithm: qipc
block: 14
mount: hdb
name: hdb
retain: {}
schedule:
freq: 1D00:00:00
k8sPolicy:
resources:
requests:
cpu: 500m
memory: 2Gi
limits:
cpu: 1000m
memory: 4Gi
sp:
pipelines:
telco-ppline:
base: q
maxWorkers: 10
minWorkers: 1
monitoring: true
persistence:
controller:
disabled: false
class: ""
size: 20Gi
checkpointFreq: 5000
worker:
disabled: false
class: ""
size: 20Gi
checkpointFreq: 5000
protectedExecution: true
imagePullSecrets: []
secrets: []
env:
- name: KXI_ERROR_MODE
value: "0"
- name: KXI_PROTECTED_EXECUTION
value: "false"
- name: KXI_LOG_FORMAT
value: json
- name: KXI_LOG_LEVELS
value: "DEFAULT: INFO"
spec: '{"vertices":[{"id":"Kafka","function":null,"inputs":{"":"*"},"outputs":{"e1703760809726":"*"},"config":{"offset":"end","retries":10,"retryWait":"0D00:00:02.000000000","pollLimit":1000,"brokers":"3.255.222.110:9092","topic":"post_t2"},"metadata":{"type":"reader","plugin":"kafka.reader","params":[],"initialState":null,"stateful":false,"version":1,"ui":{"position":{"x":100,"y":225},"color":"#0061ff","type":"kafka.reader","version":"insights-1.8.0","data":{"id":"Kafka","function":null,"inputs":{"":"*"},"outputs":{"e1703760809726":"*"},"config":{"offset":"end","__useTLS":false,"__useReg":false,"retries":10,"retryWait":"0D00:00:02.000000000","pollLimit":1000,"__useConfig":false,"brokers":"3.255.222.110:9092","topic":"post_t2"},"metadata":{"type":"reader","plugin":"kafka.reader","params":[],"initialState":null,"stateful":false,"version":1}},"id":"Kafka"}}},{"id":"JSON","function":null,"inputs":{"e1703760809726":"*"},"outputs":{"e1703760825797":"*"},"config":{},"metadata":{"type":"decoder","plugin":"json.decode","params":[],"initialState":null,"stateful":false,"version":1,"ui":{"position":{"x":350,"y":225},"color":"#76c398","type":"json.decode","version":"insights-1.8.0","data":{"id":"JSON","function":null,"inputs":{"e1703760809726":"*"},"outputs":{"e1703760825797":"*"},"config":{},"metadata":{"type":"decoder","plugin":"json.decode","params":[],"initialState":null,"stateful":false,"version":1}},"id":"JSON"}}},{"id":"Map","function":{"format":"q","function":"//
@param data {any} data from the previous node\n// @return {any} data
to pass to the next node\n{[data]\n data[`ts]: .z.p;\n enlist
data\n }"},"inputs":{"e1703760825797":"*"},"outputs":{"e1703763990539":"*"},"config":{"allowPartials":true},"metadata":{"type":"operator","plugin":"map","params":[],"initialState":null,"stateful":false,"version":1,"ui":{"position":{"x":600,"y":225},"color":"#ffae72","type":"map","version":"insights-1.8.0","data":{"id":"Map","function":{"format":"q","function":"//
@param data {any} data from the previous node\n// @return {any} data
to pass to the next node\n{[data]\n data[`ts]: .z.p;\n enlist
data\n }"},"inputs":{"e1703760825797":"*"},"outputs":{"e1703763990539":"*"},"config":{"allowPartials":true},"metadata":{"type":"operator","plugin":"map","params":[],"initialState":null,"stateful":false,"version":1}},"id":"Map"}}},{"id":"Apply
Schema -
Main","function":null,"inputs":{"e1703763992606":"*"},"outputs":{"e1703762098907":"*"},"config":{"inputType":"table","schemaType":"schema","schema":[{"name":"ts","datatype":"timestamp","tokenize":"auto"},{"name":"cellID","datatype":"symbol","tokenize":"auto"},{"name":"phase","datatype":"","tokenize":"auto"},{"name":"imsi","datatype":"string","tokenize":"auto"},{"name":"imei","datatype":"string","tokenize":"auto"},{"name":"dspeed","datatype":"float","tokenize":"auto"},{"name":"uspeed","datatype":"float","tokenize":"auto"},{"name":"lat","datatype":"float","tokenize":"auto"},{"name":"lng","datatype":"float","tokenize":"auto"},{"name":"cellDistance","datatype":"float","tokenize":"auto"}]},"metadata":{"type":"transform","plugin":"schema","params":[],"initialState":null,"stateful":false,"version":1,"ui":{"position":{"x":1100,"y":100},"color":"#85b6ff","type":"schema","version":"insights-1.8.0","data":{"id":"Apply
Schema -
Main","function":null,"inputs":{"e1703763992606":"*"},"outputs":{"e1703762098907":"*"},"config":{"inputType":"table","schemaType":"schema","schema":[{"name":"ts","datatype":"timestamp","tokenize":"auto"},{"name":"cellID","datatype":"symbol","tokenize":"auto"},{"name":"phase","datatype":"","tokenize":"auto"},{"name":"imsi","datatype":"string","tokenize":"auto"},{"name":"imei","datatype":"string","tokenize":"auto"},{"name":"dspeed","datatype":"float","tokenize":"auto"},{"name":"uspeed","datatype":"float","tokenize":"auto"},{"name":"lat","datatype":"float","tokenize":"auto"},{"name":"lng","datatype":"float","tokenize":"auto"},{"name":"cellDistance","datatype":"float","tokenize":"auto"}]},"metadata":{"type":"transform","plugin":"schema","params":[],"initialState":null,"stateful":false,"version":1}},"id":"Apply
Schema - Main"}}},{"id":"kdb Insights Database -
Main","function":null,"inputs":{"e1703762101710":"*"},"outputs":{"":"*"},"config":{"directWrite":false,"deduplicate":true,"assembly":"db-telco","table":"main"},"metadata":{"type":"writer","plugin":"database.writer","params":[],"initialState":null,"stateful":false,"version":1,"ui":{"position":{"x":1600,"y":100},"color":"#f23a65","type":"database.writer","version":"insights-1.8.0","data":{"id":"kdb
Insights Database -
Main","function":null,"inputs":{"e1703762101710":"*"},"outputs":{"":"*"},"config":{"directWrite":false,"deduplicate":true,"__setTimeoutVal":false,"assembly":"db-telco","table":"main"},"metadata":{"type":"writer","plugin":"database.writer","params":[],"initialState":null,"stateful":false,"version":1}},"id":"kdb
Insights Database - Main"}}},{"id":"Apply -
Main","function":{"format":"q","function":"// This function is
applied to incoming batches\n//\n// @param op {#.qsp.op} operator
definition\n// @param md {#.qsp.message.metadata} metadata of the
data from the previous node\n// @param data {any} data from the
previous node\n// @return {null} push data to the next node using
`.qsp.push`\n{[op;md;data]\n .qsp.push[op;md] each 0N
5000#data\n }"},"inputs":{"e1703762098907":"*"},"outputs":{"e1703762101710":"*"},"config":{"onFinish":{"format":"q","function":"//
@param op {dictionary} The operator\n// @param md {dictionary} A
metadata dictionary containing only the key\n// @return {null} Data
must be emitted using .qsp.push\n\n{[op; md]\n // state:
.qsp.get[op; md];\n // .qsp.push[op; md;
state];\n }"}},"metadata":{"type":"operator","plugin":"apply","params":["operator","metadata"],"initialState":null,"stateful":false,"version":1,"ui":{"position":{"x":1350,"y":100},"color":"#ffae72","type":"apply","version":"insights-1.8.0","data":{"id":"Apply
- Main","function":{"format":"q","function":"// This function is
applied to incoming batches\n//\n// @param op {#.qsp.op} operator
definition\n// @param md {#.qsp.message.metadata} metadata of the
data from the previous node\n// @param data {any} data from the
previous node\n// @return {null} push data to the next node using
`.qsp.push`\n{[op;md;data]\n .qsp.push[op;md] each 0N
5000#data\n }"},"inputs":{"e1703762098907":"*"},"outputs":{"e1703762101710":"*"},"config":{"onFinish":{"format":"q","function":"//
@param op {dictionary} The operator\n// @param md {dictionary} A
metadata dictionary containing only the key\n// @return {null} Data
must be emitted using .qsp.push\n\n{[op; md]\n // state:
.qsp.get[op; md];\n // .qsp.push[op; md;
state];\n }"}},"metadata":{"type":"operator","plugin":"apply","params":[],"initialState":null,"stateful":false,"version":1}},"id":"Apply
-
Main"}}},{"id":"Split","function":null,"inputs":{"e1703763990539":"*"},"outputs":{"e1703763992606":"*","e1703764026256":"*"},"config":{},"metadata":{"type":"operator","plugin":"split","params":[],"initialState":null,"stateful":false,"version":1,"ui":{"position":{"x":850,"y":225},"color":"#ffae72","type":"split","version":"insights-1.8.0","data":{"id":"Split","function":null,"inputs":{"e1703763990539":"*"},"outputs":{"e1703763992606":"*","e1703764026256":"*"},"config":{},"metadata":{"type":"operator","plugin":"split","params":[],"initialState":null,"stateful":false,"version":1}},"id":"Split"}}},{"id":"Timer
Window","function":null,"inputs":{"e1703764026256":"*"},"outputs":{"e1703765239975":"*"},"config":{"skipEmptyWindows":false,"acceptDictionaries":true,"period":"0D00:00:10.000000000"},"metadata":{"type":"window","plugin":"timerWindow","params":[],"initialState":null,"stateful":false,"version":1,"ui":{"position":{"x":1100,"y":350},"color":"#9bf2de","type":"timerWindow","version":"insights-1.8.0","data":{"id":"Timer
Window","function":null,"inputs":{"e1703764026256":"*"},"outputs":{"e1703765239975":"*"},"config":{"skipEmptyWindows":false,"__showCountTrigger":false,"acceptDictionaries":true,"period":"0D00:00:10.000000000"},"metadata":{"type":"window","plugin":"timerWindow","params":[],"initialState":null,"stateful":false,"version":1}},"id":"Timer
Window"}}},{"id":"Apply Schema -
Errs","function":null,"inputs":{"e1703765243106":"*"},"outputs":{"e1703765244970":"*"},"config":{"inputType":"table","schemaType":"schema","schema":[{"name":"ts","datatype":"timestamp","tokenize":"auto"},{"name":"imsi","datatype":"symbol","tokenize":"auto"},{"name":"count0","datatype":"long","tokenize":"auto"}]},"metadata":{"type":"transform","plugin":"schema","params":[],"initialState":null,"stateful":false,"version":1,"ui":{"position":{"x":1600,"y":350},"color":"#85b6ff","type":"schema","version":"insights-1.8.0","data":{"id":"Apply
Schema -
Errs","function":null,"inputs":{"e1703765243106":"*"},"outputs":{"e1703765244970":"*"},"config":{"inputType":"table","schemaType":"schema","schema":[{"name":"ts","datatype":"timestamp","tokenize":"auto"},{"name":"imsi","datatype":"symbol","tokenize":"auto"},{"name":"count0","datatype":"long","tokenize":"auto"}]},"metadata":{"type":"transform","plugin":"schema","params":[],"initialState":null,"stateful":false,"version":1}},"id":"Apply
Schema - Errs"}}},{"id":"Map -
Errs","function":{"format":"q","function":"// @param data {any} data
from the previous node\n// @return {any} data to pass to the next
node\n{[data]\n 0!select count0: count i by imsi, ts from data
where uspeed < avg[uspeed] | dspeed < avg[dspeed]
\n }"},"inputs":{"e1703765239975":"*"},"outputs":{"e1703765243106":"*"},"config":{"allowPartials":true},"metadata":{"type":"operator","plugin":"map","params":[],"initialState":null,"stateful":false,"version":1,"ui":{"position":{"x":1350,"y":350},"color":"#ffae72","type":"map","version":"insights-1.8.0","data":{"id":"Map
- Errs","function":{"format":"q","function":"// @param data {any}
data from the previous node\n// @return {any} data to pass to the
next node\n{[data]\n 0!select count0: count i by imsi, ts from
data where uspeed < avg[uspeed] | dspeed < avg[dspeed]
\n }"},"inputs":{"e1703765239975":"*"},"outputs":{"e1703765243106":"*"},"config":{"allowPartials":true},"metadata":{"type":"operator","plugin":"map","params":[],"initialState":null,"stateful":false,"version":1}},"id":"Map
- Errs"}}},{"id":"kdb Insights
Database-1","function":null,"inputs":{"e1703765244970":"*"},"outputs":{"":"*"},"config":{"directWrite":false,"deduplicate":true,"assembly":"db-telco","table":"errs"},"metadata":{"type":"writer","plugin":"database.writer","params":[],"initialState":null,"stateful":false,"version":1,"ui":{"position":{"x":1850,"y":350},"color":"#f23a65","type":"database.writer","version":"insights-1.8.0","data":{"id":"kdb
Insights
Database-1","function":null,"inputs":{"e1703765244970":"*"},"outputs":{"":"*"},"config":{"directWrite":false,"deduplicate":true,"__setTimeoutVal":false,"assembly":"db-telco","table":"errs"},"metadata":{"type":"writer","plugin":"database.writer","params":[],"initialState":null,"stateful":false,"version":1}},"id":"kdb
Insights
Database-1"}}}],"edges":[{"destination":"JSON","source":"Kafka","edge":"e1703760809726","metadata":{"ui":{"id":"e1703760809726","source":"Kafka","target":"JSON","sourceHandle":"0","targetHandle":"0","animated":false,"type":"wideBezier"}},"valid":true},{"destination":"Map","source":"JSON","edge":"e1703760825797","metadata":{"ui":{"id":"e1703760825797","source":"JSON","target":"Map","sourceHandle":"0","targetHandle":"0","animated":false,"type":"wideBezier"}},"valid":true},{"destination":"Apply
- Main","source":"Apply Schema -
Main","edge":"e1703762098907","metadata":{"ui":{"id":"e1703762098907","source":"Apply
Schema - Main","target":"Apply -
Main","sourceHandle":"0","targetHandle":"0","animated":false,"type":"wideBezier"}},"valid":true},{"destination":"kdb
Insights Database - Main","source":"Apply -
Main","edge":"e1703762101710","metadata":{"ui":{"id":"e1703762101710","source":"Apply
- Main","target":"kdb Insights Database -
Main","sourceHandle":"0","targetHandle":"0","animated":false,"type":"wideBezier"}},"valid":true},{"destination":"Split","source":"Map","edge":"e1703763990539","metadata":{"ui":{"id":"e1703763990539","source":"Map","target":"Split","sourceHandle":"0","targetHandle":"0","animated":false,"type":"wideBezier"}},"valid":true},{"destination":"Apply
Schema -
Main","source":"Split","edge":"e1703763992606","metadata":{"ui":{"id":"e1703763992606","source":"Split","target":"Apply
Schema -
Main","sourceHandle":"0","targetHandle":"0","animated":false,"type":"wideBezier"}},"valid":true},{"destination":"Timer
Window","source":"Split","edge":"e1703764026256","metadata":{"ui":{"id":"e1703764026256","source":"Split","target":"Timer
Window","sourceHandle":"1","targetHandle":"0","animated":false,"type":"wideBezier"}},"valid":true},{"destination":"Map
- Errs","source":"Timer
Window","edge":"e1703765239975","metadata":{"ui":{"id":"e1703765239975","source":"Timer
Window","target":"Map -
Errs","sourceHandle":"0","targetHandle":"0","animated":false,"type":"wideBezier"}},"valid":true},{"destination":"Apply
Schema - Errs","source":"Map -
Errs","edge":"e1703765243106","metadata":{"ui":{"id":"e1703765243106","source":"Map
- Errs","target":"Apply Schema -
Errs","sourceHandle":"0","targetHandle":"0","animated":true}},"valid":true},{"destination":"kdb
Insights Database-1","source":"Apply Schema -
Errs","edge":"e1703765244970","metadata":{"ui":{"id":"e1703765244970","source":"Apply
Schema - Errs","target":"kdb Insights
Database-1","sourceHandle":"0","targetHandle":"0","animated":true}},"valid":true}],"code":{"format":"q","function":""}}'
type: graph
workerThreads: 1
controllerK8sPolicy:
resources:
requests:
cpu: 250m
memory: 128Mi
limits:
cpu: 500m
memory: 256Mi
workerK8sPolicy:
resources:
requests:
cpu: 500m
memory: 256Mi
limits:
cpu: 1000m
memory: 512Mi
labels: {}
workerImage:
repo: ""
component: ""
tag: ""
controllerImage:
repo: ""
component: ""
tag: ""
replicas: 1
sequencer:
db-telco:
external: false
volume:
size: 40Gi
k8sPolicy:
resources:
limits:
memory: 1Gi
cpu: 1000m
requests:
memory: 512Mi
cpu: 1000m
queryEnvironment:
enabled: true
size: 1