mridulm commented on a change in pull request #33613:
URL: https://github.com/apache/spark/pull/33613#discussion_r684290557
##########
File path:
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/OneForOneBlockPusher.java
##########
@@ -77,42 +81,55 @@ public OneForOneBlockPusher(
@Override
public void onSuccess(ByteBuffer response) {
- // On receipt of a successful block push
- listener.onBlockPushSuccess(blockId, new
NioManagedBuffer(ByteBuffer.allocate(0)));
+ BlockPushReturnCode returnCode =
+ (BlockPushReturnCode)
BlockTransferMessage.Decoder.fromByteBuffer(response);
+ // If the return code is not SUCCESS, the server has responded some
error code. Handle
+ // the error accordingly.
+ if (returnCode.returnCode != ReturnCode.SUCCESS.id()) {
+ checkAndFailRemainingBlocks(index, new BlockPushNonFatalFailure(
+ BlockPushNonFatalFailure.getReturnCode(returnCode.returnCode)));
Review comment:
Move this as a helper static method into `BlockPushNonFatalFailure` ? It
is a repeating pattern to create `BlockPushNonFatalFailure` given a
`ReturnCode` id.
--
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]