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

Rohith commented on YARN-3472:
------------------------------

IIUC the test method 
{{TestDelegationTokenRenwer#testReplaceExpiringDelegationToken}} , there is 
already check for token1 from allTokens should be removed. Otherwise the 
waitFor method throw TimeoutException.
{code}
    // wait for the initial expiring hdfs token to be removed.
    GenericTestUtils.waitFor(new Supplier<Boolean>() {
      public Boolean get() {
        return !rm.getRMContext().getDelegationTokenRenewer()
          .getDelegationTokens().contains(token1);
      }
    }, 1000, 20000);
{code}
But I am surprised why the test were not failing earlier? Am I missing 
something? 

I was chekcing earlier jenkins result and observed that  jenkins has run only 
HDFS tests but not RM package tests eventhough RM package tests has changed. 

> Possible leak in DelegationTokenRenewer#allTokens 
> --------------------------------------------------
>
>                 Key: YARN-3472
>                 URL: https://issues.apache.org/jira/browse/YARN-3472
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Jian He
>            Assignee: Rohith
>         Attachments: 0001-YARN-3472.patch
>
>
> When old token is expiring and being removed, it's not removed from the 
> allTokens map, resulting in possible leak. 
> {code}
> if (t.token.getKind().equals(new Text("HDFS_DELEGATION_TOKEN"))) {
>               iter.remove();
>               t.cancelTimer();
>               LOG.info("Removed expiring token " + t);
>             }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to