accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [2/3] git commit: ACCUMULO-3194 Wait for more splits to happen before doing the verification and checking file distribution
Date Thu, 02 Oct 2014 21:11:44 GMT
ACCUMULO-3194 Wait for more splits to happen before doing the verification and checking file
distribution

If we only wait for 50 splits, we could get into a state where a tablet needs to split,
but hasn't yet done so, and thus would not fall within the expected number of files.


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

Branch: refs/heads/master
Commit: 65acebbf94a6de9ed39e544da5d20df4695b5f49
Parents: 3c90ee9
Author: Josh Elser <elserj@apache.org>
Authored: Thu Oct 2 17:07:36 2014 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Thu Oct 2 17:07:36 2014 -0400

----------------------------------------------------------------------
 .../test/functional/BulkSplitOptimizationIT.java         | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/65acebbf/test/src/test/java/org/apache/accumulo/test/functional/BulkSplitOptimizationIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/BulkSplitOptimizationIT.java
b/test/src/test/java/org/apache/accumulo/test/functional/BulkSplitOptimizationIT.java
index 6714ff8..492e36f 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/BulkSplitOptimizationIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/BulkSplitOptimizationIT.java
@@ -34,9 +34,6 @@ import org.junit.rules.TemporaryFolder;
 
 /**
  * This test verifies that when a lot of files are bulk imported into a table with one tablet
and then splits that not all map files go to the children tablets.
- * 
- * 
- * 
  */
 
 public class BulkSplitOptimizationIT extends ConfigurableMacIT {
@@ -69,6 +66,8 @@ public class BulkSplitOptimizationIT extends ConfigurableMacIT {
 
     FileSystem fs = FileSystem.get(CachedConfiguration.getInstance());
     FunctionalTestUtils.createRFiles(c, fs, folder.getRoot() + "/testmf", ROWS, SPLITS, 8);
+    File input = new File(folder.getRoot() + "/testmf");
+    System.out.println("Number of generated files: " + input.listFiles().length);
     FunctionalTestUtils.bulkImport(c, fs, TABLE_NAME, folder.getRoot() + "/testmf");
     FunctionalTestUtils.checkSplits(c, TABLE_NAME, 0, 0);
     FunctionalTestUtils.checkRFiles(c, TABLE_NAME, 1, 1, 100, 100);
@@ -78,8 +77,8 @@ public class BulkSplitOptimizationIT extends ConfigurableMacIT {
 
     UtilWaitThread.sleep(2000);
 
-    // wait until over split threshold
-    while (getConnector().tableOperations().listSplits(TABLE_NAME).size() < 50) {
+    // wait until over split threshold -- should be 78 splits
+    while (getConnector().tableOperations().listSplits(TABLE_NAME).size() < 75) {
       UtilWaitThread.sleep(500);
     }
 
@@ -94,7 +93,7 @@ public class BulkSplitOptimizationIT extends ConfigurableMacIT {
     opts.password = new Password(ROOT_PASSWORD);
     VerifyIngest.verifyIngest(c, opts, SOPTS);
 
-    // ensure each tablet does not have all map files
+    // ensure each tablet does not have all map files, should be ~2.5 files per tablet
     FunctionalTestUtils.checkRFiles(c, TABLE_NAME, 50, 100, 1, 4);
   }
 


Mime
View raw message