diff --git a/core/src/main/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlanner.java b/core/src/main/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlanner.java
index ad512da8183..bf30ceb2ade 100644
--- a/core/src/main/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlanner.java
+++ b/core/src/main/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlanner.java
@@ -93,9 +93,10 @@
*
*
* {@code
- * [{"name":"small", "type": "internal", "maxSize":"100M","numThreads":3},
+ * [
+ * {"name":"small", "type": "internal", "maxSize":"100M","numThreads":3},
* {"name":"medium", "type": "internal", "maxSize":"500M","numThreads":3},
- * {"name: "large", "type": "external", "queue", "Queue1"}
+ * {"name": "large", "type": "external", "queue", "Queue1"}
* ]}
*
*
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/GarbageCollectorIT.java b/test/src/main/java/org/apache/accumulo/test/functional/GarbageCollectorIT.java
index 73fb6d56657..dc9fb341742 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/GarbageCollectorIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/GarbageCollectorIT.java
@@ -34,7 +34,6 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map.Entry;
-import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@@ -310,7 +309,6 @@ public void testRootUniqueMutationDelete() throws Exception {
killMacGc();
TableId tableId = DataLevel.METADATA.tableId();
log.info("Root GcCandidate Deletion test");
- // Behavior for 2.1. INUSE candidates deletion support will be added in 3.x
log.info("GcCandidates will be added but not removed from Zookeeper");
Ample ample = cluster.getServerContext().getAmple();
@@ -322,10 +320,20 @@ public void testRootUniqueMutationDelete() throws Exception {
ArrayList tempCandidates = new ArrayList<>();
while (cIter.hasNext()) {
GcCandidate cTemp = cIter.next();
- log.debug("PreExisting Candidate Found: {}", cTemp);
tempCandidates.add(cTemp);
}
- assertTrue(tempCandidates.size() == 0);
+ if (tempCandidates.size() != 0) {
+ ample.deleteGcCandidates(datalevel, tempCandidates, Ample.GcCandidateType.VALID);
+ tempCandidates.clear();
+
+ cIter = ample.getGcCandidates(datalevel);
+ while (cIter.hasNext()) {
+ GcCandidate cTemp = cIter.next();
+ log.debug("PreExisting Candidate Found: {}", cTemp);
+ tempCandidates.add(cTemp);
+ }
+ assertEquals(0, tempCandidates.size());
+ }
// Create multiple candidate entries
List candidates =
@@ -349,11 +357,11 @@ public void testRootUniqueMutationDelete() throws Exception {
counter++;
}
// Ensure Zookeeper collapsed the entries and did not support duplicates.
- assertTrue(counter == 2);
+ assertEquals(2, counter);
cIter = ample.getGcCandidates(datalevel);
while (cIter.hasNext()) {
- // This should be a noop call. Root inUse candidate deletions are not supported in 2.1.x
+ // This should be a noop call. Root inUse candidate deletions are not supported.
ample.deleteGcCandidates(datalevel, List.of(cIter.next()), Ample.GcCandidateType.INUSE);
}
@@ -367,13 +375,13 @@ public void testRootUniqueMutationDelete() throws Exception {
for (GcCandidate cand : candidates) {
if (gcC.getPath().equals(cand.getPath())) {
// Candidate uid's will never match as they are randomly generated in 2.1.x
- assertTrue(!Objects.equals(gcC.getUid(), cand.getUid()));
+ assertNotEquals(gcC.getUid(), cand.getUid());
counter--;
}
}
}
// Ensure that we haven't seen more candidates than we expected.
- assertTrue(counter == 0);
+ assertEquals(0, counter);
// Delete the candidates as VALID GcCandidates
cIter = ample.getGcCandidates(datalevel);
@@ -391,7 +399,7 @@ public void testRootUniqueMutationDelete() throws Exception {
counter++;
}
}
- assertEquals(counter, 0);
+ assertEquals(0, counter);
}
@Test
@@ -467,7 +475,7 @@ private void createAndDeleteUniqueMutation(TableId tableId, Ample.GcCandidateTyp
log.debug("PreExisting Candidate Found: {}", cTemp);
candidates.add(cTemp);
}
- assertTrue(candidates.size() == 0);
+ assertEquals(0, candidates.size());
// Create multiple candidate entries
List stfs = Stream
@@ -485,7 +493,7 @@ private void createAndDeleteUniqueMutation(TableId tableId, Ample.GcCandidateTyp
log.debug("Candidate Found: {}", cTemp);
candidates.add(cTemp);
}
- assertTrue(candidates.size() == 2);
+ assertEquals(2, candidates.size());
GcCandidate deleteCandidate = candidates.get(0);
assertNotNull(deleteCandidate);
@@ -503,12 +511,12 @@ private void createAndDeleteUniqueMutation(TableId tableId, Ample.GcCandidateTyp
GcCandidate gcC = candidate.next();
log.debug("Candidate Found: {}", gcC);
if (gcC.getPath().equals(deleteCandidate.getPath())) {
- assertTrue(!Objects.equals(gcC.getUid(), deleteCandidate.getUid()));
+ assertNotEquals(gcC.getUid(), deleteCandidate.getUid());
foundNewCandidate = true;
}
counter++;
}
- assertTrue(counter == 2);
+ assertEquals(2, counter);
assertTrue(foundNewCandidate);
}
}