Victsm commented on a change in pull request #33613:
URL: https://github.com/apache/spark/pull/33613#discussion_r683907444
##########
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:
What I meant is that by throwing the exception, it's much easier to tell
apart the success case from the failure case.
It's not straightforward to tell the content of the returned ByteBuffer
without decoding it.
Even for decoding, it's not convenient to decode an rpc message inside
network-common module.
--
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]