Skip to content

Commit

Permalink
fix: typos in reduce examples (#556)
Browse files Browse the repository at this point in the history
Signed-off-by: Julie Vogelmani <[email protected]>
Signed-off-by: Vigith Maurice <[email protected]>
Co-authored-by: Vigith Maurice <[email protected]>
  • Loading branch information
2 people authored and whynowy committed Mar 13, 2023
1 parent 0dc3f5c commit ecbe3a0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/user-guide/user-defined-functions/reduce/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ keyed window.
```

```shell
kubectl apply -f https://github.com/numaproj/numaflow/blob/main/examples/examples/6-reduce-fixed-window.yaml
kubectl apply -f https://raw.githubusercontent.com/numaproj/numaflow/main/examples/6-reduce-fixed-window.yaml
```

Output :
Expand All @@ -57,7 +57,7 @@ Output :

In our example, input is an HTTP source producing 2 messages each second with values 5 and 10,
and the event time starts from 60000. Since we have considered a fixed window of length 60s,
and also we are producing two messages with different keys "even" and "odd". Numaflow will create
and also we are producing two messages with different keys "even" and "odd", Numaflow will create
two different windows with a start time of 60000 and an end time of 120000. So the output will be
300(5 * 60) and 600(10 * 60).

Expand All @@ -71,24 +71,24 @@ The snippet for the reduce vertex is as follows.
![plot](../../../assets/simple-reduce.png)

```yaml
- name: compute-sum
- name: reduce-sliding
udf:
container:
# compute the sum
image: quay.io/numaio/numaflow-go/reduce-sum
groupBy:
window:
sliding:
length: 10s
slide: 5s
length: 60s
slide: 10s
keyed: true
```

[7-reduce-sliding-window.yaml](https://github.com/numaproj/numaflow/blob/main/examples/examples/7-reduce-sliding-window.yaml)
has the complete pipeline definition

```shell
kubectl apply -f https://github.com/numaproj/numaflow/blob/main/examples/examples/7-reduce-sliding-window.yaml
kubectl apply -f https://raw.githubusercontent.com/numaproj/numaflow/main/examples/7-reduce-sliding-window.yaml
```
Output:
```text
Expand All @@ -105,7 +105,7 @@ and the event time starts from 60000. Since we have considered a sliding window
and slide 10s, and also we are producing two messages with different keys "even" and "odd".
Numaflow will create two different windows with a start time of 60000 and an end time of 120000,
and because the slide duration is 10s, a next set of windows will be created with start time of
70000 and an end time of 130000. Since its a sum operation the output will be 300(5 * 60) and 600(10 * 60).
70000 and an end time of 130000. Since it's a sum operation the output will be 300(5 * 60) and 600(10 * 60).

`Payload - 50 Key - odd Start - 10000 End - 70000`, we see 50 here for odd because the
first window has only 10 elements
Expand All @@ -123,7 +123,7 @@ In the complex reduce example, we will
has the complete pipeline definition

```shell
kubectl apply -f https://github.com/numaproj/numaflow/blob/main/examples/examples/8-reduce-complex-pipeline.yaml
kubectl apply -f https://raw.githubusercontent.com/numaproj/numaflow/main/examples/8-reduce-complex-pipeline.yaml
```

Output:
Expand Down

0 comments on commit ecbe3a0

Please sign in to comment.