YARN-6294. ATS client should better handle Socket closed case. Contributed by Li Lu.
This commit is contained in:
parent
c0e061b410
commit
8b31ff6dba
|
@ -24,6 +24,7 @@ import java.lang.reflect.UndeclaredThrowableException;
|
||||||
import java.net.ConnectException;
|
import java.net.ConnectException;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
|
import java.net.SocketException;
|
||||||
import java.net.SocketTimeoutException;
|
import java.net.SocketTimeoutException;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
@ -243,7 +244,8 @@ public class TimelineClientImpl extends TimelineClient {
|
||||||
// Only retry on connection exceptions
|
// Only retry on connection exceptions
|
||||||
return (e instanceof ClientHandlerException)
|
return (e instanceof ClientHandlerException)
|
||||||
&& (e.getCause() instanceof ConnectException ||
|
&& (e.getCause() instanceof ConnectException ||
|
||||||
e.getCause() instanceof SocketTimeoutException);
|
e.getCause() instanceof SocketTimeoutException ||
|
||||||
|
e.getCause() instanceof SocketException);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue