Skip to content

Commit

Permalink
deploy: 06e69e4
Browse files Browse the repository at this point in the history
  • Loading branch information
whynowy committed Jul 19, 2024
1 parent e9e9129 commit aab91cc
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 1 deletion.
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

Binary file modified sitemap.xml.gz
Binary file not shown.
59 changes: 59 additions & 0 deletions user-guide/user-defined-functions/map/map/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,26 @@
Streaming Mode
</a>

</li>

<li class="md-nav__item">
<a href="#batch-map-mode" class="md-nav__link">
Batch Map Mode
</a>

<nav class="md-nav" aria-label="Batch Map Mode">
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#important-considerations" class="md-nav__link">
Important Considerations
</a>

</li>

</ul>
</nav>

</li>

<li class="md-nav__item">
Expand Down Expand Up @@ -2285,6 +2305,26 @@
Streaming Mode
</a>

</li>

<li class="md-nav__item">
<a href="#batch-map-mode" class="md-nav__link">
Batch Map Mode
</a>

<nav class="md-nav" aria-label="Batch Map Mode">
<ul class="md-nav__list">

<li class="md-nav__item">
<a href="#important-considerations" class="md-nav__link">
Important Considerations
</a>

</li>

</ul>
</nav>

</li>

<li class="md-nav__item">
Expand Down Expand Up @@ -2363,6 +2403,25 @@ <h3 id="streaming-mode">Streaming Mode<a class="headerlink" href="#streaming-mod
<li><a href="https://github.com/numaproj/numaflow-go/tree/main/pkg/mapstreamer/examples/flatmap_stream/">Golang</a></li>
<li><a href="https://github.com/numaproj/numaflow-java/tree/main/examples/src/main/java/io/numaproj/numaflow/examples/mapstream/flatmapstream/">Java</a></li>
</ul>
<h3 id="batch-map-mode">Batch Map Mode<a class="headerlink" href="#batch-map-mode" title="Permanent link">&para;</a></h3>
<p>BatchMap is an interface that allows developers to process multiple data items in a UDF single call,
rather than each item in separate calls.</p>
<p>The BatchMap interface can be helpful in scenarios where performing operations on a group of data can be more efficient.</p>
<h4 id="important-considerations">Important Considerations<a class="headerlink" href="#important-considerations" title="Permanent link">&para;</a></h4>
<p>When using BatchMap, there are a few important considerations to keep in mind:</p>
<ul>
<li>Ensure that the BatchResponses object is tagged with the correct request ID.
Each Datum has a unique ID tag, which will be used by Numaflow to ensure correctness.</li>
<li>Ensure that the length of the BatchResponses list is equal to the number of requests received. This means that for
every input data item, there should be a corresponding response in the BatchResponses list.</li>
</ul>
<p>Check the links below to see the UDF examples in batch mode for different languages.</p>
<ul>
<li><a href="https://github.com/numaproj/numaflow-python/tree/main/examples/batchmap/">Python</a></li>
<li><a href="https://github.com/numaproj/numaflow-go/tree/main/pkg/batchmapper/examples/">Golang</a></li>
<li><a href="https://github.com/numaproj/numaflow-java/tree/main/examples/src/main/java/io/numaproj/numaflow/examples/batchmap/">Java</a></li>
<li><a href="https://github.com/numaproj/numaflow-rs/tree/main/examples/batchmap-cat/">Rust</a></li>
</ul>
<h3 id="available-environment-variables">Available Environment Variables<a class="headerlink" href="#available-environment-variables" title="Permanent link">&para;</a></h3>
<p>Some environment variables are available in the user-defined function container, they might be useful in your own UDF implementation.</p>
<ul>
Expand Down

0 comments on commit aab91cc

Please sign in to comment.