Ngone51 commented on a change in pull request #33613:
URL: https://github.com/apache/spark/pull/33613#discussion_r683257278
##########
File path:
common/network-common/src/main/java/org/apache/spark/network/server/TransportRequestHandler.java
##########
@@ -213,7 +213,15 @@ public void onData(String streamId, ByteBuffer buf) throws
IOException {
public void onComplete(String streamId) throws IOException {
try {
streamHandler.onComplete(streamId);
- callback.onSuccess(ByteBuffer.allocate(0));
+ callback.onSuccess(streamHandler.getCompletionResponse());
+ } catch (BlockPushNonFatalFailure ex) {
Review comment:
Shall we catch `BlockPushNonFatalFailure` inside the `onComplete`? We
can have a response filed inside `streamHandler` to store the response value.
In this way, `getCompletionResponse` can handle the success and error cases
consistently.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]