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

Siddharth Seth commented on YARN-103:
-------------------------------------

After discussing this offline with Vinod - couple of reasons this was done for 
the YarnClient and possibly elsewhere.
- Often, we end up making private methods public for testing (with an 
annotation of-course). Having an interface allows this to be done in the 
implementing class only.
- Also mocking can be a little cleaner with an interface.

The interface shouldn't really be implemented by anyone outside of YARN - it 
exists primarily for cleaner code. Given this, I think it's Ok to have an 
interface, and it doesn't really limit adding methods. Alternately an abstract 
class to keep things clean. (The two should also stay in the same module - 
there's no requirement for the interface to sit in an API module and the impl 
elsewhere.)
                
> Add a yarn AM - RM client module
> --------------------------------
>
>                 Key: YARN-103
>                 URL: https://issues.apache.org/jira/browse/YARN-103
>             Project: Hadoop YARN
>          Issue Type: Improvement
>            Reporter: Bikas Saha
>            Assignee: Bikas Saha
>         Attachments: YARN-103.1.patch, YARN-103.2.patch, YARN-103.3.patch, 
> YARN-103.4.patch, YARN-103.4.wrapper.patch, YARN-103.5.patch, 
> YARN-103.6.patch, YARN-103.7.patch
>
>
> Add a basic client wrapper library to the AM RM protocol in order to prevent 
> proliferation of code being duplicated everywhere. Provide helper functions 
> to perform reverse mapping of container requests to RM allocation resource 
> request table format.

--
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

Reply via email to