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

Bibin A Chundatt commented on YARN-4925:
----------------------------------------

[~sunilg] and [~Naganarasimha] 
Thank you for looking into the issue.

The check is for {{ContainerRequest}} and IIUC after the discussion with 
[~wangda] the check was done to *properly account how much resources an app 
requests for each partitions* considering that  label for NODE_LOCAL and 
OFF-SWITCH shouldnt be set differently, which  is not possible if we are 
setting {{ContainerRequest}} . 

{noformat}
 public static class ContainerRequest {
    final Resource capability;
    final List<String> nodes;
    final List<String> racks;
    final Priority priority;
    final boolean relaxLocality;
    final String nodeLabelsExpression;
}
{noformat}
Consider in one NODELABEL there are 100 Nodes and need container to be started 
on NODE where data is available this is not allowed.For issue we face was for 
spark container  needed be node local and was  not allowed.
cc/ [~wangda] 

> ContainerRequest in AMRMClient, application should be able to specify 
> nodes/racks together with nodeLabelExpression
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: YARN-4925
>                 URL: https://issues.apache.org/jira/browse/YARN-4925
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Bibin A Chundatt
>            Assignee: Bibin A Chundatt
>
> Currently with nodelabel AMRMClient will not be able to specify nodelabels 
> with Node/Rack requests.For application like spark NODE_LOCAL requests cannot 
> be asked with label expression.
> As per the check in  {{AMRMClientImpl#checkNodeLabelExpression}}
> {noformat}
>     // Don't allow specify node label against ANY request
>     if ((containerRequest.getRacks() != null && 
>         (!containerRequest.getRacks().isEmpty()))
>         || 
>         (containerRequest.getNodes() != null && 
>         (!containerRequest.getNodes().isEmpty()))) {
>       throw new InvalidContainerRequestException(
>           "Cannot specify node label with rack and node");
>     }
> {noformat}
> {{AppSchedulingInfo#updateResourceRequests}} we do reset of labels to that of 
> OFF-SWITCH. 
> The above check is not required for ContainerRequest ask /cc [~wangda] thank 
> you for confirming



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to