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 34dcdd9702 reduce log level of spammy log messages (#5043) 34dcdd9702 is described below commit 34dcdd9702ca9c089a209844b9e9aefc4f347f58 Author: Keith Turner <ktur...@apache.org> AuthorDate: Fri Nov 8 10:23:32 2024 -0500 reduce log level of spammy log messages (#5043) --- core/src/main/java/org/apache/accumulo/core/util/Retry.java | 2 +- .../accumulo/server/compaction/CompactionJobGenerator.java | 2 +- .../apache/accumulo/server/conf/CheckCompactionConfig.java | 13 +++++++------ .../org/apache/accumulo/manager/TabletGroupWatcher.java | 2 +- .../compaction/coordinator/CompactionCoordinator.java | 2 +- .../apache/accumulo/manager/upgrade/UpgradeCoordinator.java | 3 ++- .../org/apache/accumulo/tserver/session/SessionManager.java | 2 +- 7 files changed, 14 insertions(+), 12 deletions(-) diff --git a/core/src/main/java/org/apache/accumulo/core/util/Retry.java b/core/src/main/java/org/apache/accumulo/core/util/Retry.java index 916537db3e..96f4452382 100644 --- a/core/src/main/java/org/apache/accumulo/core/util/Retry.java +++ b/core/src/main/java/org/apache/accumulo/core/util/Retry.java @@ -174,7 +174,7 @@ public class Retry { } currentBackOffFactor = currentBackOffFactor * backOffFactor; - log.debug("Sleeping for {}ms before retrying operation : {} ", currentWait.toMillis(), + log.trace("Sleeping for {}ms before retrying operation : {} ", currentWait.toMillis(), operationDescription); sleep(currentWait); diff --git a/server/base/src/main/java/org/apache/accumulo/server/compaction/CompactionJobGenerator.java b/server/base/src/main/java/org/apache/accumulo/server/compaction/CompactionJobGenerator.java index e9f61d4cb8..e8c870d683 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/compaction/CompactionJobGenerator.java +++ b/server/base/src/main/java/org/apache/accumulo/server/compaction/CompactionJobGenerator.java @@ -101,7 +101,7 @@ public class CompactionJobGenerator { public Collection<CompactionJob> generateJobs(TabletMetadata tablet, Set<CompactionKind> kinds) { Collection<CompactionJob> systemJobs = Set.of(); - log.debug("Planning for {} {} {}", tablet.getExtent(), kinds, this.hashCode()); + log.trace("Planning for {} {} {}", tablet.getExtent(), kinds, this.hashCode()); if (kinds.contains(CompactionKind.SYSTEM)) { CompactionServiceId serviceId = dispatch(CompactionKind.SYSTEM, tablet, Map.of()); diff --git a/server/base/src/main/java/org/apache/accumulo/server/conf/CheckCompactionConfig.java b/server/base/src/main/java/org/apache/accumulo/server/conf/CheckCompactionConfig.java index d9c4ebcc50..2f9d9ec7c2 100644 --- a/server/base/src/main/java/org/apache/accumulo/server/conf/CheckCompactionConfig.java +++ b/server/base/src/main/java/org/apache/accumulo/server/conf/CheckCompactionConfig.java @@ -42,6 +42,7 @@ import org.apache.accumulo.core.util.compaction.CompactionServicesConfig; import org.apache.accumulo.start.spi.KeywordExecutable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.slf4j.event.Level; import com.beust.jcommander.Parameter; import com.google.auto.service.AutoService; @@ -95,10 +96,10 @@ public class CheckCompactionConfig implements KeywordExecutable { } AccumuloConfiguration config = SiteConfiguration.fromFile(path.toFile()).build(); - validate(config); + validate(config, Level.INFO); } - public static void validate(AccumuloConfiguration config) + public static void validate(AccumuloConfiguration config, Level level) throws ReflectiveOperationException, SecurityException, IllegalArgumentException { var servicesConfig = new CompactionServicesConfig(config); ServiceEnvironment senv = createServiceEnvironment(config); @@ -113,8 +114,7 @@ public class CheckCompactionConfig implements KeywordExecutable { for (var entry : servicesConfig.getPlanners().entrySet()) { String serviceId = entry.getKey(); String plannerClassName = entry.getValue(); - - log.info("Service id: {}, planner class:{}", serviceId, plannerClassName); + log.atLevel(level).log("Service id: {}, planner class:{}", serviceId, plannerClassName); Class<? extends CompactionPlanner> plannerClass = Class.forName(plannerClassName).asSubclass(CompactionPlanner.class); @@ -127,7 +127,8 @@ public class CheckCompactionConfig implements KeywordExecutable { planner.init(initParams); initParams.getRequestedGroups().forEach(groupId -> { - log.info("Compaction service '{}' requested with compactor group '{}'", serviceId, groupId); + log.atLevel(level).log("Compaction service '{}' requested with compactor group '{}'", + serviceId, groupId); groupToServices.computeIfAbsent(groupId, f -> new HashSet<>()).add(serviceId); }); } @@ -147,7 +148,7 @@ public class CheckCompactionConfig implements KeywordExecutable { + " to undesired behavior. Please fix the configuration"); } - log.info("Properties file has passed all checks."); + log.atLevel(level).log("Properties file has passed all checks."); } diff --git a/server/manager/src/main/java/org/apache/accumulo/manager/TabletGroupWatcher.java b/server/manager/src/main/java/org/apache/accumulo/manager/TabletGroupWatcher.java index 69f96f89b7..e7e153a8ad 100644 --- a/server/manager/src/main/java/org/apache/accumulo/manager/TabletGroupWatcher.java +++ b/server/manager/src/main/java/org/apache/accumulo/manager/TabletGroupWatcher.java @@ -444,7 +444,7 @@ abstract class TabletGroupWatcher extends AccumuloDaemonThread { tableMgmtParams.getCompactionHints(), tableMgmtParams.getSteadyTime()); try { - CheckCompactionConfig.validate(manager.getConfiguration()); + CheckCompactionConfig.validate(manager.getConfiguration(), Level.TRACE); this.metrics.clearCompactionServiceConfigurationError(); } catch (RuntimeException | ReflectiveOperationException e) { this.metrics.setCompactionServiceConfigurationError(); diff --git a/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java b/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java index 3de05a7578..7a0b275994 100644 --- a/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java +++ b/server/manager/src/main/java/org/apache/accumulo/manager/compaction/coordinator/CompactionCoordinator.java @@ -410,7 +410,7 @@ public class CompactionCoordinator } if (metaJob == null) { - LOG.debug("No jobs found in group {} ", groupName); + LOG.trace("No jobs found in group {} ", groupName); } if (result == null) { diff --git a/server/manager/src/main/java/org/apache/accumulo/manager/upgrade/UpgradeCoordinator.java b/server/manager/src/main/java/org/apache/accumulo/manager/upgrade/UpgradeCoordinator.java index 61a7516f15..611f035491 100644 --- a/server/manager/src/main/java/org/apache/accumulo/manager/upgrade/UpgradeCoordinator.java +++ b/server/manager/src/main/java/org/apache/accumulo/manager/upgrade/UpgradeCoordinator.java @@ -51,6 +51,7 @@ import org.apache.accumulo.server.fs.VolumeManager; import org.apache.hadoop.fs.Path; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.slf4j.event.Level; import com.google.common.base.Preconditions; @@ -262,7 +263,7 @@ public class UpgradeCoordinator { throw new IllegalStateException("Error checking properties", e); } try { - CheckCompactionConfig.validate(context.getConfiguration()); + CheckCompactionConfig.validate(context.getConfiguration(), Level.INFO); } catch (RuntimeException | ReflectiveOperationException e) { throw new IllegalStateException("Error validating compaction configuration", e); } diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/session/SessionManager.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/session/SessionManager.java index 3a7df5347d..7921926149 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/session/SessionManager.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/session/SessionManager.java @@ -307,7 +307,7 @@ public class SessionManager { } long idleTime = System.currentTimeMillis() - session.lastAccessTime; if (idleTime > configuredIdle) { - log.info("Closing idle session {} from user={}, client={}, idle={}ms", + log.trace("Closing idle session {} from user={}, client={}, idle={}ms", session.getSessionId(), session.getUser(), session.client, idleTime); iter.remove(); sessionsToCleanup.add(session);