Revert "HBASE-22699 refactor isMetaClearingException (#436)"
This reverts commit a0d5627a33
.
This commit is contained in:
parent
a0d5627a33
commit
bfe09e9640
|
@ -32,6 +32,7 @@ import java.util.concurrent.TimeoutException;
|
||||||
import org.apache.hadoop.hbase.CallDroppedException;
|
import org.apache.hadoop.hbase.CallDroppedException;
|
||||||
import org.apache.hadoop.hbase.CallQueueTooBigException;
|
import org.apache.hadoop.hbase.CallQueueTooBigException;
|
||||||
import org.apache.hadoop.hbase.DoNotRetryIOException;
|
import org.apache.hadoop.hbase.DoNotRetryIOException;
|
||||||
|
import org.apache.hadoop.hbase.MultiActionResultTooLarge;
|
||||||
import org.apache.hadoop.hbase.NotServingRegionException;
|
import org.apache.hadoop.hbase.NotServingRegionException;
|
||||||
import org.apache.hadoop.hbase.RegionTooBusyException;
|
import org.apache.hadoop.hbase.RegionTooBusyException;
|
||||||
import org.apache.hadoop.hbase.RetryImmediatelyException;
|
import org.apache.hadoop.hbase.RetryImmediatelyException;
|
||||||
|
@ -58,23 +59,18 @@ public final class ClientExceptionsUtil {
|
||||||
if (cur == null) {
|
if (cur == null) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return !regionDefinitelyOnTheRegionServerException(cur);
|
return !isSpecialException(cur) || (cur instanceof RegionMovedException)
|
||||||
|
|| cur instanceof NotServingRegionException;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean regionDefinitelyOnTheRegionServerException(Throwable t) {
|
public static boolean isSpecialException(Throwable cur) {
|
||||||
return (t instanceof RegionTooBusyException || t instanceof RpcThrottlingException
|
return (cur instanceof RegionMovedException || cur instanceof RegionOpeningException
|
||||||
|| t instanceof RetryImmediatelyException || t instanceof CallQueueTooBigException
|
|| cur instanceof RegionTooBusyException || cur instanceof RpcThrottlingException
|
||||||
|| t instanceof CallDroppedException || t instanceof NotServingRegionException
|
|| cur instanceof MultiActionResultTooLarge || cur instanceof RetryImmediatelyException
|
||||||
|| t instanceof RequestTooBigException);
|
|| cur instanceof CallQueueTooBigException || cur instanceof CallDroppedException
|
||||||
|
|| cur instanceof NotServingRegionException || cur instanceof RequestTooBigException);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This function is the alias of regionDefinitelyOnTheRegionServerException,
|
|
||||||
* whose name is confusing in the function findException().
|
|
||||||
*/
|
|
||||||
private static boolean matchExceptionWeCare(Throwable t) {
|
|
||||||
return regionDefinitelyOnTheRegionServerException(t);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Look for an exception we know in the remote exception:
|
* Look for an exception we know in the remote exception:
|
||||||
|
@ -91,7 +87,7 @@ public final class ClientExceptionsUtil {
|
||||||
}
|
}
|
||||||
Throwable cur = (Throwable) exception;
|
Throwable cur = (Throwable) exception;
|
||||||
while (cur != null) {
|
while (cur != null) {
|
||||||
if (matchExceptionWeCare(cur)) {
|
if (isSpecialException(cur)) {
|
||||||
return cur;
|
return cur;
|
||||||
}
|
}
|
||||||
if (cur instanceof RemoteException) {
|
if (cur instanceof RemoteException) {
|
||||||
|
|
Loading…
Reference in New Issue