Ngone51 commented on a change in pull request #32389:
URL: https://github.com/apache/spark/pull/32389#discussion_r628668071



##########
File path: 
core/src/test/scala/org/apache/spark/storage/ShuffleBlockFetcherIteratorSuite.scala
##########
@@ -123,6 +131,54 @@ class ShuffleBlockFetcherIteratorSuite extends 
SparkFunSuite with PrivateMethodT
     verify(wrappedInputStream.invokePrivate(delegateAccess()), 
times(1)).close()
   }
 
+  /**
+   * Get a blockByAddress iterator for a single BlockManagerId assuming all 
blocks have the same
+   * size and `blockMapId`.
+   */
+  private def getBlocksByAddressForSingleBM(

Review comment:
       Maybe this could be extended to support the case of multiple 
blockmanagers, e.g.,
   
   ```scala
   val blocksByAddress = Seq[(BlockManagerId, Seq[(BlockId, Long, Int)])](
     (localBmId, localBlocks.keys.map(blockId => (blockId, 1L, 0)).toSeq),
     (remoteBmId, remoteBlocks.keys.map(blockId => (blockId, 1L, 1)).toSeq),
     (hostLocalBmId, hostLocalBlocks.keys.map(blockId => (blockId, 1L, 
1)).toSeq)
   ).toIterator
   ```
   
   We can pass in a `Map[BlockManagerId, (blocks, size, mapIndex)]` instead.
   
   WDYT?
   




-- 
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]

Reply via email to