hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alejandro Abdelnur (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-103) Add a yarn AM - RM client module
Date Wed, 19 Dec 2012 03:22:16 GMT

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

Alejandro Abdelnur commented on YARN-103:
-----------------------------------------

IMO the interface/class approach is good if the following considerations are observed:

* the interface defines the API contract
* the class may implement default implementation of the contract
* the class may implement helper methods

This pattern is done over and over in the the JDK and in may extensions (ie Servlet/HttpServlet).

A nice thing of this pattern is that if in the future you need a new method in API contract,
you can add it to the interface, and add to the class the default implementation of this new
method (this is a must) and all existing subclasses won't break and won't need to implement
such new method if they are ok with the default behavior of the new method.

I'd suggest (following JDK conventions) renaming the AMRMCLientImpl class to AbstractAMRMClient
and making it an abstract class.


                
> 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

Mime
View raw message