attilapiros commented on a change in pull request #28094:
URL: https://github.com/apache/spark/pull/28094#discussion_r416743570



##########
File path: core/src/main/scala/org/apache/spark/ui/env/EnvironmentPage.scala
##########
@@ -38,6 +40,34 @@ private[ui] class EnvironmentPage(
       "Java Home" -> appEnv.runtime.javaHome,
       "Scala Version" -> appEnv.runtime.scalaVersion)
 
+    def constructExecutorRequestString(ereqs: Map[String, 
ExecutorResourceRequest]): String = {
+      ereqs.map {
+        case (_, ereq) =>
+          val execStr = new mutable.StringBuilder()
+          execStr ++= s"\t${ereq.resourceName}: [amount: ${ereq.amount}"
+          if (ereq.discoveryScript.nonEmpty) execStr ++= s", discovery: 
${ereq.discoveryScript}"
+          if (ereq.vendor.nonEmpty) execStr ++= s", vendor: ${ereq.vendor}"
+          execStr ++= "]"
+          execStr.toString()
+      }.mkString("\n")
+    }
+
+    def constructTaskRequestString(treqs: Map[String, TaskResourceRequest]): 
String = {
+      treqs.map {
+        case (_, ereq) => s"\t${ereq.resourceName}: [amount: ${ereq.amount}]"

Review comment:
       Nit: `treqs`  => `taskReqs` and more importantly `ereq` => `taskReq`




----------------------------------------------------------------
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to