> On Aug. 31, 2015, 10:33 p.m., Jie Yu wrote:
> > src/slave/containerizer/provisioner.cpp, line 47
> > <https://reviews.apache.org/r/37881/diff/3/?file=1060137#file1060137line47>
> >
> >     Can you just use a string->create func hashmap so that you don't need 
> > Image::Type_Parse.
> >     
> >     ```
> >     hashmap<string, ...> creators = {
> >       {"appc", &appc::AppcProvisioner::create}
> >     }
> >     ```

If the creator uses string keys and the result provisioner map is keyed by 
Image::Type (i.e. `hashmap<Image::Type, Owned<Provisioner>>`), there is a 
mismatch and I have to convert the string "appc" into Image::APPC, which I 
either use another protobuf generated method or hard code it, either of which 
is cleaner than the current form.


> On Aug. 31, 2015, 10:33 p.m., Jie Yu wrote:
> > src/slave/containerizer/provisioners/appc.cpp, lines 180-187
> > <https://reviews.apache.org/r/37881/diff/3/?file=1060139#file1060139line180>
> >
> >     AppcProvisioner is a wrapper of AppcProvisionerProcess. In our code 
> > base, we delegate all calls to the underlying process. There're several 
> > benefits of this. One benefit is that all logics are in the same function 
> > (not splitted like this case).
> >     
> >     I still suggest that you move those checks to 
> > AppcProvisionerProcess::provision.

Oh I thought this was in AppcProvisioner::create() (review board gave me the 
wrong idea). For AppcProvisioner::provision() of course, this was a oversight.


> On Aug. 31, 2015, 10:33 p.m., Jie Yu wrote:
> > src/slave/containerizer/provisioners/appc.cpp, line 228
> > <https://reviews.apache.org/r/37881/diff/3/?file=1060139#file1060139line228>
> >
> >     What about those containers that does not specify a container info but 
> > we filled in with default container info with appc image? What should we do?

Oh yes, this is important. Thanks for noticing! It should be now correctly 
handled.


- Jiang Yan


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


On Sept. 2, 2015, 3:47 p.m., Jiang Yan Xu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37881/
> -----------------------------------------------------------
> 
> (Updated Sept. 2, 2015, 3:47 p.m.)
> 
> 
> Review request for mesos, Chi Zhang, Jie Yu, and Timothy Chen.
> 
> 
> Bugs: MESOS-2796
>     https://issues.apache.org/jira/browse/MESOS-2796
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Implemented AppcProvisioner.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 7b620ff66856b3f0adac121b3297d55ed71a3d99 
>   src/slave/containerizer/provisioner.hpp 
> 541dd4e0b2f0c92a45c00cab6132a2be69654838 
>   src/slave/containerizer/provisioner.cpp 
> efc7e6996ff6663bebaf61989a7e040bd2ad7a5e 
>   src/slave/containerizer/provisioners/appc.hpp PRE-CREATION 
>   src/slave/containerizer/provisioners/appc.cpp PRE-CREATION 
>   src/slave/containerizer/provisioners/appc/paths.hpp 
> 41e3bf79da0854406c488855f953111e67353829 
>   src/slave/containerizer/provisioners/appc/paths.cpp 
> 3113c84b9526dd9e9e89fb9aa4ec75ed66a996c7 
>   src/slave/flags.hpp e56738e2dfd6593ef8f093687919da287af78f77 
>   src/slave/flags.cpp b36710d6d7a7250bc071a57310a2d54bfb3bc624 
>   src/tests/containerizer/appc_provisioner_tests.cpp 
> 47b66b9c30cefe8f9a8e2c1c1341776c2d235020 
> 
> Diff: https://reviews.apache.org/r/37881/diff/
> 
> 
> Testing
> -------
> 
> sudo make check.
> 
> More test cases coming.
> 
> 
> Thanks,
> 
> Jiang Yan Xu
> 
>

Reply via email to