Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mesos 1.11 #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion isolator/test_isolator_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* limitations under the License.
*/

#include <string>

#include <mesos/mesos.hpp>

#include <mesos/module/isolator.hpp>
Expand Down Expand Up @@ -108,7 +110,8 @@ process::Future<ContainerLimitation> TestIsolatorProcess::watch(

process::Future<Nothing> TestIsolatorProcess::update(
const ContainerID& containerId,
const Resources& resources)
const Resources& resourceRequests,
const google::protobuf::Map<std::string, Value::Scalar>& resourceLimits = {})
{
if (!promises.contains(containerId)) {
return process::Failure("Unknown container: " + stringify(containerId));
Expand Down
12 changes: 9 additions & 3 deletions isolator/test_isolator_module.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef __TEST_ISOLATOR_MODULE_HPP__
#define __TEST_ISOLATOR_MODULE_HPP__

#include <string>

#include <mesos/mesos.hpp>

#include <mesos/slave/isolator.hpp>
Expand Down Expand Up @@ -61,7 +63,8 @@ class TestIsolatorProcess : public process::Process<TestIsolatorProcess>

process::Future<Nothing> update(
const ContainerID& containerId,
const Resources& resources);
const Resources& resourceRequests,
const google::protobuf::Map<std::string, Value::Scalar>& resourceLimits);

process::Future<ResourceStatistics> usage(
const ContainerID& containerId);
Expand Down Expand Up @@ -150,12 +153,15 @@ class TestIsolator : public mesos::slave::Isolator

virtual process::Future<Nothing> update(
const ContainerID& containerId,
const Resources& resources) override
const Resources& resourceRequests,
const google::protobuf::Map<
std::string, Value::Scalar>& resourceLimits = {}) override
{
return dispatch(process.get(),
&TestIsolatorProcess::update,
containerId,
resources);
resourceRequests,
resourceLimits);
}

virtual process::Future<ResourceStatistics> usage(
Expand Down