Apache9 commented on code in PR #5629:
URL: https://github.com/apache/hbase/pull/5629#discussion_r1453499066


##########
hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/IPCUtil.java:
##########
@@ -159,8 +163,19 @@ static RemoteException createRemoteException(final 
ExceptionResponse e) {
   }
 
   /** Returns True if the exception is a fatal connection exception. */
-  static boolean isFatalConnectionException(final ExceptionResponse e) {
-    return 
e.getExceptionClassName().equals(FatalConnectionException.class.getName());
+  static boolean isFatalConnectionException(ExceptionResponse e) {
+    if 
(e.getExceptionClassName().equals(FatalConnectionException.class.getName())) {
+      return true;
+    }
+    // try our best to check for sub classes of FatalConnectionException
+    try {
+      return e.getExceptionClassName() != null && 
FatalConnectionException.class
+        .isAssignableFrom(Class.forName(e.getExceptionClassName()));

Review Comment:
   Seems worked. I also add a UT for the method.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to