----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/41681/ -----------------------------------------------------------
(Updated Jan. 5, 2016, 12:55 p.m.) Review request for mesos, Adam B, Neil Conway, and Qian Zhang. Bugs: MESOS-4214 https://issues.apache.org/jira/browse/MESOS-4214 Repository: mesos Description ------- Introduce HTTP endpoint /weights for updating weight. Diffs (updated) ----- include/mesos/authorizer/authorizer.hpp f61613948b7b5c5c2118f1782a0c5f8ff7e8e057 include/mesos/authorizer/authorizer.proto 7b729e19484d92be48bbde4dff2c833a4109936e src/CMakeLists.txt 8169fe4f1a0eda5c2e2b30e22a7346478420a9a0 src/Makefile.am e08e86724abaa3023f0483aa222354c95d4d3817 src/authorizer/local/authorizer.hpp 1563c11709c2612350354690b50ceb33d2720f98 src/authorizer/local/authorizer.cpp 1d135fb6906c7050a788cbac9ca2d8164ff064ef src/master/http.cpp deb0c8f9852dc0eec1e8c0ff35c684f982e8b110 src/master/master.hpp 1cc5531de70bdc0bdce9835c4930dc774406fac9 src/master/master.cpp 40ce3e17fca88da689128bcf5d35fdddc396c011 src/master/registry.proto 9958f9c2bdb785390fca2f292b65d5a9310434d5 src/master/weights_handler.cpp PRE-CREATION src/tests/mesos.hpp a4811b0d8dee33ff2ca4968f532ce64b7ea95249 src/tests/mesos.cpp f4b0f82449c4b6a2b4b7b7f14518714485d5a13a Diff: https://reviews.apache.org/r/41681/diff/ Testing ------- Make & Make check successfully! $ (./mesos-master.sh --ip=127.0.0.1 --work_dir=/Users/yqwyq/tmp/mesos-master >> /tmp/mesos-master.log 2>&1 &) $ curl -d weights="[{\"weight\":1.0,\"role\":\"role1\"},{\"weight\":8.0,\"role\":\"role2\"}]" -X PUT http://localhost:5050/weights $ curl http://localhost:5050/roles { "roles": [ { "frameworks": [ ], "name": "*", "resources": { "cpus": 0, "disk": 0, "mem": 0 }, "weight": 1 }, { "frameworks": [ ], "name": "role1", "resources": { "cpus": 0, "disk": 0, "mem": 0 }, "weight": 1 }, { "frameworks": [ ], "name": "role2", "resources": { "cpus": 0, "disk": 0, "mem": 0 }, "weight": 8 } ] } Thanks, Yongqiao Wang