srowen commented on a change in pull request #22015:
[SPARK-20286][SPARK-24786][Core][DynamicAllocation] Release executors on
unpersisting RDD
URL: https://github.com/apache/spark/pull/22015#discussion_r258181999
##########
File path:
core/src/main/scala/org/apache/spark/storage/BlockManagerMasterEndpoint.scala
##########
@@ -144,16 +144,22 @@ class BlockManagerMasterEndpoint(
}
}
- private def removeRdd(rddId: Int): Future[Seq[Int]] = {
+ private def removeRdd(rddId: Int): (Future[Seq[Int]], Seq[String]) = {
// First remove the metadata for the given RDD, and then asynchronously
remove the blocks
// from the slaves.
// Find all blocks for the given RDD, remove the block from both
blockLocations and
// the blockManagerInfo that is tracking the blocks.
val blocks = blockLocations.asScala.keys.flatMap(_.asRDDId).filter(_.rddId
== rddId)
+
+ val executorIds: mutable.HashSet[String] = new mutable.HashSet[String]
+
blocks.foreach { blockId =>
val bms: mutable.HashSet[BlockManagerId] = blockLocations.get(blockId)
- bms.foreach(bm =>
blockManagerInfo.get(bm).foreach(_.removeBlock(blockId)))
+ bms.foreach(bm => {
Review comment:
nit: `.foreach { bm =>` There are some redundant parens like this elsewhere.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]