venkata91 commented on a change in pull request #30164: URL: https://github.com/apache/spark/pull/30164#discussion_r517734835
########## File path: core/src/main/scala/org/apache/spark/storage/BlockManagerMasterEndpoint.scala ########## @@ -657,6 +679,14 @@ class BlockManagerMasterEndpoint( } } + private def getMergerLocations( + numMergersNeeded: Int, + hostsToFilter: Set[String]): Seq[BlockManagerId] = { + // Copying the merger locations to a list so that the original mergerLocations won't be shuffled + val mergers = mergerLocations.values.filterNot(x => hostsToFilter.contains(x.host)).toSeq + Utils.randomize(mergers).take(numMergersNeeded) Review comment: After having offline discussions with @mridulm decided to make the change to prefer active executors. In the worst case, we would still get the behavior of without any preference. ---------------------------------------------------------------- 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