HDFS-15555. RBF: Refresh cacheNS when SocketException occurs. (#2267)

(cherry picked from commit c78d18023d)
This commit is contained in:
Akira Ajisaka 2020-09-14 11:34:52 +09:00
parent 1195dac55e
commit 0731c8b5d0
No known key found for this signature in database
GPG Key ID: C1EDBB9CA400FD50
1 changed files with 3 additions and 2 deletions

View File

@ -29,6 +29,7 @@ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.ConnectException;
import java.net.InetSocketAddress;
import java.net.SocketException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@ -582,9 +583,9 @@ public class RouterRpcClient {
* @return If the exception comes from an unavailable subcluster.
*/
public static boolean isUnavailableException(IOException ioe) {
if (ioe instanceof ConnectException ||
ioe instanceof ConnectTimeoutException ||
if (ioe instanceof ConnectTimeoutException ||
ioe instanceof EOFException ||
ioe instanceof SocketException ||
ioe instanceof StandbyException) {
return true;
}