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 44512: Support to get weights info by /weights.
Date Tue, 22 Mar 2016 10:02:33 GMT

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

(Updated March 22, 2016, 10:02 a.m.)


Review request for mesos and Adam B.


Changes
-------

Addressed comments of adam.


Bugs: MESOS-4316
    https://issues.apache.org/jira/browse/MESOS-4316


Repository: mesos


Description
-------

Support to get weights info by /weights.


Diffs (updated)
-----

  docs/weights.md a94251340d5193c9474b2e5e85328d62fe4edd8f 
  src/master/http.cpp bfea8fa811c24d37b2d7a8109728e1f40217e02f 
  src/master/master.hpp 124d43931a5c8a00ee0aaa604feb1761795209f2 
  src/master/weights_handler.cpp c9a1b0d9adbeb1e165999cdbb4f295b24f10b18f 

Diff: https://reviews.apache.org/r/44512/diff/


Testing (updated)
-------

make && make check.

$ (./mesos-master.sh --ip=127.0.0.1 --work_dir=/tmp/mesos-master  --authenticate_http --credentials=/opt/credentials.json
 >> /tmp/mesos-master.log 2>&1 &)

$ curl --user framework1:secret_string1 http://localhost:5050/weights | python -mjson.tool
[]

$ curl --user framework1:secret_string1 --data "[{\"weight\":1.8,\"role\":\"role1\"},{\"weight\":1.0,\"role\":\"role2\"},{\"weight\":3.4,\"role\":\"role3\"}]"
-X PUT http://127.0.0.1:5050/weights

$ curl --user framework1:secret_string1 http://localhost:5050/weights | python -mjson.tool
[
        {
            "role": "role3",
            "weight": 3.4
        },
        {
            "role": "role2",
            "weight": 1.0
        },
        {
            "role": "role1",
            "weight": 1.8
        }
]


Thanks,

Yongqiao Wang


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