DomGarguilo commented on a change in pull request #2240:
URL: https://github.com/apache/accumulo/pull/2240#discussion_r696637182
##########
File path:
test/src/main/java/org/apache/accumulo/test/functional/CompactionIT.java
##########
@@ -159,6 +165,80 @@ public void testBadSelector() throws Exception {
}
}
+ @Test
+ public void testDeleteTableAbortsCompaction() throws Exception {
+ try (AccumuloClient c =
Accumulo.newClient().from(getClientProps()).build()) {
+ final String tableName = getUniqueNames(1)[0];
+ NewTableConfiguration ntc = new NewTableConfiguration()
+ .setProperties(Map.of(Property.TABLE_MAJC_RATIO.getKey(), "5.0"));
+ c.tableOperations().create(tableName, ntc);
+ FileSystem fs = getFileSystem();
+ Path root = new Path(cluster.getTemporaryPath(), getClass().getName());
+ fs.deleteOnExit(root);
+ Path testrf = new Path(root, "testrf");
+ fs.deleteOnExit(testrf);
+ FunctionalTestUtils.createRFiles(c, fs, testrf.toString(), 500000, 59,
4);
+
c.tableOperations().importDirectory(testrf.toString()).to(tableName).load();
+ int beforeCount = countFiles(c);
+
+ final AtomicBoolean fail = new AtomicBoolean(false);
+ final int THREADS = 5;
+ for (int count = 0; count < THREADS; count++) {
+ ExecutorService executor = Executors.newFixedThreadPool(THREADS);
+ final int span = 500000 / 59;
+ for (int i = 0; i < 500000; i += 500000 / 59) {
Review comment:
```suggestion
final int rowCount = 500000;
final int splitCount = 59;
FunctionalTestUtils.createRFiles(c, fs, testrf.toString(), rowCount,
splitCount, 4);
c.tableOperations().importDirectory(testrf.toString()).to(tableName).load();
int beforeCount = countFiles(c);
final AtomicBoolean fail = new AtomicBoolean(false);
final int THREADS = 5;
for (int count = 0; count < THREADS; count++) {
ExecutorService executor = Executors.newFixedThreadPool(THREADS);
final int span = rowCount / splitCount;
for (int i = 0; i < rowCount; i += span) {
```
This might help make this test a bit more understandable.
--
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]