mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anand Mazumdar <an...@apache.org>
Subject Re: Review Request 49445: Updated FilesProcess to support List_Files Call in Operator API v1.
Date Thu, 30 Jun 2016 21:45:25 GMT

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




src/files/files.hpp (lines 20 - 26)
<https://reviews.apache.org/r/49445/#comment205562>

    Do we still need these here?



src/files/files.hpp (line 100)
<https://reviews.apache.org/r/49445/#comment205567>

    Can we add a comment on the return type i.e. it would be a sorted (on path) array of files
and dirs?



src/files/files.hpp (line 101)
<https://reviews.apache.org/r/49445/#comment205564>

    Can we just name it `browse()` like `FilesProcess` does?



src/files/files.hpp (lines 101 - 103)
<https://reviews.apache.org/r/49445/#comment205568>

    hmm, wondering why is the return type a `std::map`. Why can't it be just a `std::list`
of `FileInfo` with an explicit comment that it is sorted on path?



src/files/files.hpp (lines 102 - 103)
<https://reviews.apache.org/r/49445/#comment205563>

    4 space indent



src/files/files.hpp 
<https://reviews.apache.org/r/49445/#comment205566>

    This should have been removed in a separate review.



src/files/files.cpp (lines 85 - 87)
<https://reviews.apache.org/r/49445/#comment205569>

    Why did you move these?



src/files/files.cpp (lines 102 - 104)
<https://reviews.apache.org/r/49445/#comment205570>

    See my earlier comments in the header file about this function and then modify this.



src/files/files.cpp (line 125)
<https://reviews.apache.org/r/49445/#comment205579>

    s/mesos::internal::model/`FileInfo` model override



src/files/files.cpp (line 358)
<https://reviews.apache.org/r/49445/#comment205571>

    `const Try<>&`



src/files/files.cpp (line 360)
<https://reviews.apache.org/r/49445/#comment205573>

    Nit: Capture the alias by reference.



src/files/files.cpp (lines 372 - 373)
<https://reviews.apache.org/r/49445/#comment205578>

    We avoid having `default` for switch statements and rely on the compiler to give us a
warning if we forget handling a new case.
    
    Let's explicitly handle the `UNKNOWN` case and have a UNREACHABLE() at the end. See similar
statements else where in the code for inspiration.



src/files/files.cpp (line 395)
<https://reviews.apache.org/r/49445/#comment205575>

    Can we do the opposite:
    ```cpp
    if (!authorized) {
    // return error
    }
    
    Rest of the code.
    ```
    
    This would help reduce nestedness and improve readability.



src/files/files.cpp (line 399)
<https://reviews.apache.org/r/49445/#comment205576>

    Can you move the function argument to the next line and indent by 4 spaces?


- Anand Mazumdar


On June 30, 2016, 2:06 p.m., Abhishek Dasgupta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/49445/
> -----------------------------------------------------------
> 
> (Updated June 30, 2016, 2:06 p.m.)
> 
> 
> Review request for mesos, Anand Mazumdar, zhou xing, haosdent huang, and Vinod Kone.
> 
> 
> Bugs: MESOS-5487
>     https://issues.apache.org/jira/browse/MESOS-5487
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Updated FilesProcess to support List_Files Call in Operator API v1.
> 
> 
> Diffs
> -----
> 
>   src/files/files.hpp b767d5bc5bee16e3bd98199773a6bc7d30c1c32d 
>   src/files/files.cpp a5a1b86e14f63e5e3834a2900270252fbe16f586 
>   src/tests/files_tests.cpp 31337e280c6224a8c949c8868a53e5a785b4573f 
> 
> Diff: https://reviews.apache.org/r/49445/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>


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