mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From haosdent huang <haosd...@gmail.com>
Subject Re: Review Request 48094: Implemented GET_ROLES Call in v1 master API.
Date Sat, 18 Jun 2016 14:43:42 GMT

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




src/master/http.cpp (line 1456)
<https://reviews.apache.org/r/48094/#comment203570>

    How about put below block
    ```
    if (weight.isSome()) {
          getRole.set_weight(weight.get());
    ```
    at here directly?



src/master/http.cpp (line 1461)
<https://reviews.apache.org/r/48094/#comment203571>

    How about put below block at here
    ```
    getRole.mutable_resources()->CopyFrom(role.get()->resources());
    
          foreachkey (const FrameworkID& frameworkId, role.get()->frameworks) {
            getRole.add_frameworks()->CopyFrom(frameworkId);
          }
    ```
    directly?



src/master/http.cpp (line 1469)
<https://reviews.apache.org/r/48094/#comment203569>

    I saw you have define default value in proto, do we still need set it here?



src/tests/api_tests.cpp (line 456)
<https://reviews.apache.org/r/48094/#comment203572>

    I think we could not gruantee the `v1Response->get_roles().roles(2)` equal to `role2`.
How about `foreach` here and find the role that name is `role2`?


- haosdent huang


On June 18, 2016, 11:23 a.m., Abhishek Dasgupta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48094/
> -----------------------------------------------------------
> 
> (Updated June 18, 2016, 11:23 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-5494
>     https://issues.apache.org/jira/browse/MESOS-5494
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Implemented GET_ROLES Call in v1 master API.
> 
> 
> Diffs
> -----
> 
>   include/mesos/master/master.proto fa92240 
>   include/mesos/mesos.proto e4c5bd3 
>   include/mesos/v1/master/master.proto 59e978f 
>   include/mesos/v1/mesos.proto 9be22f0 
>   src/master/http.cpp a6beb17 
>   src/master/master.hpp 618d928 
>   src/tests/api_tests.cpp afa5ffa 
> 
> Diff: https://reviews.apache.org/r/48094/diff/
> 
> 
> Testing
> -------
> 
> On Ubuntu 16.04:
> 
> sudo GTEST_FILTER="*MasterAPITest.*" make -j2 check
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>


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