[
https://issues.apache.org/jira/browse/YARN-193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13614833#comment-13614833
]
Bikas Saha commented on YARN-193:
---------------------------------
I am not sure if the normalization errors should reach all the way to the
RMAppAttemptImpl and cause failures. AM container request should be validated
and normalized in ApplicationMasterService.submitApplication() as the first
thing, even before sending it to RMAppManager. Task container requests should
be validated in ApplicationMasterService.allocate() as the first thing before
calling scheduler.allocate(). This is like a sanity check. This also ensures
that we are not calling into the scheduler and changing its internal state (eg
it could return completed container or newly allocated container which would be
lost if we throw an exception).
RMAppAttempImpl could assert that the allocated container has same size as the
requested container.
Normalization should simply cap the resource to the max allowed. Normalize can
be called from anywhere and so its not necessary to always validate before
normalizing. In fact we could choose to normalize requests > max to max instead
of throwing an exception.
Validate should not throw an exception IMO. Its like a helper function that
tell if the value is valid or not. Different users can choose to do different
things based on the result of validate().
> Scheduler.normalizeRequest does not account for allocation requests that
> exceed maximumAllocation limits
> ---------------------------------------------------------------------------------------------------------
>
> Key: YARN-193
> URL: https://issues.apache.org/jira/browse/YARN-193
> Project: Hadoop YARN
> Issue Type: Bug
> Components: resourcemanager
> Affects Versions: 2.0.2-alpha, 3.0.0
> Reporter: Hitesh Shah
> Assignee: Zhijie Shen
> Attachments: MR-3796.1.patch, MR-3796.2.patch, MR-3796.3.patch,
> MR-3796.wip.patch, YARN-193.4.patch, YARN-193.5.patch, YARN-193.6.patch,
> YARN-193.7.patch
>
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira