accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [40/50] [abbrv] git commit: ACCUMULO-1567 ignore recently split tablets when complaining about overlapping assignments
Date Wed, 17 Jul 2013 02:33:42 GMT
ACCUMULO-1567 ignore recently split tablets when complaining about overlapping assignments

git-svn-id: https://svn.apache.org/repos/asf/accumulo/trunk@1502587 13f79535-47bb-0310-9956-ffa450edef68


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

Branch: refs/heads/ACCUMULO-1496
Commit: 37d2fdb7590ea7e9be220c5d0544f367107ca4eb
Parents: a904c3a
Author: Eric C. Newton <ecn@apache.org>
Authored: Fri Jul 12 15:29:44 2013 +0000
Committer: Eric C. Newton <ecn@apache.org>
Committed: Fri Jul 12 15:29:44 2013 +0000

----------------------------------------------------------------------
 .../accumulo/server/tabletserver/TabletServer.java       | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/37d2fdb7/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
----------------------------------------------------------------------
diff --git a/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
b/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
index 52548bf..9d50f07 100644
--- a/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
+++ b/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
@@ -228,6 +228,7 @@ public class TabletServer extends AbstractMetricsImpl implements org.apache.accu
   private static long gcTimeIncreasedCount;
   
   private static final long MAX_TIME_TO_WAIT_FOR_SCAN_RESULT_MILLIS = 1000;
+  private static final long RECENTLY_SPLIT_MILLIES = 60*1000;
   
   private TabletServerLogger logger;
   
@@ -1833,6 +1834,16 @@ public class TabletServer extends AbstractMetricsImpl implements org.apache.accu
             Set<KeyExtent> unopenedOverlapping = KeyExtent.findOverlapping(extent,
unopenedTablets);
             Set<KeyExtent> openingOverlapping = KeyExtent.findOverlapping(extent, openingTablets);
             Set<KeyExtent> onlineOverlapping = KeyExtent.findOverlapping(extent, onlineTablets);
+            
+            // ignore any tablets that have recently split
+            Iterator<KeyExtent> each = onlineOverlapping.iterator();
+            while (each.hasNext()) {
+              Tablet tablet = onlineTablets.get(each.next());
+              if (System.currentTimeMillis() - tablet.getSplitCreationTime() < RECENTLY_SPLIT_MILLIES)
{
+                each.remove();
+              }
+            }
+            
             Set<KeyExtent> all = new HashSet<KeyExtent>();
             all.addAll(unopenedOverlapping);
             all.addAll(openingOverlapping);


Mime
View raw message