Re: Review Request 34018: Update existing lambdas to meet style guide
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34018/#review83163 --- Patch looks great! Reviews applied: [34017, 34018] All tests passed. - Mesos ReviewBot On May 9, 2015, 7:52 p.m., haosdent huang wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34018/ --- (Updated May 9, 2015, 7:52 p.m.) Review request for mesos, Benjamin Hindman and Joris Van Remoortere. Bugs: MESOS-2670 https://issues.apache.org/jira/browse/MESOS-2670 Repository: mesos Description --- According Joris advice, replace the 'lambda::bind' expressions match these rules: 1. Binds to a static function without any side-effects. 2. Is self contained (i.e. does not rely on contextual parameters) 3. Does not bind in any arguments. (i.e. only uses lambda::_N for arguments) 4. Is only called in 1 place OR is so small that it is ok to repeat the code. Diffs - src/linux/cgroups.cpp df3211a0c25d7a16f36814886d14f81caaef2b9c src/log/network.hpp 7c74a55cc2a71fa2acd207605f972e7fbd203be4 src/slave/containerizer/isolators/cgroups/cpushare.cpp 6a5b2b5c6e2844fe1a10815956569194b6f56681 src/slave/containerizer/isolators/cgroups/mem.cpp 2c218b2b83cf42f54dbc7ec4c2ba8960b6e194de src/slave/containerizer/isolators/network/port_mapping.cpp a4abaff30bb4646b1b1edfdbbc243c9e3f6851df src/slave/containerizer/mesos/containerizer.cpp f2587280dc0e1d566d2b856a80358c7b3896c603 Diff: https://reviews.apache.org/r/34018/diff/ Testing --- make check Thanks, haosdent huang
Re: Review Request 29748: Added tests for dynamic reservation.
On April 23, 2015, 1:48 p.m., Michael Park wrote: As of now, the tests seem to take a long time to complete. We should investigate what the issue is before committing this patch. Jie Yu wrote: I suspect this is due to the default allocation interval (1 secs by default). Jie Yu wrote: Ping, has this been resolved? Michael Park wrote: Not yet. I'll look into this further today. Resolved this with AlexR offline. Turns out the allocation_interval (default 1s) as well as Filters (default 5s) need to be manually optimized. - Michael --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/29748/#review81311 --- On May 9, 2015, 4:38 a.m., Michael Park wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/29748/ --- (Updated May 9, 2015, 4:38 a.m.) Review request for mesos, Alexander Rukletsov, Ben Mahler, and Jie Yu. Bugs: MESOS-2489 https://issues.apache.org/jira/browse/MESOS-2489 Repository: mesos Description --- See summary. Diffs - src/Makefile.am 93c7c8a807a33ab639be6289535bbd32022aa85b src/tests/reservation_tests.cpp PRE-CREATION Diff: https://reviews.apache.org/r/29748/diff/ Testing --- make check Thanks, Michael Park
Re: Review Request 31667: Piped hashmapSlaveID, Resources from allocator through to sorter.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/31667/ --- (Updated May 10, 2015, 12:21 a.m.) Review request for mesos, Alexander Rukletsov and Ben Mahler. Changes --- Erase the `SlaveID` keys once the resources get to empty. Bugs: MESOS-2373 https://issues.apache.org/jira/browse/MESOS-2373 Repository: mesos Description --- `Sorter` changes: - Augmented `add`, `remove`, `allocated`, `unallocated`, `update` with `SlaveID`. - `allocation` returns `hashmapSlaveID, Resources`. `DRFSorter` changes: - `allocations` is updated from `hashmapstd::string, Resources` to `hashmapstd::string, hashmapSlaveID, Resources`. - `resources` is updated from `Resources` to `hashmapSlaveID, Resources`. Diffs (updated) - src/master/allocator/mesos/hierarchical.hpp 09adced9d8712b3eeda885d598443791186890db src/master/allocator/sorter/drf/sorter.hpp 4366710d6530b784aa5094813328d0e338239ba0 src/master/allocator/sorter/drf/sorter.cpp 2f69f384b95ff20d3ee429a4570a8cffa74d8e8b src/master/allocator/sorter/sorter.hpp e2efb27b11dbea42dd73f81e5db0d6d2b0a6034b src/tests/sorter_tests.cpp 42442353afe7bd3d1a5b43992f8ae191ac19bdcd Diff: https://reviews.apache.org/r/31667/diff/ Testing --- make check Thanks, Michael Park
Re: Review Request 33792: Extend hashmap to support custom equality and hash
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/33792/ --- (Updated May 9, 2015, 3:24 p.m.) Review request for mesos, Alexander Rojas and Ben Mahler. Bugs: MESOS-328 https://issues.apache.org/jira/browse/MESOS-328 Repository: mesos Description (updated) --- Extend hashmap to support custom equality and hash Diffs - 3rdparty/libprocess/3rdparty/stout/include/stout/hashmap.hpp 24dc369ec271ec2f35449e6ccf49c5b829ca6ce8 3rdparty/libprocess/3rdparty/stout/tests/hashmap_tests.cpp e8a932e5474bf2ba1a93a945ff9bc61fb5146c02 Diff: https://reviews.apache.org/r/33792/diff/ Testing --- make check Thanks, haosdent huang
Re: Review Request 33792: Extend hashmap to support custom equality and hash
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/33792/ --- (Updated May 9, 2015, 3:36 p.m.) Review request for mesos, Alexander Rojas and Ben Mahler. Bugs: MESOS-328 https://issues.apache.org/jira/browse/MESOS-328 Repository: mesos Description --- Extend hashmap to support custom equality and hash Diffs (updated) - 3rdparty/libprocess/3rdparty/stout/include/stout/hashmap.hpp 24dc369ec271ec2f35449e6ccf49c5b829ca6ce8 3rdparty/libprocess/3rdparty/stout/tests/hashmap_tests.cpp e8a932e5474bf2ba1a93a945ff9bc61fb5146c02 Diff: https://reviews.apache.org/r/33792/diff/ Testing --- make check Thanks, haosdent huang
Re: Review Request 33793: HTTP headers should be considered case-insensitive.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/33793/ --- (Updated May 9, 2015, 3:37 p.m.) Review request for mesos and Ben Mahler. Bugs: MESOS-328 https://issues.apache.org/jira/browse/MESOS-328 Repository: mesos Description --- HTTP headers should be considered case-insensitive. Diffs (updated) - 3rdparty/libprocess/include/process/http.hpp 058fa02eeecdf31023db731734257a924d770079 3rdparty/libprocess/src/encoder.hpp f1b91cf4fc215b6cc8f73285408384269a9bb894 3rdparty/libprocess/src/tests/http_tests.cpp d29cd29d8c0544671a09d204ca8ba4f24340e2de Diff: https://reviews.apache.org/r/33793/diff/ Testing --- make check Thanks, haosdent huang
Review Request 34016: Change the type of signaledWrapper to unique_ptr
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34016/ --- Review request for mesos and Ben Mahler. Repository: mesos Description --- Change the type of signaledWrapper to unique_ptr Diffs - src/slave/slave.cpp bf290bfd7d9a59ce7197ce34cbd8cf42e7dd17a3 Diff: https://reviews.apache.org/r/34016/diff/ Testing --- make check Thanks, haosdent huang
Re: Review Request 33792: Extend hashmap to support custom equality and hash
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/33792/ --- (Updated May 9, 2015, 3:04 p.m.) Review request for mesos, Alexander Rojas and Ben Mahler. Bugs: MESOS-328 https://issues.apache.org/jira/browse/MESOS-328 Repository: mesos Description --- Add InsensitiveHashMap. Diffs (updated) - 3rdparty/libprocess/3rdparty/stout/include/stout/hashmap.hpp 24dc369ec271ec2f35449e6ccf49c5b829ca6ce8 3rdparty/libprocess/3rdparty/stout/tests/hashmap_tests.cpp e8a932e5474bf2ba1a93a945ff9bc61fb5146c02 Diff: https://reviews.apache.org/r/33792/diff/ Testing --- make check Thanks, haosdent huang
Re: Review Request 33793: HTTP headers should be considered case-insensitive.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/33793/ --- (Updated May 9, 2015, 3:04 p.m.) Review request for mesos and Ben Mahler. Bugs: MESOS-328 https://issues.apache.org/jira/browse/MESOS-328 Repository: mesos Description --- HTTP headers should be considered case-insensitive. Diffs (updated) - 3rdparty/libprocess/include/process/http.hpp 058fa02eeecdf31023db731734257a924d770079 3rdparty/libprocess/src/encoder.hpp f1b91cf4fc215b6cc8f73285408384269a9bb894 3rdparty/libprocess/src/tests/http_tests.cpp d29cd29d8c0544671a09d204ca8ba4f24340e2de Diff: https://reviews.apache.org/r/33793/diff/ Testing --- make check Thanks, haosdent huang
Re: Review Request 33792: Extend hashmap to support custom equality and hash
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/33792/ --- (Updated May 9, 2015, 3:13 p.m.) Review request for mesos, Alexander Rojas and Ben Mahler. Bugs: MESOS-328 https://issues.apache.org/jira/browse/MESOS-328 Repository: mesos Description --- Add InsensitiveHashMap. Diffs (updated) - 3rdparty/libprocess/3rdparty/stout/include/stout/hashmap.hpp 24dc369ec271ec2f35449e6ccf49c5b829ca6ce8 3rdparty/libprocess/3rdparty/stout/tests/hashmap_tests.cpp e8a932e5474bf2ba1a93a945ff9bc61fb5146c02 Diff: https://reviews.apache.org/r/33792/diff/ Testing --- make check Thanks, haosdent huang
Re: Review Request 33792: Extend hashmap to support custom equality and hash
On May 4, 2015, 6:46 p.m., Alexander Rojas wrote: I am not really sure this is the way to go in order to create a case insensite hashmap. The class `hashmap` simply adds functionality to the `boost::unordered_map`. If one checks the API for the latter, the way needed to create an insensitive hashmap is to override the template parameters `Hash` and `Pred`. So I think it would be better simply to expose them in hashmap changin `stout/hashmpa.hpp` to: ```cpp template typename Key, typename Value, typename Hash = boost::hashKey, typename Pred = std::equal_toKey class hashmap : public boost::unoredered_mapKey, Value, Hash, Pred { … }; ``` The you only need to define functors that provide insensitive operatiosn for `Hash` and `Pred` and finally a typedef. Ben Mahler wrote: Another approach here is to define a type for the key which captures what we want ('CaseInsensitiveString'), this lets us capture it in the type signature cleanly: hashmapCaseInsensitiveString, string. But, in line with what Alex wrote, and from my [comment](https://issues.apache.org/jira/browse/MESOS-328?focusedCommentId=14526217page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14526217) in MESOS-328, I'd suggest one of the following: (1) Use unordered_map with custom equality and hash in http::Request / http::Response (we have c++11 now so can assume the presence of std::unordered_map). (2) Extend hashmap to support custom equality and hash, and use this in http::Request / http::Response. @arojas @bmahler I update the patch and I choose exterd hashmap to support custom equality and hash. But I am not sure where should I add the InsensitiveHash and InsensitiveEqual now. I put them in http.hpp now, you could check it out from another [review](https://reviews.apache.org/r/33793/diff/#). By the way, I not sure whether I should add a typedef or not. And If I want add a typedef, should I add it to http.hpp or hashmap.hpp? - haosdent --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/33792/#review82415 --- On May 9, 2015, 3:04 p.m., haosdent huang wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/33792/ --- (Updated May 9, 2015, 3:04 p.m.) Review request for mesos, Alexander Rojas and Ben Mahler. Bugs: MESOS-328 https://issues.apache.org/jira/browse/MESOS-328 Repository: mesos Description --- Add InsensitiveHashMap. Diffs - 3rdparty/libprocess/3rdparty/stout/include/stout/hashmap.hpp 24dc369ec271ec2f35449e6ccf49c5b829ca6ce8 3rdparty/libprocess/3rdparty/stout/tests/hashmap_tests.cpp e8a932e5474bf2ba1a93a945ff9bc61fb5146c02 Diff: https://reviews.apache.org/r/33792/diff/ Testing --- make check Thanks, haosdent huang
Re: Review Request 33792: Extend hashmap to support custom equality and hash
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/33792/ --- (Updated May 9, 2015, 3:23 p.m.) Review request for mesos, Alexander Rojas and Ben Mahler. Bugs: MESOS-328 https://issues.apache.org/jira/browse/MESOS-328 Repository: mesos Description --- Add InsensitiveHashMap. Diffs (updated) - 3rdparty/libprocess/3rdparty/stout/include/stout/hashmap.hpp 24dc369ec271ec2f35449e6ccf49c5b829ca6ce8 3rdparty/libprocess/3rdparty/stout/tests/hashmap_tests.cpp e8a932e5474bf2ba1a93a945ff9bc61fb5146c02 Diff: https://reviews.apache.org/r/33792/diff/ Testing --- make check Thanks, haosdent huang
Re: Review Request 33793: HTTP headers should be considered case-insensitive.
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/33793/ --- (Updated May 9, 2015, 3:23 p.m.) Review request for mesos and Ben Mahler. Bugs: MESOS-328 https://issues.apache.org/jira/browse/MESOS-328 Repository: mesos Description --- HTTP headers should be considered case-insensitive. Diffs (updated) - 3rdparty/libprocess/include/process/http.hpp 058fa02eeecdf31023db731734257a924d770079 3rdparty/libprocess/src/encoder.hpp f1b91cf4fc215b6cc8f73285408384269a9bb894 3rdparty/libprocess/src/tests/http_tests.cpp d29cd29d8c0544671a09d204ca8ba4f24340e2de Diff: https://reviews.apache.org/r/33793/diff/ Testing --- make check Thanks, haosdent huang
Re: Review Request 34016: Change the type of signaledWrapper to unique_ptr
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34016/#review83156 --- Patch looks great! Reviews applied: [34016] All tests passed. - Mesos ReviewBot On May 9, 2015, 5:07 p.m., haosdent huang wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34016/ --- (Updated May 9, 2015, 5:07 p.m.) Review request for mesos and Ben Mahler. Repository: mesos Description --- Change the type of signaledWrapper to unique_ptr Diffs - src/slave/slave.cpp bf290bfd7d9a59ce7197ce34cbd8cf42e7dd17a3 Diff: https://reviews.apache.org/r/34016/diff/ Testing --- make check Thanks, haosdent huang
Review Request 34017: Update existing lambdas to meet style guide
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34017/ --- Review request for mesos. Repository: mesos Description --- According Joris advice, only replace the 'lambda::bind' expressions match these rules: 1. Binds to a static function without any side-effects. 2. Is self contained (i.e. does not rely on contextual parameters) 3. Does not bind in any arguments. (i.e. only uses lambda::_N for arguments) 4. Is only called in 1 place OR is so small that it is ok to repeat the code. Diffs - 3rdparty/libprocess/src/process.cpp 588bd3e40a0b350ceca15bb8f3f78290ba41d173 3rdparty/libprocess/src/tests/benchmarks.cpp 0d6714807f7027e6ab199eb0d9ff57bc8a3a2d8a Diff: https://reviews.apache.org/r/34017/diff/ Testing --- make check Thanks, haosdent huang
Re: Review Request 34017: Update existing lambdas to meet style guide
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34017/ --- (Updated May 9, 2015, 7:45 p.m.) Review request for mesos. Repository: mesos Description --- According Joris advice, only replace the 'lambda::bind' expressions match these rules: 1. Binds to a static function without any side-effects. 2. Is self contained (i.e. does not rely on contextual parameters) 3. Does not bind in any arguments. (i.e. only uses lambda::_N for arguments) 4. Is only called in 1 place OR is so small that it is ok to repeat the code. Diffs (updated) - 3rdparty/libprocess/src/process.cpp 588bd3e40a0b350ceca15bb8f3f78290ba41d173 3rdparty/libprocess/src/tests/benchmarks.cpp 0d6714807f7027e6ab199eb0d9ff57bc8a3a2d8a Diff: https://reviews.apache.org/r/34017/diff/ Testing --- make check Thanks, haosdent huang
Re: Review Request 34017: Update existing lambdas to meet style guide
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34017/ --- (Updated May 9, 2015, 7:50 p.m.) Review request for mesos, Benjamin Hindman and Joris Van Remoortere. Bugs: MESOS-2670 https://issues.apache.org/jira/browse/MESOS-2670 Repository: mesos Description --- According Joris advice, only replace the 'lambda::bind' expressions match these rules: 1. Binds to a static function without any side-effects. 2. Is self contained (i.e. does not rely on contextual parameters) 3. Does not bind in any arguments. (i.e. only uses lambda::_N for arguments) 4. Is only called in 1 place OR is so small that it is ok to repeat the code. Diffs (updated) - 3rdparty/libprocess/src/process.cpp 588bd3e40a0b350ceca15bb8f3f78290ba41d173 3rdparty/libprocess/src/tests/benchmarks.cpp 0d6714807f7027e6ab199eb0d9ff57bc8a3a2d8a Diff: https://reviews.apache.org/r/34017/diff/ Testing --- make check Thanks, haosdent huang
Re: Review Request 34018: Update existing lambdas to meet style guide
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34018/ --- (Updated May 9, 2015, 7:50 p.m.) Review request for mesos, Benjamin Hindman and Joris Van Remoortere. Bugs: MESOS-2670 https://issues.apache.org/jira/browse/MESOS-2670 Repository: mesos Description --- According Joris advice, only replace the 'lambda::bind' expressions match these rules: 1. Binds to a static function without any side-effects. 2. Is self contained (i.e. does not rely on contextual parameters) 3. Does not bind in any arguments. (i.e. only uses lambda::_N for arguments) 4. Is only called in 1 place OR is so small that it is ok to repeat the code. Diffs (updated) - src/linux/cgroups.cpp df3211a0c25d7a16f36814886d14f81caaef2b9c src/log/network.hpp 7c74a55cc2a71fa2acd207605f972e7fbd203be4 src/slave/containerizer/isolators/cgroups/cpushare.cpp 6a5b2b5c6e2844fe1a10815956569194b6f56681 src/slave/containerizer/isolators/cgroups/mem.cpp 2c218b2b83cf42f54dbc7ec4c2ba8960b6e194de src/slave/containerizer/isolators/network/port_mapping.cpp a4abaff30bb4646b1b1edfdbbc243c9e3f6851df src/slave/containerizer/mesos/containerizer.cpp f2587280dc0e1d566d2b856a80358c7b3896c603 Diff: https://reviews.apache.org/r/34018/diff/ Testing --- make check Thanks, haosdent huang
Re: Review Request 34017: Update existing lambdas to meet style guide
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/34017/ --- (Updated May 9, 2015, 7:52 p.m.) Review request for mesos, Benjamin Hindman and Joris Van Remoortere. Bugs: MESOS-2670 https://issues.apache.org/jira/browse/MESOS-2670 Repository: mesos Description (updated) --- According Joris advice, replace the 'lambda::bind' expressions match these rules: 1. Binds to a static function without any side-effects. 2. Is self contained (i.e. does not rely on contextual parameters) 3. Does not bind in any arguments. (i.e. only uses lambda::_N for arguments) 4. Is only called in 1 place OR is so small that it is ok to repeat the code. Diffs - 3rdparty/libprocess/src/process.cpp 588bd3e40a0b350ceca15bb8f3f78290ba41d173 3rdparty/libprocess/src/tests/benchmarks.cpp 0d6714807f7027e6ab199eb0d9ff57bc8a3a2d8a Diff: https://reviews.apache.org/r/34017/diff/ Testing --- make check Thanks, haosdent huang