hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Junping Du (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-921) Consider adding clone methods to protocol objects
Date Tue, 10 Sep 2013 02:44:52 GMT

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

Junping Du commented on YARN-921:
---------------------------------

Hi Bikas, Thanks for your good suggestions here. I would follow up a email thread to dev and
get more people's feedback. Before that, I want to make sure I understand the requirement
for clone in proto objects. 
First, I didn't find a perfect example to clone a proto in the same class type. What I found
are get info from one proto and set to another proto. Am I missing something? Shouldn't semantics
of clone be something like this?
{code}
x.clone() != x
x.clone().getClass() == x.getClass()
x.clone().equals(x) == true
{code}
                
> Consider adding clone methods to protocol objects
> -------------------------------------------------
>
>                 Key: YARN-921
>                 URL: https://issues.apache.org/jira/browse/YARN-921
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>    Affects Versions: 2.1.0-beta
>            Reporter: Bikas Saha
>            Assignee: Junping Du
>
> Whenever we create a new object from an existing object, a clone method could be used
to create a copy efficiently vs. new object followed by setters.

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