egalpin commented on a change in pull request #17097: URL: https://github.com/apache/beam/pull/17097#discussion_r828025738
########## File path: sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/GroupIntoBatches.java ########## @@ -221,6 +221,31 @@ private GroupIntoBatches(BatchingParams<InputT> params) { duration)); } + public GroupIntoBatches<K, InputT> withByteSize(Long batchSizeBytes) { + checkArgument( + batchSizeBytes != null && batchSizeBytes < Long.MAX_VALUE && batchSizeBytes > 0, + "batchSizeBytes should be a non-negative value less than " + Long.MAX_VALUE); + return new GroupIntoBatches<>( + BatchingParams.create( + params.getBatchSize(), + batchSizeBytes, + params.getElementByteSize(), + params.getMaxBufferingDuration())); + } + + public GroupIntoBatches<K, InputT> withByteSize( Review comment: fixed 👍 thanks! -- 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: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org