----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64353/#review193994 -----------------------------------------------------------
src/resource_provider/uri_volume_profile.cpp Lines 392-395 (patched) <https://reviews.apache.org/r/64353/#comment272687> Can you use proto3's default json->protobuf parsing: https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.util.json_util#JsonStringToMessage.details src/resource_provider/uri_volume_profile.cpp Lines 311 (patched) <https://reviews.apache.org/r/64353/#comment272688> Looks like a bunch of these can be simplified if we internally define a protobuf (proto3) for the content in the uri. The parsing can just be proto3 json->protobuf parsing https://developers.google.com/protocol-buffers/docs/reference/cpp/google.protobuf.util.json_util#JsonStringToMessage.details - Jie Yu On Dec. 15, 2017, 10:49 p.m., Joseph Wu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/64353/ > ----------------------------------------------------------- > > (Updated Dec. 15, 2017, 10:49 p.m.) > > > Review request for mesos, Chun-Hung Hsiao and Jie Yu. > > > Bugs: MESOS-8251 > https://issues.apache.org/jira/browse/MESOS-8251 > > > Repository: mesos > > > Description > ------- > > This example module shows how a VolumeProfile module might be > implemented (and is a viable module in its own right). The module > can be configured to fetch a map of profiles from a URI (`file://` or > `http(s)://`) and possibly cache this item for some time. > > > Diffs > ----- > > src/Makefile.am f5a4edd245e8d6535502e951ecaa526c2bae25f9 > src/resource_provider/uri_volume_profile.hpp PRE-CREATION > src/resource_provider/uri_volume_profile.cpp PRE-CREATION > > > Diff: https://reviews.apache.org/r/64353/diff/6/ > > > Testing > ------- > > See end of chain. > > > Thanks, > > Joseph Wu > >