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

Jian He commented on YARN-2229:
-------------------------------

bq. ContainerTokenIdentifier serializes a long (getContainerId()) at RM side, 
but deserializes a int (getId()) at NM side. In this case, I'm afraid it's 
going to be wrong.
ContainerToken compatibility can not be ensured until rolling upgrades is 
completed as mentioned here 
https://issues.apache.org/jira/browse/YARN-2152?focusedCommentId=14061366&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14061366

Earlier the id integer returned by getId is supposed to be a monotonically 
increasing integer and some application logic may depend on that (e.g. sort 
containers based on the id integer),  the problem with the approach of adding a 
new field is that multiple containers may have the same id integer after RM 
restarts. Thoughts?

> ContainerId can overflow with RM restart
> ----------------------------------------
>
>                 Key: YARN-2229
>                 URL: https://issues.apache.org/jira/browse/YARN-2229
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>          Components: resourcemanager
>            Reporter: Tsuyoshi OZAWA
>            Assignee: Tsuyoshi OZAWA
>         Attachments: YARN-2229.1.patch, YARN-2229.10.patch, 
> YARN-2229.10.patch, YARN-2229.2.patch, YARN-2229.2.patch, YARN-2229.3.patch, 
> YARN-2229.4.patch, YARN-2229.5.patch, YARN-2229.6.patch, YARN-2229.7.patch, 
> YARN-2229.8.patch, YARN-2229.9.patch
>
>
> On YARN-2052, we changed containerId format: upper 10 bits are for epoch, 
> lower 22 bits are for sequence number of Ids. This is for preserving 
> semantics of {{ContainerId#getId()}}, {{ContainerId#toString()}}, 
> {{ContainerId#compareTo()}}, {{ContainerId#equals}}, and 
> {{ConverterUtils#toContainerId}}. One concern is epoch can overflow after RM 
> restarts 1024 times.
> To avoid the problem, its better to make containerId long. We need to define 
> the new format of container Id with preserving backward compatibility on this 
> JIRA.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to