summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
author王宽 <[email protected]>2024-07-24 06:52:41 +0000
committer王宽 <[email protected]>2024-07-24 06:52:41 +0000
commitb593e070f20c3097a21765229f87c444f3a60bad (patch)
treeb68d0211b548534a97a0d585d13068a4094f1156 /config
parent3cff9a87fa0beab38caff2b34d7344b4186e24e1 (diff)
parentcd6f0015542af281c140b05f35cde8e79cc64a1e (diff)
Merge branch 'feature/aggregate' into 'develop'
[improve][core]新增聚合函数LongCount,Mean以及相关单元测试 See merge request galaxy/platform/groot-stream!79
Diffstat (limited to 'config')
-rw-r--r--config/grootstream_job_example.yaml16
-rw-r--r--config/udf.plugins7
2 files changed, 22 insertions, 1 deletions
diff --git a/config/grootstream_job_example.yaml b/config/grootstream_job_example.yaml
index 62a320b..74239c9 100644
--- a/config/grootstream_job_example.yaml
+++ b/config/grootstream_job_example.yaml
@@ -30,6 +30,22 @@ processing_pipelines:
- function: NUMBER_SUM
lookup_fields: [ sent_pkts ]
output_fields: [ sent_pkts_sum ]
+ - function: NUMBER_SUM
+ lookup_fields: [ sent_bytes ]
+ output_fields: [ sent_bytes_sum ]
+ - function: COLLECT_LIST
+ lookup_fields: [ client_port ]
+ output_fields: [ client_port_list ]
+ - function: COLLECT_SET
+ lookup_fields: [ client_ip ]
+ output_fields: [ client_ip_set ]
+ - function: LONG_COUNT
+ output_fields: [ sessions ]
+ - function: MEAN
+ lookup_fields: [ received_pkts ]
+ output_fields: [ received_pkts_mean ]
+ parameters:
+ precision: 1
sinks:
print_sink:
type: print
diff --git a/config/udf.plugins b/config/udf.plugins
index a8a62b4..b3f67b4 100644
--- a/config/udf.plugins
+++ b/config/udf.plugins
@@ -14,4 +14,9 @@ com.geedgenetworks.core.udf.PathCombine
com.geedgenetworks.core.udf.Rename
com.geedgenetworks.core.udf.SnowflakeId
com.geedgenetworks.core.udf.StringJoiner
-com.geedgenetworks.core.udf.UnixTimestampConverter \ No newline at end of file
+com.geedgenetworks.core.udf.UnixTimestampConverter
+com.geedgenetworks.core.udf.udaf.NumberSum
+com.geedgenetworks.core.udf.udaf.CollectList
+com.geedgenetworks.core.udf.udaf.CollectSet
+com.geedgenetworks.core.udf.udaf.LongCount
+com.geedgenetworks.core.udf.udaf.Mean \ No newline at end of file