YARN-3472. Fixed possible leak in DelegationTokenRenewer#allTokens. Contributed by Rohith Sharmaks
(cherry picked from commit a1afbc48b5
)
This commit is contained in:
parent
6cc0e9baa1
commit
5cf35b98e1
|
@ -32,6 +32,9 @@ Release 2.7.1 - UNRELEASED
|
|||
YARN-3382. Some of UserMetricsInfo metrics are incorrectly set to root
|
||||
queue metrics. (Rohit Agarwal via jianhe)
|
||||
|
||||
YARN-3472. Fixed possible leak in DelegationTokenRenewer#allTokens.
|
||||
(Rohith Sharmaks via jianhe)
|
||||
|
||||
Release 2.7.0 - 2015-04-20
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -577,6 +577,7 @@ public class DelegationTokenRenewer extends AbstractService {
|
|||
DelegationTokenToRenew t = iter.next();
|
||||
if (t.token.getKind().equals(new Text("HDFS_DELEGATION_TOKEN"))) {
|
||||
iter.remove();
|
||||
allTokens.remove(t.token);
|
||||
t.cancelTimer();
|
||||
LOG.info("Removed expiring token " + t);
|
||||
}
|
||||
|
|
|
@ -906,7 +906,16 @@ public class TestDelegationTokenRenewer {
|
|||
new HashMap<ApplicationAccessType, String>(), false, "default", 1,
|
||||
credentials);
|
||||
|
||||
// wait for the initial expiring hdfs token to be removed.
|
||||
// wait for the initial expiring hdfs token to be removed from allTokens
|
||||
GenericTestUtils.waitFor(new Supplier<Boolean>() {
|
||||
public Boolean get() {
|
||||
return
|
||||
rm.getRMContext().getDelegationTokenRenewer().getAllTokens()
|
||||
.get(token1) == null;
|
||||
}
|
||||
}, 1000, 20000);
|
||||
|
||||
// wait for the initial expiring hdfs token to be removed from appTokens
|
||||
GenericTestUtils.waitFor(new Supplier<Boolean>() {
|
||||
public Boolean get() {
|
||||
return !rm.getRMContext().getDelegationTokenRenewer()
|
||||
|
|
Loading…
Reference in New Issue