vanzin commented on a change in pull request #23920: [SPARK-27012] Storage tab
shows rdd details even after executor ended
URL: https://github.com/apache/spark/pull/23920#discussion_r261355677
##########
File path: core/src/main/scala/org/apache/spark/status/AppStatusListener.scala
##########
@@ -211,6 +211,32 @@ private[spark] class AppStatusListener(
update(rdd, now)
}
}
+ // remove partition information
+ liveRDDs.values.foreach { rdd =>
+ rdd.getPartitions.values.foreach { partition =>
+ partition.executors.foreach { exec =>
+ if (exec.equals(event.executorId)) {
Review comment:
You can use `filter` and avoid one level of indentation. Also you can use
`==` in Scala.
In fact you can avoid two levels of indentation if you filter the partition
list on whether `p.executors.contains(event.executorId)`.
And that can simplify solving the other problem in your code.
----------------------------------------------------------------
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]