Skip to content

Commit

Permalink
chore: updating reduce examples doc (#564)
Browse files Browse the repository at this point in the history
Signed-off-by: Yashash H L <[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 05ec77f commit 721ef0f
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions docs/user-guide/user-defined-functions/reduce/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ Install the ISB
kubectl apply -f https://raw.githubusercontent.com/numaproj/numaflow/stable/examples/0-isbsvc-jetstream.yaml
```

Source used in the examples is an HTTP source producing messages with value 5 and 10 with event time
starting from 60000. Please refer the doc [http source](../../sources/http.md) on how to use an HTTP
source.
An example will be as follows,

```sh
curl -kq -X POST -H "x-numaflow-event-time: 60000" -d "5" ${http-source-url}
curl -kq -X POST -H "x-numaflow-event-time: 60000" -d "10" ${http-source-url}
```

## sum pipeline using fixed window
This is a simple reduce pipeline that just does summation (sum of numbers) but uses fixed window.
The snippet for the reduce vertex is as follows.
Expand Down Expand Up @@ -84,7 +94,7 @@ The snippet for the reduce vertex is as follows.
keyed: true
```

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

```shell
Expand Down Expand Up @@ -119,7 +129,7 @@ In the complex reduce example, we will

![plot](../../../assets/complex-reduce.png)

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

```shell
Expand Down

0 comments on commit 721ef0f

Please sign in to comment.