keith-turner commented on code in PR #5044:
URL: https://github.com/apache/accumulo/pull/5044#discussion_r1834540157


##########
test/src/main/java/org/apache/accumulo/test/functional/BulkNewIT.java:
##########
@@ -829,6 +831,55 @@ public void testAvailability() throws Exception {
     }
   }
 
+  @Test
+  public void testManyTabletAndFiles() throws Exception {
+    try (AccumuloClient c = 
Accumulo.newClient().from(getClientProps()).build()) {
+      String dir = getDir("/testBulkFile-");
+      FileSystem fs = getCluster().getFileSystem();
+      fs.mkdirs(new Path(dir));
+
+      TreeSet<Text> splits = IntStream.range(1, 
9000).mapToObj(BulkNewIT::row).map(Text::new)
+          .collect(Collectors.toCollection(TreeSet::new));
+      c.tableOperations().addSplits(tableName, splits);
+
+      var executor = Executors.newFixedThreadPool(16);
+      var futures = new ArrayList<Future<?>>();
+
+      var loadPlanBuilder = LoadPlan.builder();
+      var rowsExpected = new HashSet<>();
+      for (int i = 2; i < 8999; i++) {
+        int data = i;
+        String filename = "f" + data + ".";
+        loadPlanBuilder.loadFileTo(filename + RFile.EXTENSION, 
RangeType.TABLE, row(data - 1),
+            row(data));
+        var future = executor.submit(() -> {
+          writeData(dir + "/" + filename, aconf, data, data);

Review Comment:
   > I wonder if it would be good to write them in reverse (8999 -> 2), or put 
the numbers in a set and randomize it.
   
   That would be a nice improvement to the test, I will make that update and 
will randomize the order.  It should work no matter what the order things are 
added.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to