From 173f343aea56285f1d83ea3346a797113c02c12e Mon Sep 17 00:00:00 2001 From: "terence.yoo" Date: Thu, 9 Jul 2015 13:43:37 +0900 Subject: [PATCH] HBASE-14041 Do not clear MetaCache if a ThrottlingException is thrown Amending-Author: Sean Busbey Signed-off-by: Sean Busbey Conflicts: hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionImplementation.java --- .../apache/hadoop/hbase/client/ConnectionManager.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java index 26c6a7e8677..e51f80342f8 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/ConnectionManager.java @@ -171,6 +171,7 @@ import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.TruncateTableRequ import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.TruncateTableResponse; import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.UnassignRegionRequest; import org.apache.hadoop.hbase.protobuf.generated.MasterProtos.UnassignRegionResponse; +import org.apache.hadoop.hbase.quotas.ThrottlingException; import org.apache.hadoop.hbase.regionserver.RegionServerStoppedException; import org.apache.hadoop.hbase.security.User; import org.apache.hadoop.hbase.security.UserProvider; @@ -2143,7 +2144,8 @@ class ConnectionManager { HRegionInfo regionInfo = oldLocation.getRegionInfo(); Throwable cause = findException(exception); if (cause != null) { - if (cause instanceof RegionTooBusyException || cause instanceof RegionOpeningException) { + if (cause instanceof RegionTooBusyException || cause instanceof RegionOpeningException + || cause instanceof ThrottlingException) { // We know that the region is still on this region server return; } @@ -2627,7 +2629,8 @@ class ConnectionManager { * - hadoop.ipc wrapped exceptions * - nested exceptions * - * Looks for: RegionMovedException / RegionOpeningException / RegionTooBusyException + * Looks for: RegionMovedException / RegionOpeningException / RegionTooBusyException / + * ThrottlingException * @return null if we didn't find the exception, the exception otherwise. */ public static Throwable findException(Object exception) { @@ -2637,7 +2640,7 @@ class ConnectionManager { Throwable cur = (Throwable) exception; while (cur != null) { if (cur instanceof RegionMovedException || cur instanceof RegionOpeningException - || cur instanceof RegionTooBusyException) { + || cur instanceof RegionTooBusyException || cur instanceof ThrottlingException) { return cur; } if (cur instanceof RemoteException) {