GitHub user JackYangzg opened a pull request:
https://github.com/apache/spark/pull/18435
[SPARK-21225][CORE] decrease the Mem using for variable 'tasks' in fuâ¦
JIRA Issue:https://issues.apache.org/jira/browse/SPARK-21225
In the function 'resourceOffers', It declare a variable 'tasks' for storage
the tasks which have allocated a executor. It declared like this:
`val tasks = shuffledOffers.map(o => new
ArrayBuffer[TaskDescription](o.cores))`
But, I think this code only conside a situation for that one task per core.
If the user set "spark.task.cpus" as 2 or 3, It really don't need so much Mem.
I think It can motify as follow:
`val tasks = shuffledOffers.map(o => new
ArrayBuffer[TaskDescription](Math.ceil(o.cores*1.0/CPUS_PER_TASK).toInt))`
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/JackYangzg/spark motifyTaskCoreDisp
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/18435.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #18435
----
commit c885806608b3002ae34a73d6dc2ff3479dfc3f9b
Author: æ¨æ²»å½10192065 <[email protected]>
Date: 2017-06-27T11:40:05Z
[SPARK-21225][CORE] decrease the Mem using for variable 'tasks' in function
resourceOffers
----
---
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]