Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/2929#discussion_r19363491
--- Diff:
core/src/main/scala/org/apache/spark/network/nio/NioBlockTransferService.scala
---
@@ -95,16 +95,20 @@ final class NioBlockTransferService(conf: SparkConf,
securityManager: SecurityMa
future.onSuccess { case message =>
val bufferMessage = message.asInstanceOf[BufferMessage]
val blockMessageArray =
BlockMessageArray.fromBufferMessage(bufferMessage)
-
- for (blockMessage <- blockMessageArray) {
- if (blockMessage.getType != BlockMessage.TYPE_GOT_BLOCK) {
- listener.onBlockFetchFailure(
- new SparkException(s"Unexpected message
${blockMessage.getType} received from $cmId"))
- } else {
- val blockId = blockMessage.getId
- val networkSize = blockMessage.getData.limit()
- listener.onBlockFetchSuccess(
- blockId.toString, new
NioByteBufferManagedBuffer(blockMessage.getData))
+ if (blockMessageArray.length == 0) {
+ listener.onBlockFetchFailure(
--- End diff --
this change looks good. but can you comment on when this would happen and
put it into the source code?
thanks.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]