Guangya Liu created MESOS-5921:
----------------------------------
Summary: `validate` is a bit heavy to check negative scalar
resource
Key: MESOS-5921
URL: https://issues.apache.org/jira/browse/MESOS-5921
Project: Mesos
Issue Type: Bug
Reporter: Guangya Liu
Assignee: Guangya Liu
When subtract resources finished, we need to call {{Resources::validate}} to
check if the scalar resource is negative so as to remove this resource if it is
negative. This is a bit heavy as the {{Resources::validate}} did many
validation stuffs, such as checking type, validating role, checking resource
name etc, all of them are not necessary.
We should introduce a new helper function {{isNegative}} to check if the
resource is a negative scalar resource.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)