viirya commented on code in PR #44914:
URL: https://github.com/apache/spark/pull/44914#discussion_r1468720362


##########
core/src/main/scala/org/apache/spark/deploy/JsonProtocol.scala:
##########
@@ -312,9 +312,9 @@ private[deploy] object JsonProtocol {
     ("waitingDrivers" -> obj.activeDrivers.count(_.state == 
DriverState.SUBMITTED)) ~
     ("cores" -> cores) ~
     ("coresused" -> coresUsed) ~
-    ("coresutilization" -> 100 * coresUsed / cores) ~
+    ("coresutilization" -> (if (cores == 0) 100 else 100 * coresUsed / cores)) 
~

Review Comment:
   If `cores` is 0, why `utilization` isn't 0?



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

To unsubscribe, e-mail: [email protected]

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