Explorar el Código

YARN-6294. ATS client should better handle Socket closed case. Contributed by Li Lu.

Junping Du hace 8 años
padre
commit
221783b35b

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

@@ -22,6 +22,7 @@ import java.io.IOException;
 import java.lang.reflect.UndeclaredThrowableException;
 import java.net.ConnectException;
 import java.net.HttpURLConnection;
+import java.net.SocketException;
 import java.net.SocketTimeoutException;
 import java.net.URI;
 import java.net.URL;
@@ -390,7 +391,8 @@ public class TimelineConnector extends AbstractService {
           // Only retry on connection exceptions
           return (e instanceof ClientHandlerException)
               && (e.getCause() instanceof ConnectException
-                  || e.getCause() instanceof SocketTimeoutException);
+                  || e.getCause() instanceof SocketTimeoutException
+                  || e.getCause() instanceof SocketException);
         }
       };
       try {