summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorwangkuan <[email protected]>2024-08-23 17:58:22 +0800
committerwangkuan <[email protected]>2024-08-23 17:58:22 +0800
commit215dd9aa1e4ec6a509d64c78ec414a8196dace3c (patch)
tree5c038000b9de72684a1f8b8f1832394aed30cf13 /config
parent07332297c1306aa0dac649c7d15bf131e8edbc7e (diff)
[feature][core][common]GAL-646 Groot Stream支持Split Operator实现动态分流
Diffstat (limited to 'config')
-rw-r--r--config/grootstream_job_example.yaml19
1 files changed, 14 insertions, 5 deletions
diff --git a/config/grootstream_job_example.yaml b/config/grootstream_job_example.yaml
index 4726af0..46d1123 100644
--- a/config/grootstream_job_example.yaml
+++ b/config/grootstream_job_example.yaml
@@ -11,7 +11,14 @@ filters:
type: aviator
properties:
expression: event.server_ip != '12.12.12.12'
-
+splits:
+ decoded_as_split:
+ type: split
+ rules:
+ - name: projection_processor
+ expression: event.decoded_as == 'HTTP'
+ - name: aggregate_processor
+ expression: event.decoded_as == 'DNS'
processing_pipelines:
projection_processor:
type: projection
@@ -25,7 +32,7 @@ processing_pipelines:
group_by_fields: [server_ip,server_port]
window_type: tumbling_processing_time # tumbling_event_time,sliding_processing_time,sliding_event_time
window_timestamp_field: recv_time
- window_size: 60
+ window_size: 6
window_slide: 10 #滑动窗口步长
functions:
- function: NUMBER_SUM
@@ -65,10 +72,12 @@ application:
strategy: none
topology:
- name: inline_source
- downstream: [filter_operator]
- - name: filter_operator
- downstream: [ projection_processor ]
+ downstream: [decoded_as_split]
+ - name: decoded_as_split
+ downstream: [ projection_processor ,aggregate_processor]
- name: projection_processor
downstream: [ print_sink ]
+ - name: aggregate_processor
+ downstream: [ print_sink ]
- name: print_sink
downstream: [] \ No newline at end of file