tgravescs commented on a change in pull request #25409: [SPARK-28414][WEBUI] UI
updates to show resource info in Standalone
URL: https://github.com/apache/spark/pull/25409#discussion_r317651126
##########
File path:
core/src/main/scala/org/apache/spark/deploy/StandaloneResourceUtils.scala
##########
@@ -345,4 +376,47 @@ private[spark] object StandaloneResourceUtils extends
Logging {
def needCoordinate(conf: SparkConf): Boolean = {
conf.get(SPARK_RESOURCES_COORDINATE)
}
+
+ def toMutable(immutableResources: Map[String, ResourceInformation])
+ : Map[String, MutableResourceInfo] = {
+ immutableResources.map { case (rName, rInfo) =>
+ val mutableAddress = new mutable.HashSet[String]()
+ rInfo.addresses.foreach(mutableAddress.add)
Review comment:
this can just be: mutableAddress ++= rInfo.addresses
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]