keith-turner commented on code in PR #3932:
URL: https://github.com/apache/accumulo/pull/3932#discussion_r1384009809
##########
test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompaction_1_IT.java:
##########
@@ -450,6 +454,52 @@ public void testExternalCompactionDeadTServer() throws
Exception {
}
}
+ @Test
+ public void testExternalCompactionWithFencedFiles() throws Exception {
+ String[] names = this.getUniqueNames(2);
+ try (AccumuloClient client =
+ Accumulo.newClient().from(getCluster().getClientProperties()).build())
{
+
+ String table1 = names[0];
+ createTable(client, table1, "cs1");
+
+ String table2 = names[1];
+ createTable(client, table2, "cs2");
+
+ writeData(client, table1);
+ writeData(client, table2);
+
+ // Split file in table1 into two files each fenced off by 100 rows for a
total of 200
+ splitFilesIntoRanges(getCluster().getServerContext(), table1,
+ Set.of(new Range(new Text(row(100)), new Text(row(199))),
+ new Range(new Text(row(300)), new Text(row(399)))));
+ assertEquals(2, countFencedFiles(getCluster().getServerContext(),
table1));
+
+ // Fence file in table2 to 600 rows
+ splitFilesIntoRanges(getCluster().getServerContext(), table2,
+ Set.of(new Range(new Text(row(200)), new Text(row(799)))));
+ assertEquals(1, countFencedFiles(getCluster().getServerContext(),
table2));
+
Review Comment:
Should see less rows in the tablet at this point after the fencing and prior
to compaction.
```suggestion
verify(client, table1, 1, 200);
verify(client, table2, 1, 600);
```
##########
test/src/main/java/org/apache/accumulo/test/compaction/ExternalCompaction_1_IT.java:
##########
@@ -450,6 +454,52 @@ public void testExternalCompactionDeadTServer() throws
Exception {
}
}
+ @Test
+ public void testExternalCompactionWithFencedFiles() throws Exception {
+ String[] names = this.getUniqueNames(2);
+ try (AccumuloClient client =
+ Accumulo.newClient().from(getCluster().getClientProperties()).build())
{
+
+ String table1 = names[0];
+ createTable(client, table1, "cs1");
+
+ String table2 = names[1];
+ createTable(client, table2, "cs2");
+
+ writeData(client, table1);
+ writeData(client, table2);
+
Review Comment:
After writing data, could verify the table is as expected before fencing.
```suggestion
verify(client, table1, 1, MAX_DATA);
verify(client, table2, 1, MAX_DATA);
```
--
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]