Skip to content

Commit

Permalink
Updated Docker containerizer to set Docker container's resource limits.
Browse files Browse the repository at this point in the history
This is to ensure the resource limits of Docker container where custom
executor runs can be correctly updated when a new task is launched or
an existing task terminates. And the `resource` field in the `Container`
struct is also renamed to `resourceRequests`.

Review: https://reviews.apache.org/r/72391
  • Loading branch information
qianzhangxa committed May 5, 2020
1 parent 97dc2b0 commit 929932f
Show file tree
Hide file tree
Showing 4 changed files with 174 additions and 90 deletions.
1 change: 1 addition & 0 deletions include/mesos/values.hpp
Expand Up @@ -27,6 +27,7 @@ namespace mesos {

std::ostream& operator<<(std::ostream& stream, const Value::Scalar& scalar);
bool operator==(const Value::Scalar& left, const Value::Scalar& right);
bool operator!=(const Value::Scalar& left, const Value::Scalar& right);
bool operator<(const Value::Scalar& left, const Value::Scalar& right);
bool operator<=(const Value::Scalar& left, const Value::Scalar& right);
bool operator>(const Value::Scalar& left, const Value::Scalar& right);
Expand Down
6 changes: 6 additions & 0 deletions src/common/values.cpp
Expand Up @@ -99,6 +99,12 @@ bool operator==(const Value::Scalar& left, const Value::Scalar& right)
}


bool operator!=(const Value::Scalar& left, const Value::Scalar& right)
{
return !(left == right);
}


bool operator<(const Value::Scalar& left, const Value::Scalar& right)
{
return convertToFixed(left.value()) < convertToFixed(right.value());
Expand Down

0 comments on commit 929932f

Please sign in to comment.