This is an automated email from the ASF dual-hosted git repository. kturner pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push: new 61e81c43d8 falls back to deprecated compaction prop (#4451) 61e81c43d8 is described below commit 61e81c43d852be13f270d8e0638d6b4b9b4c5510 Author: Keith Turner <ktur...@apache.org> AuthorDate: Thu Apr 11 19:17:22 2024 -0400 falls back to deprecated compaction prop (#4451) --- .../org/apache/accumulo/server/compaction/CompactionWatcher.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/server/base/src/main/java/org/apache/accumulo/server/compaction/CompactionWatcher.java b/server/base/src/main/java/org/apache/accumulo/server/compaction/CompactionWatcher.java index 4790440ff6..ff90bd5880 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/compaction/CompactionWatcher.java +++ b/server/base/src/main/java/org/apache/accumulo/server/compaction/CompactionWatcher.java @@ -62,6 +62,12 @@ public class CompactionWatcher implements Runnable { this.config = config; } + @SuppressWarnings("deprecation") + private static long getCompactionWarnTime(AccumuloConfiguration config) { + return config.getTimeInMillis( + config.resolve(Property.COMPACTION_WARN_TIME, Property.TSERV_COMPACTION_WARN_TIME)); + } + @Override public void run() { List<CompactionInfo> runningCompactions = FileCompactor.getRunningCompactions(); @@ -98,7 +104,7 @@ public class CompactionWatcher implements Runnable { // remove any compaction that completed or made progress observedCompactions.keySet().retainAll(newKeys); - long warnTime = config.getTimeInMillis(Property.COMPACTION_WARN_TIME); + long warnTime = getCompactionWarnTime(config); // check for stuck compactions for (ObservedCompactionInfo oci : observedCompactions.values()) {