[
https://issues.apache.org/jira/browse/YARN-921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13762756#comment-13762756
]
Bikas Saha commented on YARN-921:
---------------------------------
The requirement is to be able to clone a yarn protocol object (not a protobuf
object). A yarn object is implemented as a protobuf object but that is not
visible to the user. So yarn helper API exists eg. Container.newInstance()
returns a container object. However, given a container object there is no
helper API to create a copy (like a copy constructor in C++). The user has to
manually get and set the members. The set methods are mostly @private and so
the user is technically not supposed to set any member. So having a .clone
method lets the user easily create a copy of an existing object.
> 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