accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [4/5] git commit: ACCUMULO-3276 Add warning message after the 5th failure and every 50 times we fail to get the location for a tablet
Date Thu, 30 Oct 2014 03:25:24 GMT
ACCUMULO-3276 Add warning message after the 5th failure and every 50 times we fail to get the
location for a tablet

If there is a misbehaving tabletserver who is incorrectly reporting
something about a tablet not being hosted, warn the client about it.
Print a message after the 5th time a lookup for a tablet fails and
every 50th retry (since it retries indefinitely).


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/1aa4784a
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/1aa4784a
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/1aa4784a

Branch: refs/heads/1.6
Commit: 1aa4784a9851cba83dd0e6b3e14786f516fbf166
Parents: 54d09bb
Author: Josh Elser <elserj@apache.org>
Authored: Wed Oct 29 23:10:47 2014 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Wed Oct 29 23:13:31 2014 -0400

----------------------------------------------------------------------
 .../accumulo/core/client/impl/TableOperationsImpl.java       | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/1aa4784a/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
b/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
index 2792bcc..103cfe8 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/TableOperationsImpl.java
@@ -460,6 +460,7 @@ public class TableOperationsImpl extends TableOperationsHelper {
     for (Text split : partitionKeys) {
       boolean successful = false;
       int attempt = 0;
+      long locationFailures = 0;
 
       while (!successful) {
 
@@ -507,6 +508,13 @@ public class TableOperationsImpl extends TableOperationsHelper {
             throw new TableNotFoundException(tableId, tableName, null);
           throw new AccumuloSecurityException(e.user, e.code, e);
         } catch (NotServingTabletException e) {
+          // Do not silently spin when we repeatedly fail to get the location for a tablet
+          locationFailures++;
+          if (5 == locationFailures || 0 == locationFailures % 50) {
+            log.warn("Having difficulty locating hosting tabletserver for split " + split
+ " on table " + tableName + ". Seen " + locationFailures
+                + " failures.");
+          }
+
           tabLocator.invalidateCache(tl.tablet_extent);
           continue;
         } catch (TException e) {


Mime
View raw message