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

Arun Suresh commented on YARN-7696:
-----------------------------------

[~leftnoteasy], thanks for the review
About the constructors, technically, no external application should be even 
allowed to create a ConatinerTokenIdentifier - It would be a security breach. 
In the api.Container object that is returned to an external application, we 
send only an opaque Token object - Only the RM and NM can decode it into a 
ContainerTokenIdentifier. The reason I moved all the constructors out is 
because it used only by tests. Let take this opportunity to clean up the code 
as well.

bq. I'm doubt if application needs to read any fields from token identifier as 
we already have information in Container
You are right, in that you can get it from the Container. But this is needed 
for NM / RM recovery cases though. The NMContainerStatus is populated using the 
ContainerTokenId (which is stored in the state store).


> Add container tags to ContainerTokenIdentifier, api.Container and 
> NMContainerStatus to handle all recovery cases
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: YARN-7696
>                 URL: https://issues.apache.org/jira/browse/YARN-7696
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Arun Suresh
>            Assignee: Arun Suresh
>         Attachments: YARN-7696-YARN-6592.001.patch, 
> YARN-7696-YARN-6592.002.patch, YARN-7696-YARN-6592.003.patch
>
>
> The NM needs to persist the Container tags so that on RM recovery, it is sent 
> back to the RM via the NMContainerStatus. The RM would then recover the 
> AllocationTagsManager using this information.
> The api.Container also requires the allocationTags since after AM recovery, 
> we need to provide the AM with previously allocated containers.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to