tgravescs commented on a change in pull request #24406: [SPARK-27024] Executor 
interface for cluster managers to support GPU and other resources
URL: https://github.com/apache/spark/pull/24406#discussion_r282606176
 
 

 ##########
 File path: 
core/src/main/scala/org/apache/spark/executor/CoarseGrainedExecutorBackend.scala
 ##########
 @@ -71,6 +82,159 @@ private[spark] class CoarseGrainedExecutorBackend(
     }(ThreadUtils.sameThread)
   }
 
+  // we only support converting from units that are byte based, this will
+  // either convert it to bytes or just return the count if the units can't be
+  // parsed as bytes.
+  private def tryConvertUnitsToBytes(count: String, units: String): Long = {
+    try {
+        Utils.byteStringAsBytes(count + units)
+    } catch {
+      case e: NumberFormatException =>
+        // Ignore units not of byte types and just use count
+        logWarning("Illegal resource unit type, spark only " +
+          s"supports conversion of byte types, units: $units, " +
+          "ignoring the type and using the raw count.", e)
+        count.toLong
+    }
+  }
+
+  // Check that the executor resources at startup will satisfy the user 
specified task
+  // requirements (spark.task.resource.*) and that they match the executor 
configs
+  // specified by the user (spark.executor.resource.*) to catch mismatches 
between what
+  // the user requested and what resource manager gave or what the discovery 
script found.
+  private def checkExecResourcesMeetTaskRequirements(
 
 Review comment:
   removed

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

Reply via email to