zhihai xu commented on YARN-3857:

Hi [~mujunchao], thanks for reporting and working on this issue.
It is a nice catch. I see why this is a critical issue. For non-secure cluster, 
the more completed jobs, the more entries with null value will be left in 
{{ClientToAMTokenSecretManagerInRM#masterKeys}}. You patch makes sense to me, 
since we only call {{unRegisterApplication}} in secure mode, we should also 
call {{registerApplication}} in secure mode to match {{unRegisterApplication}}.
Could you add a test case in your patch? You can do something similar as 
{{TestRMAppAttemptTransitions#testGetClientToken}} for non-secure mode.

> Memory leak in ResourceManager with SIMPLE mode
> -----------------------------------------------
>                 Key: YARN-3857
>                 URL: https://issues.apache.org/jira/browse/YARN-3857
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: resourcemanager
>    Affects Versions: 2.7.0
>            Reporter: mujunchao
>            Priority: Critical
>         Attachments: hadoop-yarn-server-resourcemanager.patch
>  We register the ClientTokenMasterKey to avoid client may hold an invalid 
> ClientToken after RM restarts. In SIMPLE mode, we register 
> Pair<ApplicationAttemptId, null> ,  But we never remove it from HashMap, as 
> unregister only runing while in Security mode, so memory leak coming. 

This message was sent by Atlassian JIRA

Reply via email to