accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [2/6] git commit: ACCUMULO-2344 Avoid usage of UtilWaitThread because we want to exit gracefully on interrupt.
Date Sun, 09 Feb 2014 23:06:09 GMT
ACCUMULO-2344 Avoid usage of UtilWaitThread because we want to exit gracefully on interrupt.


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

Branch: refs/heads/1.6.0-SNAPSHOT
Commit: 4cb92ca616fb2aeaa80b0c5b7d004b6e8b39aa6d
Parents: d4b0699
Author: Josh Elser <elserj@apache.org>
Authored: Sun Feb 9 17:52:16 2014 -0500
Committer: Josh Elser <elserj@apache.org>
Committed: Sun Feb 9 17:52:16 2014 -0500

----------------------------------------------------------------------
 .../core/client/impl/TabletServerBatchReaderIterator.java   | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/4cb92ca6/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
index 2ecf3b7..200f38d 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/impl/TabletServerBatchReaderIterator.java
@@ -307,7 +307,14 @@ public class TabletServerBatchReaderIterator implements Iterator<Entry<Key,Value
     if (log.isTraceEnabled())
       log.trace("Failed to execute multiscans against " + failures.size() + " tablets, retrying...");
     
-    UtilWaitThread.sleep(failSleepTime);
+    try {
+      Thread.sleep(failSleepTime);
+    } catch (InterruptedException e) {
+      // We were interrupted (close called on batchscanner) just exit
+      log.debug("Exiting failure processing on interrupt");
+      return;
+    }
+    
     failSleepTime = Math.min(5000, failSleepTime * 2);
     
     Map<String,Map<KeyExtent,List<Range>>> binnedRanges = new HashMap<String,Map<KeyExtent,List<Range>>>();


Mime
View raw message