abellina commented on a change in pull request #26078: [SPARK-29151][CORE]
Support fractional resources for task resource scheduling
URL: https://github.com/apache/spark/pull/26078#discussion_r341696045
##########
File path: core/src/main/scala/org/apache/spark/SparkContext.scala
##########
@@ -2800,11 +2803,19 @@ object SparkContext extends Logging {
// large enough if any task resources were specified.
taskResourceRequirements.foreach { taskReq =>
val execAmount = executorResourcesAndAmounts(taskReq.resourceName)
- if (taskReq.amount * numSlots < execAmount) {
+ if ((numSlots * taskReq.amount / taskReq.numParts) < execAmount) {
+ val taskReqStr = if (taskReq.numParts > 1) {
+ s"${taskReq.amount}/${taskReq.numParts}"
Review comment:
Yes that is correct. Though I am not sure this hurts. I like the idea of
seeing it in text if it is misconfigured, but let me know if you want that
changed.
----------------------------------------------------------------
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]