Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/18435#discussion_r124252176
--- Diff:
core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala ---
@@ -345,7 +345,7 @@ private[spark] class TaskSchedulerImpl(
val shuffledOffers = shuffleOffers(filteredOffers)
// Build a list of tasks to assign to each worker.
- val tasks = shuffledOffers.map(o => new
ArrayBuffer[TaskDescription](o.cores))
+ val tasks = shuffledOffers.map(o => new
ArrayBuffer[TaskDescription](Math.ceil(o.cores*1.0/CPUS_PER_TASK).toInt))
--- End diff --
Please use `math.ceil(o.cores.toDouble / CPUS_PER_TASK).toInt`
How much difference can this make? you're saving at most about 8 bytes x #
cores per offer.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]