Apache Solr open-source search software
Address logging warnings (#4420)
Pierre Salagnacee8d6ca3320b
diff --git a/solr/core/src/java/org/apache/solr/cloud/DistributedApiAsyncTracker.java b/solr/core/src/java/org/apache/solr/cloud/DistributedApiAsyncTracker.javaindex 242c5d9a198..556ea22211d 100644--- a/solr/core/src/java/org/apache/solr/cloud/DistributedApiAsyncTracker.java+++ b/solr/core/src/java/org/apache/solr/cloud/DistributedApiAsyncTracker.java@@ -364,9 +364,7 @@ public class DistributedApiAsyncTracker {// Unlikely race, but not impossible...if (log.isInfoEnabled()) {log.info(- "AsyncId ephemeral node "- + getPath(asyncId)- + " vanished from underneath us. Funny."); // nowarn+ "AsyncId ephemeral node {} vanished from underneath us. Funny.", getPath(asyncId));}return State.NOT_FOUND;}@@ -374,9 +372,8 @@ public class DistributedApiAsyncTracker {if (bytes == null) {// This is not expected. The ephemeral nodes are always created with content.log.error(- "AsyncId ephemeral node "- + getPath(asyncId)- + " has null content. This is unexpected (bug)."); // nowarn+ "AsyncId ephemeral node {} has null content. This is unexpected (bug).",+ getPath(asyncId));return State.NOT_FOUND;}@@ -387,11 +384,9 @@ public class DistributedApiAsyncTracker {return State.SUBMITTED;} else {log.error(- "AsyncId ephemeral node "- + getPath(asyncId)- + " has unexpected content \""- + content- + "\". This is unexpected (bug)."); // nowarn+ "AsyncId ephemeral node {} has unexpected content \"{}\". This is unexpected (bug).",+ getPath(asyncId),+ content);return State.NOT_FOUND;}}diff --git a/solr/core/src/java/org/apache/solr/cloud/DistributedClusterStateUpdater.java b/solr/core/src/java/org/apache/solr/cloud/DistributedClusterStateUpdater.javaindex cac60d45ce1..3c4c152bdcf 100644--- a/solr/core/src/java/org/apache/solr/cloud/DistributedClusterStateUpdater.java+++ b/solr/core/src/java/org/apache/solr/cloud/DistributedClusterStateUpdater.java@@ -807,14 +807,11 @@ public class DistributedClusterStateUpdater {throws KeeperException, InterruptedException {if (log.isDebugEnabled()) {log.debug(- "Executing updates for collection "- + collectionName- + ", is creation="- + isCollectionCreation- + ", "- + mutations.size()- + " recorded mutations.",- new Exception("StackTraceOnly")); // nowarn+ "Executing updates for collection {}, is creation={}, {} recorded mutations.",+ collectionName,+ isCollectionCreation,+ mutations.size(),+ new Exception("StackTraceOnly"));}if (mutations.isEmpty()) {final String err =@@ -925,10 +922,7 @@ public class DistributedClusterStateUpdater {if (docCollection == null) {// This is possible but should be rare. Logging warn in case it is seen often and likely a// sign of another issue- log.warn(- "Processing DOWNNODE, collection "- + collectionName- + " disappeared during iteration"); // nowarn+ log.warn("Processing DOWNNODE, collection {} disappeared during iteration", collectionName);}if (result.isPresent()) {diff --git a/solr/core/src/java/org/apache/solr/cloud/Overseer.java b/solr/core/src/java/org/apache/solr/cloud/Overseer.javaindex e3b1651eeee..cc8e65537c5 100644--- a/solr/core/src/java/org/apache/solr/cloud/Overseer.java+++ b/solr/core/src/java/org/apache/solr/cloud/Overseer.java@@ -1047,9 +1047,8 @@ public class Overseer implements SolrCloseable {final ZkNodeProps message = ZkNodeProps.load(data);final String operation = message.getStr(QUEUE_OPERATION);log.error(- "Received unexpected message on Overseer cluster state updater for "- + operation- + " when distributed updates are configured"); // nowarn+ "Received unexpected message on Overseer cluster state updater for {} when distributed updates are configured",+ operation);throw new RuntimeException("Message "+ operationdiff --git a/solr/core/src/java/org/apache/solr/cloud/OverseerTaskProcessor.java b/solr/core/src/java/org/apache/solr/cloud/OverseerTaskProcessor.javaindex b7755a01ef8..37dff20a2f4 100644--- a/solr/core/src/java/org/apache/solr/cloud/OverseerTaskProcessor.java+++ b/solr/core/src/java/org/apache/solr/cloud/OverseerTaskProcessor.java@@ -703,7 +703,7 @@ public class OverseerTaskProcessor implements SolrInfoBean, Runnable, Closeableprivate void printTrackingMaps() {if (log.isDebugEnabled()) {log.debug("RunningTasks: {}", runningTasks.keySet());- log.debug("BlockedTasks: {}", blockedTasks.keySet()); // nowarn+ log.debug("BlockedTasks: {}", blockedTasks.keySet());}}diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/DistributedCollectionConfigSetCommandRunner.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/DistributedCollectionConfigSetCommandRunner.javaindex a626af3c45c..80797e0e91f 100644--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/DistributedCollectionConfigSetCommandRunner.java+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/DistributedCollectionConfigSetCommandRunner.java@@ -200,7 +200,7 @@ public class DistributedCollectionConfigSetCommandRunner {action, (String) result.get(ConfigSetCmds.BASE_CONFIGSET));if (log.isInfoEnabled()) {- log.info("Running Config Set API locally for " + action + " " + configSetName); // nowarn+ log.info("Running Config Set API locally for {} {}", action, configSetName);}ConfigSetCommandRunner commandRunner =diff --git a/solr/core/src/java/org/apache/solr/cloud/api/collections/OverseerRoleCmd.java b/solr/core/src/java/org/apache/solr/cloud/api/collections/OverseerRoleCmd.javaindex 32f10bc1c6f..af4ff42be66 100644--- a/solr/core/src/java/org/apache/solr/cloud/api/collections/OverseerRoleCmd.java+++ b/solr/core/src/java/org/apache/solr/cloud/api/collections/OverseerRoleCmd.java@@ -60,8 +60,8 @@ public class OverseerRoleCmd implements CollApiCmds.CollectionApiCommand {// No Overseer (not accessible from Collection API command execution in any case) so this// command can't be run...log.error(- "Cluster is running with distributed Collection API execution. Ignoring Collection API operation "- + operation); // nowarn+ "Cluster is running with distributed Collection API execution. Ignoring Collection API operation {}",+ operation);return;}ZkStateReader zkStateReader = ccc.getZkStateReader();diff --git a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.javaindex 5fffe0099e1..e39c6eddfff 100644--- a/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java+++ b/solr/core/src/java/org/apache/solr/handler/IndexFetcher.java@@ -508,9 +508,7 @@ public class IndexFetcher {if (log.isInfoEnabled()) {log.info("Follower's generation: {}", commit.getGeneration());- log.info(- "Follower's version: {}",- IndexDeletionPolicyWrapper.getCommitTimestamp(commit)); // nowarn+ log.info("Follower's version: {}", IndexDeletionPolicyWrapper.getCommitTimestamp(commit));}// Leader's version is 0 and generation is 0 - not open for replication