forked from numaproj/numaflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path6-reduce-fixed-window.yaml
43 lines (43 loc) · 994 Bytes
/
6-reduce-fixed-window.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
apiVersion: numaflow.numaproj.io/v1alpha1
kind: Pipeline
metadata:
name: even-odd-sum
spec:
vertices:
- name: in
source:
http: {}
- name: atoi
scale:
min: 1
udf:
container:
# Tell the input number is even or odd, see https://github.com/numaproj/numaflow-go/tree/main/pkg/function/examples/even_odd
image: quay.io/numaio/numaflow-go/map-even-odd
- name: compute-sum
udf:
container:
# compute the sum
image: quay.io/numaio/numaflow-go/reduce-sum
groupBy:
window:
fixed:
length: 60s
keyed: true
storage:
persistentVolumeClaim:
volumeSize: 10Gi
accessMode: ReadWriteOnce
- name: sink
scale:
min: 1
sink:
log: {}
edges:
- from: in
to: atoi
- from: atoi
to: compute-sum
parallelism: 2
- from: compute-sum
to: sink