[
https://issues.apache.org/jira/browse/YARN-8738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16712039#comment-16712039
]
Haibo Chen commented on YARN-8738:
----------------------------------
Thanks [~snemeth] for the elaboration. What I meant is that because only
findPercentage() throws AllocationConfiurationException per the comment in the
code, we can throw AllocationConfigurationException too for negative values,
and we can update the parameter of createConfigException to see the value must
be a non-positive number. Note that in findPercentage() we have different
messages for different types of issues. The message should be sufficient enough
to tell the user what exactly the issue is.
{code:java}
private static ConfigurableResource parseNewStyleResource(String value,
long missing) throws AllocationConfigurationException {
....
} catch (AllocationConfigurationException ex) {
// This only comes from findPercentage()
throw createConfigException(value, "The "
+ "resource values must all be percentages. \""
+ resourceValue + "\" is either not a number or does not "
+ "include the '%' symbol.", ex);
}
}
return configurableResource;
}{code}
> FairScheduler configures maxResources or minResources as negative, the value
> parse to a positive number.
> --------------------------------------------------------------------------------------------------------
>
> Key: YARN-8738
> URL: https://issues.apache.org/jira/browse/YARN-8738
> Project: Hadoop YARN
> Issue Type: Bug
> Components: fairscheduler
> Affects Versions: 3.2.0
> Reporter: Sen Zhao
> Assignee: Szilard Nemeth
> Priority: Major
> Attachments: YARN-8738.001.patch, YARN-8738.002.patch
>
>
> If maxResources or minResources is configured as a negative number, the value
> will be positive after parsing.
> If this is a problem, I will fix it. If not, the
> FairSchedulerConfiguration#parseNewStyleResource parse negative number should
> be same with parseOldStyleResource .
> cc:[~templedf], [~leftnoteasy]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]