You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by in...@apache.org on 2020/02/27 20:53:35 UTC
[hadoop] branch trunk updated: YARN-10155.
TestDelegationTokenRenewer.testTokenThreadTimeout fails in trunk.
Contributed by Manikandan R.
This is an automated email from the ASF dual-hosted git repository.
inigoiri pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new b420dde YARN-10155. TestDelegationTokenRenewer.testTokenThreadTimeout fails in trunk. Contributed by Manikandan R.
b420dde is described below
commit b420ddeada5300e22b8e3ad6c9ccd1549dc797c2
Author: Inigo Goiri <in...@apache.org>
AuthorDate: Thu Feb 27 12:53:20 2020 -0800
YARN-10155. TestDelegationTokenRenewer.testTokenThreadTimeout fails in trunk. Contributed by Manikandan R.
---
.../security/TestDelegationTokenRenewer.java | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestDelegationTokenRenewer.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestDelegationTokenRenewer.java
index c509470..31a87cb 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestDelegationTokenRenewer.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestDelegationTokenRenewer.java
@@ -220,6 +220,7 @@ public class TestDelegationTokenRenewer {
UserGroupInformation.setConfiguration(conf);
eventQueue = new LinkedBlockingQueue<Event>();
dispatcher = new AsyncDispatcher(eventQueue);
+ dispatcher.init(conf);
Renewer.reset();
delegationTokenRenewer = createNewDelegationTokenRenewer(conf, counter);
RMContext mockContext = mock(RMContext.class);
@@ -241,6 +242,11 @@ public class TestDelegationTokenRenewer {
@After
public void tearDown() {
+ try {
+ dispatcher.close();
+ } catch (IOException e) {
+ LOG.debug("Unable to close the dispatcher. " + e);
+ }
delegationTokenRenewer.stop();
}
@@ -1711,10 +1717,10 @@ public class TestDelegationTokenRenewer {
"kerberos");
yarnConf.set(YarnConfiguration.RM_STORE,
MemoryRMStateStore.class.getName());
- yarnConf.setTimeDuration(YarnConfiguration.RM_DT_RENEWER_THREAD_TIMEOUT, 5,
+ yarnConf.setTimeDuration(YarnConfiguration.RM_DT_RENEWER_THREAD_TIMEOUT, 3,
TimeUnit.SECONDS);
yarnConf.setTimeDuration(
- YarnConfiguration.RM_DT_RENEWER_THREAD_RETRY_INTERVAL, 5,
+ YarnConfiguration.RM_DT_RENEWER_THREAD_RETRY_INTERVAL, 3,
TimeUnit.SECONDS);
yarnConf.setInt(YarnConfiguration.RM_DT_RENEWER_THREAD_RETRY_MAX_ATTEMPTS,
3);
@@ -1786,11 +1792,11 @@ public class TestDelegationTokenRenewer {
throws IOException {
try {
if (renewDelay.get()) {
- // Delay for 4 times than the configured timeout
+ // Delay for 2 times than the configured timeout
Thread.sleep(config.getTimeDuration(
YarnConfiguration.RM_DT_RENEWER_THREAD_TIMEOUT,
YarnConfiguration.DEFAULT_RM_DT_RENEWER_THREAD_TIMEOUT,
- TimeUnit.MILLISECONDS) * 4);
+ TimeUnit.MILLISECONDS) * 2);
}
super.renewToken(dttr);
} catch (InterruptedException e) {
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org