forked from numaproj/numaflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
12-simple-session-pipeline.yaml
49 lines (49 loc) · 1.22 KB
/
12-simple-session-pipeline.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
apiVersion: numaflow.numaproj.io/v1alpha1
kind: Pipeline
metadata:
name: simple-session-counter
spec:
watermark:
maxDelay: 30s
vertices:
- name: in
scale:
min: 1
source:
http: {}
- name: even-odd
scale:
min: 1
udf:
container:
image: quay.io/numaio/numaflow-go/map-even-odd:stable
imagePullPolicy: Always
- name: compute-count
partitions: 1
udf:
container:
# see https://github.com/numaproj/numaflow-go/tree/main/pkg/sessionreducer/examples/counter
# computes the count of even numbers and odd numbers in a session
image: quay.io/numaio/numaflow-go/session-counter:stable
imagePullPolicy: Always
groupBy:
window:
session:
timeout: 120s # session window will be closed after 120 seconds of inactivity
keyed: true
storage:
persistentVolumeClaim:
volumeSize: 2Gi
accessMode: ReadWriteOnce
- name: sink
scale:
min: 1
sink:
log: {}
edges:
- from: in
to: even-odd
- from: even-odd
to: compute-count
- from: compute-count
to: sink