> On 六月 27, 2016, 12:34 p.m., Guangya Liu wrote: > > src/master/allocator/mesos/hierarchical.cpp, line 534 > > <https://reviews.apache.org/r/41658/diff/1/?file=1174680#file1174680line534> > > > > I think we do not need to insert slave here but only insert slave in > > addSlave and remove slave in removeSlave? > > James Peach wrote: > Since ``updateSlave`` triggers an allocation for that ``slaveId``, I > think we have to insert the slave here too.
Yes, but I still have some question for this: If there is no new agent added, then what is the use of `allocationCandidates.insert(slaveId);`, seems the `allocationCandidates` should already include all agents in the cluster? > On 六月 27, 2016, 12:34 p.m., Guangya Liu wrote: > > src/master/allocator/mesos/hierarchical.cpp, line 1102 > > <https://reviews.apache.org/r/41658/diff/1/?file=1174680#file1174680line1102> > > > > Can you please show more detail for what does `--queuedAllocations == > > 0` means here? Does it means that you always allocate resources if the > > `queuedAllocations` is 1? > > James Peach wrote: > When ``queuedAllocations`` goes to 0, that means that there are no more > allocation tasks in the allocator queue so we should actually perform > allocation (ie. there's no later task that we can leave the work for). I saw that the `queuedAllocations` was increased in many functions, such as `addFramework`, `addSlave` etc to pend the allocation, but I only saw here we are checking when the `queuedAllocations` goes to 0. Take an example, if I have 5 `queuedAllocations`, when can the `--queuedAllocations == 0` beome true? Thanks. - Guangya ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/41658/#review111696 ----------------------------------------------------------- On 六月 22, 2016, 4:32 a.m., James Peach wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/41658/ > ----------------------------------------------------------- > > (Updated 六月 22, 2016, 4:32 a.m.) > > > Review request for mesos, Benjamin Mahler and Klaus Ma. > > > Bugs: MESOS-3157 > https://issues.apache.org/jira/browse/MESOS-3157 > > > Repository: mesos > > > Description > ------- > > When there is churn in the cluster, frequent resource allocation > is required. Maintain a set of allocation candidates so that we > don't end up running the same allocation multiple times. > > This review is just for feedback. Not proposing it to be merged at this time. > > > Diffs > ----- > > src/master/allocator/mesos/hierarchical.hpp > 86ea5a402ed67f8f22f11d5730147cd907d66a08 > src/master/allocator/mesos/hierarchical.cpp > 775182515dcb52bd873ecdf98c827320251a59c8 > > Diff: https://reviews.apache.org/r/41658/diff/ > > > Testing > ------- > > make check. > > > Thanks, > > James Peach > >
