This is an automated email from the ASF dual-hosted git repository. dlmarion pushed a commit to branch 3.1 in repository https://gitbox.apache.org/repos/asf/accumulo.git
commit 0ad4d3e7b0876e9a5e9bb99304ab505004606501 Merge: e158859462 5715f06fc8 Author: Dave Marion <dlmar...@apache.org> AuthorDate: Thu Nov 14 13:29:44 2024 +0000 Merge branch '2.1' into 3.1 core/src/main/java/org/apache/accumulo/core/conf/Property.java | 6 ++++++ .../src/main/java/org/apache/accumulo/compactor/Compactor.java | 5 ++--- .../accumulo/test/compaction/ExternalCompactionTestUtils.java | 1 + .../apache/accumulo/test/compaction/ExternalCompaction_1_IT.java | 9 +++++++++ 4 files changed, 18 insertions(+), 3 deletions(-) diff --cc server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java index b45a1879c1,e03032326f..c93a8cb8ca --- a/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java +++ b/server/compactor/src/main/java/org/apache/accumulo/compactor/Compactor.java @@@ -18,13 -18,8 +18,12 @@@ */ package org.apache.accumulo.compactor; +import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly; import static java.nio.charset.StandardCharsets.UTF_8; - import static java.util.concurrent.TimeUnit.MINUTES; -import static org.apache.accumulo.core.util.UtilWaitThread.sleepUninterruptibly; +import static org.apache.accumulo.core.metrics.Metric.COMPACTOR_ENTRIES_READ; +import static org.apache.accumulo.core.metrics.Metric.COMPACTOR_ENTRIES_WRITTEN; +import static org.apache.accumulo.core.metrics.Metric.COMPACTOR_MAJC_STUCK; +import static org.apache.accumulo.core.util.LazySingletons.RANDOM; import java.io.IOException; import java.io.UncheckedIOException; @@@ -147,8 -140,19 +146,7 @@@ public class Compactor extends Abstract Duration getCompactionAge(); } - private static final SecureRandom random = new SecureRandom(); - - public static class CompactorServerOpts extends ServerOpts { - @Parameter(required = true, names = {"-q", "--queue"}, description = "compaction queue name") - private String queueName = null; - - public String getQueueName() { - return queueName; - } - } - private static final Logger LOG = LoggerFactory.getLogger(Compactor.class); - private static final long TIME_BETWEEN_CANCEL_CHECKS = MINUTES.toMillis(5); - private static final long TIME_BETWEEN_GC_CHECKS = 5000; private static final long TEN_MEGABYTES = 10485760; @@@ -690,7 -698,9 +688,8 @@@ var watcher = new CompactionWatcher(getConfiguration()); var schedExecutor = ThreadPools.getServerThreadPools() .createGeneralScheduledExecutorService(getConfiguration()); - startCancelChecker(schedExecutor, TIME_BETWEEN_CANCEL_CHECKS); - startGCLogger(schedExecutor); + startCancelChecker(schedExecutor, + getConfiguration().getTimeInMillis(Property.COMPACTOR_CANCEL_CHECK_INTERVAL)); LOG.info("Compactor started, waiting for work"); try {