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 2022/06/30 00:50:18 UTC

[GitHub] [spark] JoshRosen commented on a diff in pull request #37027: [SPARK-39636][CORE][UI] Fix multiple bugs in JsonProtocol, impacting off heap StorageLevels and Task/Executor ResourceRequests

JoshRosen commented on code in PR #37027:
URL: https://github.com/apache/spark/pull/37027#discussion_r910516086


##########
core/src/main/scala/org/apache/spark/util/JsonProtocol.scala:
##########
@@ -750,15 +751,15 @@ private[spark] object JsonProtocol {
 
   def executorResourceRequestFromJson(json: JValue): ExecutorResourceRequest = {
     val rName = (json \ "Resource Name").extract[String]
-    val amount = (json \ "Amount").extract[Int]
+    val amount = (json \ "Amount").extract[Long]
     val discoveryScript = (json \ "Discovery Script").extract[String]
     val vendor = (json \ "Vendor").extract[String]
     new ExecutorResourceRequest(rName, amount, discoveryScript, vendor)
   }
 
   def taskResourceRequestFromJson(json: JValue): TaskResourceRequest = {
     val rName = (json \ "Resource Name").extract[String]
-    val amount = (json \ "Amount").extract[Int]
+    val amount = (json \ "Amount").extract[Double]

Review Comment:
   `amount` is defined as a double at https://github.com/apache/spark/blob/29258964cae45cea43617ade971fb4ea9fe2902a/core/src/main/scala/org/apache/spark/resource/TaskResourceRequest.scala#L35-L38



-- 
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: reviews-unsubscribe@spark.apache.org

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