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



src/master/master.cpp
<https://reviews.apache.org/r/29973/#comment112824>

    No need to quote the ID, can you include the name here as well?
    
    Follow this format:
    
    https://github.com/apache/mesos/blob/0.21.1/src/master/master.hpp#L1200



src/master/master.cpp
<https://reviews.apache.org/r/29973/#comment112825>

    The space was lost here.



src/master/master.cpp
<https://reviews.apache.org/r/29973/#comment112830>

    Where is the FrameworkInfo going to get validated in the future? Could we 
leverage `drop` here rather than validating it in each call handler?
    
    I think for now, we'll want to keep FrameworkInfo here, ideally 
consolidating the duplicate framework lookup / drop into one place:
    
    ```
    const FrameworkInfo& frameworkInfo = call.framework_info();
    
    switch (call.type()) {
      case scheduler::Call::REGISTER:
        ...;
        break;
      case scheduler::Call::REREGISTER:
        ...;
        break;
      default:
    }
    
    Framework* framework = getFramework(frameworkInfo.id());
    
    if (framework == NULL) {
      // drop()
      return;
    }
    
    // TODO: validate frameworkInfo.
    
    // Rest of the calls.
    switch (call.type()) {
      // ...
    }
    ```
    
    This should help us prune down the handlers (move framework lookup + pid 
validation), thoughts?


- Ben Mahler


On Jan. 16, 2015, 7:23 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29973/
> -----------------------------------------------------------
> 
> (Updated Jan. 16, 2015, 7:23 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Michael Park, and Vinod Kone.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Passed framework ID instead framework info to Master::receive.
> 
> 
> Diffs
> -----
> 
>   src/master/master.hpp a8ce4d023ddea36cb83a2dc7b95abd12342f345a 
>   src/master/master.cpp e9dcca3c92c94f3123519855e238bcef47eeece9 
> 
> Diff: https://reviews.apache.org/r/29973/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>

Reply via email to