Abacn commented on code in PR #26631:
URL: https://github.com/apache/beam/pull/26631#discussion_r1284560328
##########
sdks/java/fn-execution/src/main/java/org/apache/beam/sdk/fn/stream/DirectStreamObserver.java:
##########
@@ -101,6 +101,11 @@ public void onNext(T value) {
+ "this issue.",
Review Comment:
"https://issues.apache.org/jira/browse/BEAM-4280 for the history for this
issue."
shall we update this link (to a GitHub Issue) and also print in the warn
message / or remove the outdated JIRA link at INFO message
##########
sdks/java/fn-execution/src/main/java/org/apache/beam/sdk/fn/stream/ForwardingClientResponseObserver.java:
##########
@@ -25,23 +25,27 @@
* A {@link ClientResponseObserver} which delegates all {@link StreamObserver}
calls.
*
* <p>Used to wrap existing {@link StreamObserver}s to be able to install an
{@link
- * ClientCallStreamObserver#setOnReadyHandler(Runnable) onReadyHandler}.
+ * ClientCallStreamObserver#setOnReadyHandler(Runnable) onReadyHandler} and a
handler invoked when
+ * the stream terminates.
*
* <p>This is as thread-safe as the underlying stream observer that is being
wrapped.
*/
public final class ForwardingClientResponseObserver<ReqT, RespT>
implements ClientResponseObserver<RespT, ReqT> {
public static <ReqT, RespT> ForwardingClientResponseObserver<ReqT, RespT>
create(
- StreamObserver<ReqT> inbound, Runnable onReadyHandler) {
- return new ForwardingClientResponseObserver<>(inbound, onReadyHandler);
+ StreamObserver<ReqT> inbound, Runnable onReadyHandler, Runnable
onDoneHandler) {
Review Comment:
public method signature changed. iiuc this is internal class, should it
actually be package private; or keep the original overwrite method (without
onDoneHandler)?
--
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]