Ngone51 commented on a change in pull request #32287:
URL: https://github.com/apache/spark/pull/32287#discussion_r627564746
##########
File path:
core/src/main/scala/org/apache/spark/storage/ShuffleBlockFetcherIterator.scala
##########
@@ -317,6 +377,14 @@ final class ShuffleBlockFetcherIterator(
hostLocalBlockBytes += mergedBlockInfos.map(_.size).sum
} else {
remoteBlockBytes += blockInfos.map(_._2).sum
+ val inMemoryBlocks = blockInfos.filter(_._2 <=
maxReqSizeShuffleToMem).map(_._2)
+ val maxInMemoryBlock = if (inMemoryBlocks.isEmpty) 0L else
inMemoryBlocks.max
+ if (PlatformDependent.directBufferPreferred() &&
+ PlatformDependent.maxDirectMemory() < maxInMemoryBlock) {
+ throw new SparkException(
+ s"Netty memory (${PlatformDependent.maxDirectMemory()} bytes) is
too small to " +
+ s"serve the max in-memory shuffle block ($maxInMemoryBlock
bytes).")
+ }
Review comment:
I see. I got your point. Make sense to me. (cc @attilapiros who pointed
out the original idea around here)
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]