You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Ben Mahler <be...@gmail.com> on 2012/09/21 21:26:48 UTC

Review Request: Rich file listing data in JSON.

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

Review request for mesos, Benjamin Hindman and Vinod Kone.


Description
-------

This is for the webui file browsing, in order to mimic ls -l.


Diffs
-----

  src/files/files.hpp 35037a613316846cc8bea259eaa9363705c0f1df 
  src/files/files.cpp c40b7b74485dc717c4291f17a4533b52f2c51a7e 
  src/tests/files_tests.cpp 17d284b82de4d9e1dedf1c26f4cedcf8269c4072 
  third_party/libprocess/include/stout/format.hpp eff0df4006375f62b78b7ca111981180ddf00529 

Diff: https://reviews.apache.org/r/7214/diff/


Testing
-------

Tests updated, make check on OSX.

Running on CentOS currently.


Thanks,

Ben Mahler


Re: Review Request: Rich file listing data in JSON.

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7214/
-----------------------------------------------------------

(Updated Oct. 9, 2012, 12:12 a.m.)


Review request for mesos, Benjamin Hindman and Vinod Kone.


Changes
-------

Rebased off trunk. Updated with benh's comments.


Description
-------

This is for the webui file browsing, in order to mimic ls -l.


Diffs (updated)
-----

  src/files/files.hpp 35037a613316846cc8bea259eaa9363705c0f1df 
  src/files/files.cpp c40b7b74485dc717c4291f17a4533b52f2c51a7e 
  src/tests/files_tests.cpp 17d284b82de4d9e1dedf1c26f4cedcf8269c4072 
  third_party/libprocess/include/stout/format.hpp eff0df4006375f62b78b7ca111981180ddf00529 

Diff: https://reviews.apache.org/r/7214/diff/


Testing
-------

Tests updated, make check on OSX.

Running on CentOS currently.


Thanks,

Ben Mahler


Re: Review Request: Rich file listing data in JSON.

Posted by Ben Mahler <be...@gmail.com>.

> On Sept. 21, 2012, 8:54 p.m., Vinod Kone wrote:
> > src/files/files.hpp, line 98
> > <https://reviews.apache.org/r/7214/diff/1/?file=159116#file159116line98>
> >
> >     sounds like a switch is more appropriate here

Not switchable since these are macros ;)


> On Sept. 21, 2012, 8:54 p.m., Vinod Kone wrote:
> > src/tests/files_tests.cpp, line 211
> > <https://reviews.apache.org/r/7214/diff/1/?file=159118#file159118line211>
> >
> >     I think a test that confirms what you expect from a file and the return of JsonFileInfo(), would be nice.
> >     
> >     afaict, this is not testing the correctness of  JsonFileInfo()

Correct, I manually tested it, and I wanted to avoid unit testing it because it depends on several things:
-file system block size (for directories)
-current user/group running the tests (for user/group data)
-time it was written (modification time)
-other OS differences..?

Also, any regressions here will be noticed through the webui.


- Ben


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


On Sept. 21, 2012, 7:26 p.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7214/
> -----------------------------------------------------------
> 
> (Updated Sept. 21, 2012, 7:26 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Vinod Kone.
> 
> 
> Description
> -------
> 
> This is for the webui file browsing, in order to mimic ls -l.
> 
> 
> Diffs
> -----
> 
>   src/files/files.hpp 35037a613316846cc8bea259eaa9363705c0f1df 
>   src/files/files.cpp c40b7b74485dc717c4291f17a4533b52f2c51a7e 
>   src/tests/files_tests.cpp 17d284b82de4d9e1dedf1c26f4cedcf8269c4072 
>   third_party/libprocess/include/stout/format.hpp eff0df4006375f62b78b7ca111981180ddf00529 
> 
> Diff: https://reviews.apache.org/r/7214/diff/
> 
> 
> Testing
> -------
> 
> Tests updated, make check on OSX.
> 
> Running on CentOS currently.
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>


Re: Review Request: Rich file listing data in JSON.

Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7214/#review11801
-----------------------------------------------------------



src/files/files.hpp
<https://reviews.apache.org/r/7214/#comment25331>

    sounds like a switch is more appropriate here



src/tests/files_tests.cpp
<https://reviews.apache.org/r/7214/#comment25332>

    I think a test that confirms what you expect from a file and the return of JsonFileInfo(), would be nice.
    
    afaict, this is not testing the correctness of  JsonFileInfo()


- Vinod Kone


On Sept. 21, 2012, 7:26 p.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7214/
> -----------------------------------------------------------
> 
> (Updated Sept. 21, 2012, 7:26 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Vinod Kone.
> 
> 
> Description
> -------
> 
> This is for the webui file browsing, in order to mimic ls -l.
> 
> 
> Diffs
> -----
> 
>   src/files/files.hpp 35037a613316846cc8bea259eaa9363705c0f1df 
>   src/files/files.cpp c40b7b74485dc717c4291f17a4533b52f2c51a7e 
>   src/tests/files_tests.cpp 17d284b82de4d9e1dedf1c26f4cedcf8269c4072 
>   third_party/libprocess/include/stout/format.hpp eff0df4006375f62b78b7ca111981180ddf00529 
> 
> Diff: https://reviews.apache.org/r/7214/diff/
> 
> 
> Testing
> -------
> 
> Tests updated, make check on OSX.
> 
> Running on CentOS currently.
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>


Re: Review Request: Rich file listing data in JSON.

Posted by Ben Mahler <be...@gmail.com>.

> On Oct. 8, 2012, 9:43 p.m., Benjamin Hindman wrote:
> >

Also changed: s/user/uid & s/group/gid to match stat exactly.


> On Oct. 8, 2012, 9:43 p.m., Benjamin Hindman wrote:
> > src/files/files.hpp, line 132
> > <https://reviews.apache.org/r/7214/diff/1/?file=159116#file159116line132>
> >
> >     You can kill the 'struct', and just name the variable 'passwd' or 'p' (same for 'groupData' below).

Done, however group does need the struct.


- Ben


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


On Sept. 21, 2012, 7:26 p.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7214/
> -----------------------------------------------------------
> 
> (Updated Sept. 21, 2012, 7:26 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Vinod Kone.
> 
> 
> Description
> -------
> 
> This is for the webui file browsing, in order to mimic ls -l.
> 
> 
> Diffs
> -----
> 
>   src/files/files.hpp 35037a613316846cc8bea259eaa9363705c0f1df 
>   src/files/files.cpp c40b7b74485dc717c4291f17a4533b52f2c51a7e 
>   src/tests/files_tests.cpp 17d284b82de4d9e1dedf1c26f4cedcf8269c4072 
>   third_party/libprocess/include/stout/format.hpp eff0df4006375f62b78b7ca111981180ddf00529 
> 
> Diff: https://reviews.apache.org/r/7214/diff/
> 
> 
> Testing
> -------
> 
> Tests updated, make check on OSX.
> 
> Running on CentOS currently.
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>


Re: Review Request: Rich file listing data in JSON.

Posted by Benjamin Hindman <be...@berkeley.edu>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/7214/#review12245
-----------------------------------------------------------

Ship it!



src/files/files.hpp
<https://reviews.apache.org/r/7214/#comment25981>

    s/Time Stamp/timestamp/



src/files/files.hpp
<https://reviews.apache.org/r/7214/#comment25984>

    s/hard_links/nlink/



src/files/files.hpp
<https://reviews.apache.org/r/7214/#comment25983>

    s/modification_time/mtime/



src/files/files.hpp
<https://reviews.apache.org/r/7214/#comment25982>

    You can kill the 'struct', and just name the variable 'passwd' or 'p' (same for 'groupData' below).



src/tests/files_tests.cpp
<https://reviews.apache.org/r/7214/#comment25985>

    Don't include these in the tests.


- Benjamin Hindman


On Sept. 21, 2012, 7:26 p.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7214/
> -----------------------------------------------------------
> 
> (Updated Sept. 21, 2012, 7:26 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Vinod Kone.
> 
> 
> Description
> -------
> 
> This is for the webui file browsing, in order to mimic ls -l.
> 
> 
> Diffs
> -----
> 
>   src/files/files.hpp 35037a613316846cc8bea259eaa9363705c0f1df 
>   src/files/files.cpp c40b7b74485dc717c4291f17a4533b52f2c51a7e 
>   src/tests/files_tests.cpp 17d284b82de4d9e1dedf1c26f4cedcf8269c4072 
>   third_party/libprocess/include/stout/format.hpp eff0df4006375f62b78b7ca111981180ddf00529 
> 
> Diff: https://reviews.apache.org/r/7214/diff/
> 
> 
> Testing
> -------
> 
> Tests updated, make check on OSX.
> 
> Running on CentOS currently.
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>