mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yongqiao Wang" <yq...@cn.ibm.com>
Subject Re: Review Request 41681: Introduce HTTP endpoint /weights for updating weight.
Date Tue, 29 Dec 2015 12:51:22 GMT

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

(Updated Dec. 29, 2015, 12:51 p.m.)


Review request for mesos, Adam B, Neil Conway, and Qian Zhang.


Changes
-------

Add authenrize logic for update weights request.


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 19f6e1a2d025bf6ff07f515b10d41e8a48d7d0b4 
  include/mesos/authorizer/authorizer.proto 7b729e19484d92be48bbde4dff2c833a4109936e 
  src/CMakeLists.txt 8169fe4f1a0eda5c2e2b30e22a7346478420a9a0 
  src/Makefile.am 8af0115caa67ac8f3193d8f0d0f1a4ae739af275 
  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 de9c3b9054611bf65f51df4d499bee927cf4d01d 
  src/tests/mesos.cpp 11ca0519ad0dad44328b6ebdf52c5356fda818b7 

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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message