johnhomsea commented on a change in pull request #501: HBASE-22699 refactor 
isMetaClearingException
URL: https://github.com/apache/hbase/pull/501#discussion_r318956224
 
 

 ##########
 File path: 
hbase-client/src/main/java/org/apache/hadoop/hbase/exceptions/ClientExceptionsUtil.java
 ##########
 @@ -59,18 +58,23 @@ public static boolean isMetaClearingException(Throwable 
cur) {
     if (cur == null) {
       return true;
     }
-    return !isSpecialException(cur) || (cur instanceof RegionMovedException)
-        || cur instanceof NotServingRegionException;
+    return !regionLocationIsConsistentWithServerException(cur);
   }
 
-  public static boolean isSpecialException(Throwable cur) {
-    return (cur instanceof RegionMovedException || cur instanceof 
RegionOpeningException
-        || cur instanceof RegionTooBusyException || cur instanceof 
RpcThrottlingException
-        || cur instanceof MultiActionResultTooLarge || cur instanceof 
RetryImmediatelyException
-        || cur instanceof CallQueueTooBigException || cur instanceof 
CallDroppedException
-        || cur instanceof NotServingRegionException || cur instanceof 
RequestTooBigException);
+  public static boolean regionServerIsOverloadException(Throwable t) {
+    return t instanceof CallQueueTooBigException || t instanceof 
CallDroppedException;
   }
 
+  private static boolean 
regionLocationIsConsistentWithServerException(Throwable t) {
+    return t instanceof RegionOpeningException || t instanceof 
RegionTooBusyException
+        || t instanceof RpcThrottlingException || t instanceof 
RetryImmediatelyException
+        || t instanceof RequestTooBigException;
+  }
+
+  private static boolean matchExceptionWeCare(Throwable t) {
 
 Review comment:
   This function is called in client side, and the purpose of it is that if the 
return value of the function is true, so we are sure about how to deal with 
meta cache. The function name findException is too general and make it 
confusing to name a detailed function inside it.I tried many times and cannot 
find a suitable one.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to