> On Jan. 12, 2015, 8:18 p.m., Vinod Kone wrote: > > src/slave/containerizer/isolators/disk_quota.cpp, lines 422-428 > > <https://reviews.apache.org/r/29688/diff/3/?file=814904#file814904line422> > > > > Seems a bit weird to put the error case first and normal case latter. > > Can you swap them? > > > > if (status.get().get() == 0) { > > // 'du' succeeded. > > io::read(..) > > .onAny(...,&Self::__schedule,...); > > } else { > > // 'du' failed. > > io::read(..) > > .onAny(...,&Self::___schedule,...); > > }
Most of our code checks things this way though, including his future checking code above :) - Ben ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/29688/#review67519 ----------------------------------------------------------- On Jan. 12, 2015, 6:46 p.m., Jie Yu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/29688/ > ----------------------------------------------------------- > > (Updated Jan. 12, 2015, 6:46 p.m.) > > > Review request for mesos, Benjamin Hindman, Ben Mahler, and Ian Downes. > > > Bugs: MESOS-1588 > https://issues.apache.org/jira/browse/MESOS-1588 > > > Repository: mesos-git > > > Description > ------- > > Added DiskQuotaIsolator to enforce disk quota. I created a DiskUsageChecker > to check disk usage by calling 'du'. The DiskUsageChecker is throttled (see > comments). The isolator uses DiskUsageChecker to enforce disk quota. > > > Diffs > ----- > > src/Makefile.am fc0c3227466ccf364353a739fec8d9532ea3c683 > src/slave/containerizer/isolators/disk_quota.hpp PRE-CREATION > src/slave/containerizer/isolators/disk_quota.cpp PRE-CREATION > src/slave/containerizer/mesos/containerizer.cpp > 5c014ebe360b9527b3edd505d47e57a4d5ce5c52 > src/slave/flags.hpp f1b8dfbb7391167b67a9498561742aa9ab9089a6 > > Diff: https://reviews.apache.org/r/29688/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Jie Yu > >