mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vinod Kone" <vinodk...@gmail.com>
Subject Re: Review Request 14438: Re-structured the Slave::tasks map.
Date Wed, 02 Oct 2013 07:58:06 GMT


> On Oct. 2, 2013, 1:10 a.m., Vinod Kone wrote:
> > src/master/master.hpp, line 314
> > <https://reviews.apache.org/r/14438/diff/1/?file=360292#file360292line314>
> >
> >     what if framework_id itself is not present in the tasks map? Would this still
work?
> 
> Ben Mahler wrote:
>     Yep, tasks[task->framework_id()] will insert and return a new empty map in this
case, so the CHECK passes (and we'll always insert the framework id below). The alternative
is a bit more code:
>     
>     CHECK(!tasks.contains(task->framework_id()) || !tasks[task->framework_id()].contains(task->task_id())));

sgtm.


- Vinod


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14438/#review26588
-----------------------------------------------------------


On Oct. 2, 2013, 5:46 a.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14438/
> -----------------------------------------------------------
> 
> (Updated Oct. 2, 2013, 5:46 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Vinod Kone.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Small cleanup, no functional change here. This changes the Slave::tasks:
> 
> hashmap<std::pair<FrameworkID, TaskID>, Task*> tasks; // Before.
> 
> hashmap<FrameworkID, hashmap<TaskID, Task*> > tasks;  // After.
> 
> 
> Diffs
> -----
> 
>   src/master/master.hpp bd5cb1ff05967518d7dc7f3a9dc0d32c22eb9643 
>   src/master/master.cpp a49b17ef43fca5b385a89731ca8776a26b61399a 
> 
> Diff: https://reviews.apache.org/r/14438/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message