YARN-10485. TimelineConnector swallows InterruptedException (#2450). Contributed by Ahmed Hussein

This commit is contained in:
Ahmed Hussein 2020-11-16 14:55:40 -06:00 committed by GitHub
parent dd85a90da6
commit 0b2510ee1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -45,7 +45,6 @@
<artifactId>hadoop-hdfs-client</artifactId>
</dependency>
<!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
<dependency>
<groupId>org.apache.hadoop</groupId>

View File

@ -19,6 +19,7 @@
package org.apache.hadoop.yarn.client.api.impl;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.lang.reflect.UndeclaredThrowableException;
import java.net.ConnectException;
import java.net.HttpURLConnection;
@ -361,7 +362,8 @@ public Object retryOn(TimelineClientRetryOp op)
// sleep for the given time interval
Thread.sleep(retryInterval);
} catch (InterruptedException ie) {
LOG.warn("Client retry sleep interrupted! ");
Thread.currentThread().interrupt();
throw new InterruptedIOException("Client retry sleep interrupted!");
}
}
throw new RuntimeException("Failed to connect to timeline server. "