ahmedabu98 commented on code in PR #38457:
URL: https://github.com/apache/beam/pull/38457#discussion_r3229077535


##########
website/www/site/content/en/documentation/transforms/java/aggregation/batchelements.md:
##########
@@ -0,0 +1,30 @@
+---
+title: "BatchElements"
+---
+<!--
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+
+# BatchElements
+
+BatchElements transform groups individual elements into batches before 
processing them downstream.
+The transform takes a `PCollection<T>` as input and produces a 
`PCollection<List<T>>`, where each output element is a batch containing 
multiple input elements.
+Batch sizes are chosen dynamically between the configured minimum and maximum 
values by measuring the execution time of downstream operations.
+
+Batching is performed per window. Each emitted batch belongs to the same 
window as its input elements.

Review Comment:
   Maybe include some motivation behind BatchElements? This is a good excerpt:
   
https://github.com/apache/beam/blob/cf5e517db67ff82ff38296b9dac0229021d4bef4/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/BatchElements.java#L36-L43



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to