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

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
-----

  include/mesos/mesos.proto 2431fdd6b84625c6140a2b3913736bffada4e7f6 
  src/CMakeLists.txt bdc45ae604c940dadc27ab6e8b8a3327bd00642b 
  src/Makefile.am cf7f950c0c320a6c8e956409a35a7f47d905f71d 
  src/master/http.cpp deb0c8f9852dc0eec1e8c0ff35c684f982e8b110 
  src/master/master.hpp 8af82a0bbc2038e18180136c82cbaeeacc7b3526 
  src/master/master.cpp 40ce3e17fca88da689128bcf5d35fdddc396c011 
  src/master/weights_handler.cpp PRE-CREATION 

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

Reply via email to