> On Aug. 22, 2016, 2:30 p.m., Qian Zhang wrote: > > src/slave/containerizer/mesos/isolators/network/cni/plugins/port_mapper/main.cpp, > > lines 52-77 > > <https://reviews.apache.org/r/51096/diff/1/?file=1473748#file1473748line52> > > > > Can we simplify these code to something like below? > > ``` > > while(input.isSome()) { > > config += input.get(); > > input = os::read(STDIN_FILENO, STDIN_READ_LENGTH); > > } > > > > if (input.isError()) { > > cniError.set_msg("Unable to read STDIN: " + input.error()); > > > > cout << JSON::protobuf(cniError) << endl; > > > > return EXIT_FAILURE; > > } > > > > ```
Makes sense. - Avinash ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/51096/#review146350 ----------------------------------------------------------- On Aug. 15, 2016, 6:48 p.m., Avinash sridharan wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/51096/ > ----------------------------------------------------------- > > (Updated Aug. 15, 2016, 6:48 p.m.) > > > Review request for mesos, Jie Yu and Qian Zhang. > > > Bugs: MESOS-6023 > https://issues.apache.org/jira/browse/MESOS-6023 > > > Repository: mesos > > > Description > ------- > > The `mesos-port-mapper` is a CNI plugin that can be used to install > port-forwarding rules for a container. The `mesos-port-mapper` is a > wrapper CNI plugin that should always be used in conjunction with > other CNI plugins. > > > Diffs > ----- > > src/Makefile.am d389e02584cfb1a00067cd30de1364118d1c46c7 > > src/slave/containerizer/mesos/isolators/network/cni/plugins/port_mapper/main.cpp > PRE-CREATION > > Diff: https://reviews.apache.org/r/51096/diff/ > > > Testing > ------- > > make > > > Thanks, > > Avinash sridharan > >
