> On Feb. 7, 2018, 1:35 p.m., Alexander Rukletsov wrote:
> > src/checks/checker.cpp
> > Line 86 (original), 89 (patched)
> > <https://reviews.apache.org/r/65395/diff/2/?file=1950438#file1950438line89>
> >
> >     please no abbreviations like this, it is unclear what this function 
> > does. Is it a factory? Shall it be better be lambda rather than a free 
> > function?
> >     
> >     Also, I see a similar function in `HealthCheck`. Is there any way you 
> > can move duplicate code into the lower level `CheckerProcess`?

Yeah, it's a factory function. I think both of your issues can be resolved by 
passing the `CheckInfo` struct into the `CheckerProcess` class and having the 
`HealthChecker` use the old `toCheckInfo` function to convert the 
`HealthCheckInfo` to `CheckInfo`. That should avoid the code duplication too.


- Akash


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


On Jan. 30, 2018, 10:06 a.m., Akash Gupta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65395/
> -----------------------------------------------------------
> 
> (Updated Jan. 30, 2018, 10:06 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov, Andrew Schwartzmeyer, and 
> Gaston Kleiman.
> 
> 
> Bugs: MESOS-8498
>     https://issues.apache.org/jira/browse/MESOS-8498
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Refactored health check code to separate the logic for each check
> type and runtime (Plain/Docker/Nested). Now the matrix of different
> possiblilites is cleanly enumerated, making it easier to add
> future health checks, such as the ones for Windows.
> 
> 
> Diffs
> -----
> 
>   src/checks/checker.hpp 93502270f31e80c5f7c94b5b456625e9cdea1837 
>   src/checks/checker.cpp fff0aac504b4283a210f936e00c977fa60d88b3d 
>   src/checks/checker_process.hpp 510f3b2e6e689faaf26595214ce377c2b5518f28 
>   src/checks/checker_process.cpp ddb197b8cc2c503fef5ae20af32f5881fff9833f 
>   src/checks/health_checker.hpp 019fbd791f250ecc28ff59d779f90e7ccbf0c685 
>   src/checks/health_checker.cpp eaf9a18817eeeff7c29c7a4b9d1b183f398760a3 
>   src/docker/executor.cpp e4c53d558e414e50b1c429fba8e31e504c63744a 
>   src/launcher/default_executor.cpp 4a619859095cc2d30f4806813f64a2e48c83b3ea 
>   src/launcher/executor.cpp 050f5a057f360873e2b4738b126289bcd1bd0c7f 
> 
> 
> Diff: https://reviews.apache.org/r/65395/diff/2/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Akash Gupta
> 
>

Reply via email to