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

Daniel Templeton commented on YARN-6022:
----------------------------------------

{quote}According to API definition, user should write code like:
{code}AbstractResourceRequest r = new ResourceRequest(...);
r.setCapability(..._{code}{quote}

I don't quite follow that.  Why wouldn't the user write the same thing as 
before:

{code}ResourceRequest r = new ResourceRequest(...);
r.setCapability(..._{code}

?

I agree that internal changes should not cause external API changes, but this 
change doesn't change the API in any meaningful way.  No user code will break.  
Nothing will change about the way users write code.  The only change is that 
the compatibility accessors move from the top section of the _Method Summary_ 
section in the {{ResourceRequest}} and {{UpdateContainerRequest}} javadocs into 
the _Methods inherited from..._ part of the _Method Summary_ section.  I did a 
little digging and was unable to find any wisdom on the interwebs that labels a 
change like this as a breaking change.  (The most complete doc I found was 
https://wiki.eclipse.org/Evolving_Java-based_APIs_2.)

It's a little bit of an odd API change, but I don't think it's the end of days. 
 [~leftnoteasy]'s suggestion on YARN-5774 to change the normalize API to accept 
a {{Resource}} instead of a request sounds like a cleaner solution.  I'm fine 
with implementing that change as long as we can do it before it gets in the way 
of beta1.

> Revert changes of AbstractResourceRequest
> -----------------------------------------
>
>                 Key: YARN-6022
>                 URL: https://issues.apache.org/jira/browse/YARN-6022
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Wangda Tan
>            Priority: Blocker
>
> YARN-5774 added AbstractResourceRequest to make easier internal scheduler 
> change, this is not a correct approach: For example, with this change, we 
> need to make AbstractResourceRequest to be public/stable. And end users can 
> use it like:
> {code}
> AbstractResourceRequest request = ...
> request.setCapability(...)
> {code}
> But AbstractResourceRequest should not be visible by application at all. 
> We need to revert it from branch-2.8 / branch-2 / trunk. 



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to