accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1502587 - /accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
Date Fri, 12 Jul 2013 15:29:44 GMT
Author: ecn
Date: Fri Jul 12 15:29:44 2013
New Revision: 1502587

URL: http://svn.apache.org/r1502587
Log:
ACCUMULO-1567 ignore recently split tablets when complaining about overlapping assignments

Modified:
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java?rev=1502587&r1=1502586&r2=1502587&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/tabletserver/TabletServer.java
Fri Jul 12 15:29:44 2013
@@ -228,6 +228,7 @@ public class TabletServer extends Abstra
   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 Abstra
             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