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



src/slave/container_loggers/rotate.cpp (lines 128 - 131)
<https://reviews.apache.org/r/41783/#comment176288>

    Future<Nothing> loop()
    {
      return io::read(STDIN_FILENO, buffer, length)
        .then([&](size_t readSize) -> Future<Nothing> {
          // ... comment here ...
          if (readSize <= 0) {
              EXIT(EXIT_SUCCESS);
          }
          Try<Nothing> result = write(buffer, size);
          if (result.isError()) {
            return Error();
          }
          return dispatch(self(), &RotateLoggerProcess::loop);
    }
    
    Try<Nothing> write(buffer, size)
    {
      if file is closed: if (leading.isNone()) {
        // open the leading file
        // deal with errors
      }
      
      if (need_to_rotate) {
        rotate();
        return write(buffer, size);
      }
      
      ... do the actual write ...
      return Nothing();
    }


- Benjamin Hindman


On Jan. 16, 2016, 12:54 a.m., Joseph Wu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41783/
> -----------------------------------------------------------
> 
> (Updated Jan. 16, 2016, 12:54 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Artem Harutyunyan.
> 
> 
> Bugs: MESOS-4136
>     https://issues.apache.org/jira/browse/MESOS-4136
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Implement the rotating container logger module.
> 
> 
> Diffs
> -----
> 
>   src/slave/container_loggers/rotate.hpp PRE-CREATION 
>   src/slave/container_loggers/rotate.cpp PRE-CREATION 
>   src/slave/container_loggers/rotating.hpp PRE-CREATION 
>   src/slave/container_loggers/rotating.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/41783/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Joseph Wu
> 
>

Reply via email to