Ah ok you're totally right -- given that it's a global variable, it's not
an issue. So NVM!


On Sun, Jan 26, 2014 at 11:35 PM, Mridul Muralidharan <
notifications@github.com> wrote:

> In core/src/main/scala/org/apache/spark/scheduler/TaskSchedulerImpl.scala:
>
> > @@ -241,7 +241,8 @@ private[spark] class TaskSchedulerImpl(
> >              taskIdToExecutorId(tid) = execId
> >              activeExecutorIds += execId
> >              executorsByHost(host) += execId
> > -            availableCpus(i) -= 1
> > +            availableCpus(i) -= taskSet.CPUS_PER_TASK
>
> Hmm, CPUS_PER_TASK is actually a global variable masquerading as a local
> variable (it is fetched from conf).
> Given this, will it still have an issue ?
> I do agree with the problem statement btw ...
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/apache/incubator-spark/pull/507/files#r9181277>
> .
>