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_r281653228
##########
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(s"Illegal resource unit type, spark only " +
+ s"supports conversion of byte types, units: $units, " +
+ s"ignoring the type and using the raw count.", e)
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]