mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernd Mathiske" <be...@mesosphere.io>
Subject Re: Review Request 30609: Added os::filesize(). This returns a file's size as reported by stat().
Date Sat, 07 Feb 2015 16:44:41 GMT


> On Feb. 4, 2015, 2:06 p.m., Ian Downes wrote:
> > Drive-by review...
> > 
> > Tests!?

Some simple tests added now.


> On Feb. 4, 2015, 2:06 p.m., Ian Downes wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp, lines 405-406
> > <https://reviews.apache.org/r/30609/diff/1/?file=847338#file847338line405>
> >
> >     How about Try<Bytes>?
> >     
> >     What's the desired behavior if path is a directory or something else like a
block device...?
> >     
> >     This would benefit from being simply size() and namespaced as in the //TODO
below?

I need this for the fetcher cache. Do we fetch from block devices? I guess not. By renaming
this to lstatsize, I think the name says pretty clearly what this does. I hope this is within
the suspected naming rules in this code stretch.

I looked at these namespaces. Not a good match with what they contain so far.


> On Feb. 4, 2015, 2:06 p.m., Ian Downes wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp, line 409
> > <https://reviews.apache.org/r/30609/diff/1/?file=847338#file847338line409>
> >
> >     What's the desired behavior if path is a symlink: st_size will be the length
of the pathname it contains... perhaps you want lstat()?

Yes, I want lstat. Thanks!


- Bernd


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


On Feb. 4, 2015, 12:12 a.m., Bernd Mathiske wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30609/
> -----------------------------------------------------------
> 
> (Updated Feb. 4, 2015, 12:12 a.m.)
> 
> 
> Review request for mesos, Adam B, Benjamin Hindman, Till Toenshoff, and Timothy Chen.
> 
> 
> Bugs: MESOS-2072
>     https://issues.apache.org/jira/browse/MESOS-2072
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added os::filesize(). This returns a file's size as reported by stat().
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 8a4fda97ee29c185471a69f60803efc193cbe922

> 
> Diff: https://reviews.apache.org/r/30609/diff/
> 
> 
> Testing
> -------
> 
> Ran it on a small file in a MESOS-2074 test with MESOS-2072 code (coming up, depending
on this). It reported the correct length.
> 
> 
> Thanks,
> 
> Bernd Mathiske
> 
>


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