[
https://issues.apache.org/jira/browse/YARN-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14621947#comment-14621947
]
Devaraj K commented on YARN-3857:
---------------------------------
Thanks [~mujunchao] for updated patch with test.
Please take care of these comments also along with the [~zxu] comments fix.
1.I don't think adding this new method is required. Can we just use the
ClientToAMTokenSecretManagerInRM#getMasterKey() to know whether the master key
present or not?
{code:xml}
+
+ @VisibleForTesting
+ public synchronized boolean hasMasterKey(
+ ApplicationAttemptId applicationAttemptID) {
+ return this.masterKeys.containsKey(applicationAttemptID);
+ }
{code}
2. I see there are some format issues in the patch w.r.t braces and indentation
with spaces. Please go through the 'Making Changes' section in
https://wiki.apache.org/hadoop/HowToContribute and configure your IDE
according. It will be one time job and you don't have to worry next time for
creating patches.
{code:xml}
+ if(isSecurityEnabled)
+ {
{code}
{code:xml}
+ }
+ else
+ {
{code}
4. Remove unused imports in RMAppAttemptImpl.java.
> 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
> Assignee: mujunchao
> Priority: Critical
> Attachments: YARN-3857-1.patch, YARN-3857-2.patch,
> 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
(v6.3.4#6332)