You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/09/08 18:14:53 UTC

[GitHub] [spark] tgravescs commented on a change in pull request #29683: [SPARK-32823] Fix the master ui resources reporting

tgravescs commented on a change in pull request #29683:
URL: https://github.com/apache/spark/pull/29683#discussion_r485108438



##########
File path: core/src/main/scala/org/apache/spark/deploy/master/ui/MasterPage.scala
##########
@@ -80,15 +80,15 @@ private[ui] class MasterPage(parent: MasterWebUI) extends WebUIPage("") {
       .flatMap(_.toIterator)
       .groupBy(_._1) // group by resource name
       .map { case (rName, rInfoArr) =>
-        rName -> rInfoArr.map(_._2).reduce(_ + _)
-      }.map { case (k, v) => (k, v.toResourceInformation) }
+      rName -> rInfoArr.map(_._2.addresses.size).sum
+    }
     val usedInfo = aliveWorkers.map(_.resourcesInfoUsed)
       .map (resources => toMutable(resources))

Review comment:
       good catch, yes we should be able to, let me update.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org