Victsm commented on a change in pull request #30164: URL: https://github.com/apache/spark/pull/30164#discussion_r524527610
########## File path: core/src/main/scala/org/apache/spark/storage/BlockManagerMasterEndpoint.scala ########## @@ -657,6 +688,43 @@ class BlockManagerMasterEndpoint( } } + private def getShufflePushMergerLocations( + numMergersNeeded: Int, + hostsToFilter: Set[String]): Seq[BlockManagerId] = { + val blockManagersWithExecutors = blockManagerIdByExecutor.groupBy(_._2.host) + .mapValues(_.head).values.map(_._2).toSet + val filteredBlockManagersWithExecutors = blockManagersWithExecutors + .filterNot(x => hostsToFilter.contains(x.host)) + val filteredMergersWithExecutors = filteredBlockManagersWithExecutors.map( + x => BlockManagerId(x.executorId, x.host, StorageUtils.externalShuffleServicePort(conf))) Review comment: Thanks for pointing this one out. We currently use empty String for `executorId` part of a `BlockManagerId` for shuffle push merger locations. This part should conform to the convention, and we should also do a dedup here since we could have multiple executors on the same host. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org