arunpandianp commented on code in PR #36742:
URL: https://github.com/apache/beam/pull/36742#discussion_r2502768474
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/util/ThreadLocalByteStringOutputStream.java:
##########
@@ -36,27 +35,44 @@ public class ThreadLocalByteStringOutputStream {
// Private constructor to prevent instantiations from outside.
private ThreadLocalByteStringOutputStream() {}
+ /** @return An AutoClosable StreamHandle that holds a cached
ByteStringOutputStream. */
+ public static StreamHandle acquire() {
+ return new StreamHandle();
Review Comment:
Modified to avoid allocation, PTAL.
--
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]