mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Quinn Leng <>
Subject Re: Review Request 60822: Add filtering to /slaves, /slave/containers and /frameworks endpoints.
Date Thu, 13 Jul 2017 18:04:10 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated July 13, 2017, 6:04 p.m.)

Review request for mesos, Anand Mazumdar, Alexander Rojas, Greg Mann, and Vinod Kone.

Bugs: MESOS-7630

Repository: mesos


Added query parameter support for 'slaves'
endpoint. We can use 'slave_id' to specify
which slave information to query. Thus it
looks like '/slaves?slave_id=[slave id]'

If not slave id is specified, it will return
information of all slaves, just like before

The structure for response is the same for both
specifying or not specifying slave id. Thus even
for request with slave id specified, the response
will still contain both fields 'slaves',
'recovered_slaves' etc..

Add query parameter support for '/frameworks' endpoint.
To query the information about a specific framework, we
can use 'framework_id' to specify the framework, thus it
looks like'/frameworks?framework_id=[framework id]'

To maintain consistency, the structure for response is
reserved, thus the response still contains field 'frameworks'
and 'completed_frameworks' etc..

Since code for '/state' endpoint and '/frameworks' are coupled
(they share 'FullFrameworkWriter' class), thus the code for '/state'
endpoint is also updated.

Add query parameter support for '/slave/containers' endpoint.
To get the information about a specific container, you can specify
the container_id. The request would look like
'/slave/containers?container_id=[container id]'.

When no container id is specified, it will return the information
about all containers.

Diffs (updated)

  src/master/http.cpp 948aa118101b6ce03410c9e0c945b6ca16668ca2 
  src/slave/http.hpp ad412d4e2fde13a7afa3563c611ef50b11829cac 
  src/slave/http.cpp 3070b3b06a9d9e75b9d5afb255098e63a1056ec2 




Passed 'make check -j48'
Passed 'GTEST_FILTER="MasterTest.FrameworksEndpointQueryFramework" make check -j48'
Passed 'GLOG_v=1 ./bin/ --gtest_filter="MasterTest.FrameworksEndpointQueryFramework"
--gtest_repeat=1000 --gtest_break_on_failure'
Passed 'GTEST_FILTER="MasterTest.SlavesEndpointQuerySlave" make check -j48'
Passed 'GLOG_v=1 ./bin/ --gtest_filter="MasterTest.SlavesEndpointQuerySlave"
--gtest_repeat=1000 --gtest_break_on_failure'


Quinn Leng

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