Skip to content

Commit de9f778

Browse files
amahusseinjbrennan333
authored andcommitted
YARN-10485. TimelineConnector swallows InterruptedException (#2450). Contributed by Ahmed Hussein
(cherry picked from commit 0b2510e)
1 parent a86c91b commit de9f778

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
<scope>provided</scope>
4242
</dependency>
4343

44-
4544
<!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
4645
<dependency>
4746
<groupId>org.apache.hadoop</groupId>

hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/client/api/impl/TimelineConnector.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
package org.apache.hadoop.yarn.client.api.impl;
2020

2121
import java.io.IOException;
22+
import java.io.InterruptedIOException;
2223
import java.lang.reflect.UndeclaredThrowableException;
2324
import java.net.ConnectException;
2425
import java.net.HttpURLConnection;
@@ -351,7 +352,8 @@ public Object retryOn(TimelineClientRetryOp op)
351352
// sleep for the given time interval
352353
Thread.sleep(retryInterval);
353354
} catch (InterruptedException ie) {
354-
LOG.warn("Client retry sleep interrupted! ");
355+
Thread.currentThread().interrupt();
356+
throw new InterruptedIOException("Client retry sleep interrupted!");
355357
}
356358
}
357359
throw new RuntimeException("Failed to connect to timeline server. "

0 commit comments

Comments
 (0)