> On Aug. 25, 2016, 12:04 p.m., Jie Yu wrote: > > src/slave/containerizer/mesos/provisioner/paths.hpp, line 83 > > <https://reviews.apache.org/r/51392/diff/1/?file=1485188#file1485188line83> > > > > What does 'parentId' mean here? I'd suggest we don't expose that > > parameter to the caller. To do proper recursion, you can introduce a > > inlined lambda which takes this extra parameter. > > > > ``` > > Try<hashset<ContainerID>> listContainers( > > const string& provisionerDir) > > { > > auto helper = []( > > const string& containersDir, > > const Option<ContainerID>& parentContainerId) { > > hashset<ContainerID> results; > > > > ... > > } > > > > return helper(getContainersDir(provisionerDir), None()); > > } > > ```
yes, I can do that. - Gilbert ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/51392/#review146825 ----------------------------------------------------------- On Aug. 24, 2016, 2:32 p.m., Gilbert Song wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/51392/ > ----------------------------------------------------------- > > (Updated Aug. 24, 2016, 2:32 p.m.) > > > Review request for mesos, Benjamin Hindman, Artem Harutyunyan, Jie Yu, and > Kevin Klues. > > > Bugs: MESOS-6067 > https://issues.apache.org/jira/browse/MESOS-6067 > > > Repository: mesos > > > Description > ------- > > This patch supports collecting all containerIds (all containers in the > nested hierarchy) recursively. > > > Diffs > ----- > > src/slave/containerizer/mesos/provisioner/paths.hpp > 9829d6b52c8547ae22297a5bc47852ce5a219e4c > src/slave/containerizer/mesos/provisioner/paths.cpp > 86a45f30c22dc1e41f4779c0ce8c11d02dcc46bb > > Diff: https://reviews.apache.org/r/51392/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Gilbert Song > >
