You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Guangya Liu (JIRA)" <ji...@apache.org> on 2016/07/29 05:19:20 UTC

[jira] [Updated] (MESOS-5921) `validate` is a bit heavy to check negative scalar resource

     [ https://issues.apache.org/jira/browse/MESOS-5921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guangya Liu updated MESOS-5921:
-------------------------------
    Attachment: WithValidation.png

> `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
>         Attachments: WithValidation.png
>
>
> 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)