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


##########
core/src/test/java/org/apache/accumulo/core/spi/compaction/RatioBasedCompactionPlannerTest.java:
##########
@@ -851,6 +852,43 @@ public void testMaxTableFilesFallback() {
     verify(senv);
   }
 
+  /**
+   * Ensures the planner does not drop, modify, or mix up ranges on input 
files.
+   */
+  @Test
+  public void testFilesWithRanges() throws Exception {
+    String prefix = "hdfs://fake/accumulo/tables/1/t-0000000z/";
+    var file1 =
+        CompactableFile.create(new URI(prefix + "F1.rf"), 
RowRange.openClosed("c", "m"), 1000, 1);
+    var file2 =
+        CompactableFile.create(new URI(prefix + "F1.rf"), 
RowRange.openClosed("o", "s"), 1001, 2);
+    var file3 =
+        CompactableFile.create(new URI(prefix + "F2.rf"), 
RowRange.openClosed("x", "y"), 1002, 3);
+    var file4 = CompactableFile.create(new URI(prefix + "F3.rf"), 1003, 4);
+    var file5 = CompactableFile.create(new URI(prefix + "F4.rf"), 
RowRange.openClosed("abc", "xyz"),
+        1000000, 5);
+
+    String groups = "[{'group':'small','maxSize':'32M'}, 
{'group':'medium','maxSize':'128M'},"
+        + "{'group':'large','maxSize':'512M'}, {'group':'huge'}]";
+
+    var systemConf = Map.of(prefix + "cs1.planner.opts.maxOpen", "15");

Review Comment:
   That was a really bad copy and paste bug, good find.  Fixed in 
84eb5618756c838a0349af365cca307b6950e0ef



-- 
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