LuciferYang commented on code in PR #43890:
URL: https://github.com/apache/spark/pull/43890#discussion_r1399115205
##########
core/src/main/scala/org/apache/spark/resource/ResourceUtils.scala:
##########
@@ -476,7 +476,7 @@ private[spark] object ResourceUtils extends Logging {
if (maxTaskPerExec < (execAmount * numParts / taskAmount)) {
val origTaskAmount = treq.amount
val taskReqStr = s"${origTaskAmount}/${numParts}"
- val resourceNumSlots = Math.floor(execAmount * numParts /
taskAmount).toInt
+ val resourceNumSlots = Math.floor(execAmount * numParts /
taskAmount.toDouble).toInt
Review Comment:
The result here was a Long value from `execAmount * numParts / taskAmount`.
Is there a need to perform `Math.floor` on it? @tgravescs Do you have time to
help check this logic? Thanks
--
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]