[
https://issues.apache.org/jira/browse/MESOS-5921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15398327#comment-15398327
]
Benjamin Mahler commented on MESOS-5921:
----------------------------------------
Ok, thanks for checking that. I'm still ok with updating this to use
{{isNegative}} as it makes the code easier to understand. Happy to review a
patch if you have one!
> `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)