accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1467350 - in /accumulo/branches/1.5: server/src/main/java/org/apache/accumulo/server/master/state/MergeStats.java test/src/test/java/org/apache/accumulo/test/MetaSplitTest.java
Date Fri, 12 Apr 2013 16:49:12 GMT
Author: ecn
Date: Fri Apr 12 16:49:12 2013
New Revision: 1467350

URL: http://svn.apache.org/r1467350
Log:
ACCUMULO-1264 fix edge case when looking at the root tablet

Modified:
    accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/state/MergeStats.java
    accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/MetaSplitTest.java

Modified: accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/state/MergeStats.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/state/MergeStats.java?rev=1467350&r1=1467349&r2=1467350&view=diff
==============================================================================
--- accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/state/MergeStats.java
(original)
+++ accumulo/branches/1.5/server/src/main/java/org/apache/accumulo/server/master/state/MergeStats.java
Fri Apr 12 16:49:12 2013
@@ -64,6 +64,8 @@ public class MergeStats {
   }
 
   public void update(KeyExtent ke, TabletState state, boolean chopped, boolean hasWALs) {
+    if (ke.isRootTablet())
+      return;
     if (info.getState().equals(MergeState.NONE))
       return;
     if (!upperSplit && info.getRange().getEndRow().equals(ke.getPrevEndRow())) {
@@ -105,11 +107,6 @@ public class MergeStats {
       log.info("failed to see any tablets for this range, ignoring " + info.getRange());
       return state;
     }
-    if (total == 1 && info.getRange().isMeta()) {
-      // root tablet watcher trying to merge metadata tablets it won't even scan
-      log.debug("ignoring merge of " + info.getRange());
-      return state;
-    }
     if (state == MergeState.SPLITTING) {
       log.info(hosted + " are hosted, total " + total);
       if (!info.isDelete() && total == 1) {

Modified: accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/MetaSplitTest.java
URL: http://svn.apache.org/viewvc/accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/MetaSplitTest.java?rev=1467350&r1=1467349&r2=1467350&view=diff
==============================================================================
--- accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/MetaSplitTest.java (original)
+++ accumulo/branches/1.5/test/src/test/java/org/apache/accumulo/test/MetaSplitTest.java Fri
Apr 12 16:49:12 2013
@@ -63,7 +63,7 @@ public class MetaSplitTest {
     opts.addSplits(Constants.METADATA_TABLE_NAME, splits);
   }
   
-  @Test(timeout = 60000)
+  @Test(timeout = 30000)
   public void testMetaSplit() throws Exception {
     Instance instance = new ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
     Connector connector = instance.getConnector("root", new PasswordToken(secret));
@@ -71,6 +71,7 @@ public class MetaSplitTest {
     for (int i = 1; i <= 10; i++) {
       opts.create("" + i);
     }
+    opts.merge(Constants.METADATA_TABLE_NAME, new Text("01"), new Text("02"));
     assertEquals(2, opts.listSplits(Constants.METADATA_TABLE_NAME).size());
     addSplits(opts, "4 5 6 7 8".split(" "));
     assertEquals(7, opts.listSplits(Constants.METADATA_TABLE_NAME).size());



Mime
View raw message