hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Szilard Nemeth (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-9318) Resources#multiplyAndRoundUp does not consider Resource Types
Date Wed, 27 Feb 2019 14:50:00 GMT

    [ https://issues.apache.org/jira/browse/YARN-9318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16779387#comment-16779387

Szilard Nemeth commented on YARN-9318:

Sure, I updated the patch with this (almost).
multiplyTo can't call multiplyAndRoundDown directly as multiplyAndRound clones the Resource
but multiplyTo does not.
This is not a problem if the caller retrieves the return value and using it later on, but
can be a problem if the method do get called but the return value is ignored.
Anyway, I did the following: 
- modified multiplyAndRoundDown / multiplyAndRoundUp to clone the Resource before passing
it over to multiplyAndRound. 
- multiplyAndRound no longer does cloning
- multiplyTo calls multiplyAndRound without cloning first, so it will work as before:
multiplyAndRound(lhs, by, RoundingDirection.DOWN);

Please check the latest patch!

> Resources#multiplyAndRoundUp does not consider Resource Types
> -------------------------------------------------------------
>                 Key: YARN-9318
>                 URL: https://issues.apache.org/jira/browse/YARN-9318
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Szilard Nemeth
>            Assignee: Szilard Nemeth
>            Priority: Major
>         Attachments: YARN-9318.001.patch, YARN-9318.002.patch, YARN-9318.003.patch, YARN-9318.004.patch
> org.apache.hadoop.yarn.util.resource.Resources#multiplyAndRoundUp only deals with memory
and vcores while computing the rounded value. It should also consider custom Resource Types
as well.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org

View raw message