You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Varun Saxena (JIRA)" <ji...@apache.org> on 2016/12/06 21:02:58 UTC

[jira] [Comment Edited] (YARN-4675) Reorganize TimeClientImpl into TimeClientV1Impl and TimeClientV2Impl

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

Varun Saxena edited comment on YARN-4675 at 12/6/16 9:02 PM:
-------------------------------------------------------------

At a cursory glance, the patch posted seems to be at a high level, pretty near to what we had in mind when this was raised. 

I agree though, that we do not necessarily need a single interface however if we do that we would probably pull out connection related (URL connection factory, retry, etc.) code into a separate class. Also, the facility for getting delegation token and renewing it would be common to both the clients. We would not want to repeat such large amounts of code in both V1 and V2 client implementations. Maybe we can have a separate class for all this common stuff and method for posting entities in an interface. Implementations then can probably extend from this class. 
But then TimelineClient extends AbstractService and we would not want to break that. Maybe instead of extending the class containing the common code we can just use it as a helper class with an object of it in each implementation.

Thoughts ?




was (Author: varun_saxena):
At a cursory glance, the patch posted seems to be at a high level, pretty near to what we had in mind when this was raised. 

I agree that we do not necessarily need a single interface however if we do that we would probably pull out connection related (URL connection factory, retry, etc.) code into a separate class. Also, the facility for getting delegation token and renewing it would be common to both the clients. We would not want to repeat such large amounts of code in both V1 and V2 client implementations. Maybe we can have a separate class for all this common stuff and method for posting entities in an interface. Implementations then can probably extend from this class. 
But then TimelineClient extends AbstractService and we would not want to break that. Maybe instead of extending the class containing the common code we can just use it as a helper class with an object of it in each implementation.

Thoughts ?



> Reorganize TimeClientImpl into TimeClientV1Impl and TimeClientV2Impl
> --------------------------------------------------------------------
>
>                 Key: YARN-4675
>                 URL: https://issues.apache.org/jira/browse/YARN-4675
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: timelineserver
>            Reporter: Naganarasimha G R
>            Assignee: Naganarasimha G R
>              Labels: YARN-5355, oct16-medium
>         Attachments: YARN-4675-YARN-2928.v1.001.patch
>
>
> We need to reorganize TimeClientImpl into TimeClientV1Impl ,  TimeClientV2Impl and if required a base class, so that its clear which part of the code belongs to which version and thus better maintainable.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org