YARN-10485. TimelineConnector swallows InterruptedException (#2450). Contributed by Ahmed Hussein
(cherry picked from commit 0b2510ee1f
)
This commit is contained in:
parent
c5ae78b793
commit
c107e75424
|
@ -45,7 +45,6 @@
|
||||||
<artifactId>hadoop-hdfs-client</artifactId>
|
<artifactId>hadoop-hdfs-client</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
<!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
|
<!-- 'mvn dependency:analyze' fails to detect use of this dependency -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.hadoop</groupId>
|
<groupId>org.apache.hadoop</groupId>
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
package org.apache.hadoop.yarn.client.api.impl;
|
package org.apache.hadoop.yarn.client.api.impl;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.InterruptedIOException;
|
||||||
import java.lang.reflect.UndeclaredThrowableException;
|
import java.lang.reflect.UndeclaredThrowableException;
|
||||||
import java.net.ConnectException;
|
import java.net.ConnectException;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
|
@ -351,7 +352,8 @@ public class TimelineConnector extends AbstractService {
|
||||||
// sleep for the given time interval
|
// sleep for the given time interval
|
||||||
Thread.sleep(retryInterval);
|
Thread.sleep(retryInterval);
|
||||||
} catch (InterruptedException ie) {
|
} 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. "
|
throw new RuntimeException("Failed to connect to timeline server. "
|
||||||
|
|
Loading…
Reference in New Issue