mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jie Yu <yujie....@gmail.com>
Subject Re: Review Request 61528: Implemented a registrar for resource provider manager state.
Date Fri, 22 Sep 2017 00:17:11 GMT

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




src/resource_provider/registrar.cpp
Lines 87 (patched)
<https://reviews.apache.org/r/61528/#comment262265>

    indent 2 more space here



src/resource_provider/registrar.cpp
Lines 134 (patched)
<https://reviews.apache.org/r/61528/#comment262264>

    Instead of wrapping a lot of `#ifndef` in the agent code, i'd suggest we use the memory
based storage on windows and add a TODO in the code.
    
    We can document that windows agent does not support resource providers. What do you think?



src/resource_provider/registrar.cpp
Lines 156 (patched)
<https://reviews.apache.org/r/61528/#comment262266>

    See my above comments. You can probably just wrap `storage` below.



src/resource_provider/registrar.cpp
Lines 200 (patched)
<https://reviews.apache.org/r/61528/#comment262277>

    I don't think a Promise is needed here, can you just do the following:
    ```
    if (recovered.isNone()) {
      recovered = state.fetch<Registry>(NAME).then(
          defer(self(),
                [this](...) {
                  registry = recovery.get();
                  variable = recovery;
                  return Nothing();
                }));
    }
    
    return recovered.get();
    ```



src/resource_provider/registrar.cpp
Lines 201 (patched)
<https://reviews.apache.org/r/61528/#comment262270>

    what if fetch failed? Should we fail the recovery?



src/resource_provider/registrar.cpp
Lines 265 (patched)
<https://reviews.apache.org/r/61528/#comment262278>

    Why this temp variable?



src/resource_provider/registrar.cpp
Lines 309 (patched)
<https://reviews.apache.org/r/61528/#comment262279>

    return here?


- Jie Yu


On Sept. 21, 2017, 7 p.m., Benjamin Bannier wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61528/
> -----------------------------------------------------------
> 
> (Updated Sept. 21, 2017, 7 p.m.)
> 
> 
> Review request for mesos, Jie Yu and Jan Schlicht.
> 
> 
> Bugs: MESOS-7555
>     https://issues.apache.org/jira/browse/MESOS-7555
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch adds a registry and registrar interface for resource
> provider managers. The registrar interface is modelled after the
> master registrar and supports similar operations. Currently a single,
> LevelDB-backed registrar is implemented which we plan to use for
> resource provider managers in agents.
> 
> Current the registry allows to add and remove resource provider IDs.
> 
> 
> Diffs
> -----
> 
>   src/CMakeLists.txt 1a828c4351ded36f51ccbbe67147da2f50b9cdb1 
>   src/Makefile.am 93ed2bf55447e3e470d9bea8a0b61ce78aad1900 
>   src/resource_provider/registrar.hpp PRE-CREATION 
>   src/resource_provider/registrar.cpp PRE-CREATION 
>   src/resource_provider/registry.hpp PRE-CREATION 
>   src/resource_provider/registry.proto PRE-CREATION 
>   src/slave/paths.hpp d021e6b85a2e5823ea088d65faf9cd85cfb57e28 
>   src/slave/paths.cpp e8724bf3e382211b5882728b86575de75981307f 
>   src/tests/resource_provider_manager_tests.cpp 3bc56b51526e9dd188423f7349e74246c3295c77

> 
> 
> Diff: https://reviews.apache.org/r/61528/diff/9/
> 
> 
> Testing
> -------
> 
> Tested on a number of platforms on internal CI.
> 
> 
> Thanks,
> 
> Benjamin Bannier
> 
>


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