You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2021/01/18 13:35:41 UTC
[lucene-solr] branch jira/solr_13951 updated: unused imports
This is an automated email from the ASF dual-hosted git repository.
noble pushed a commit to branch jira/solr_13951
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/jira/solr_13951 by this push:
new 91312a0 unused imports
91312a0 is described below
commit 91312a0ad806b8b5e4941d5a389bf9fad123567f
Author: noblepaul <no...@gmail.com>
AuthorDate: Tue Jan 19 00:35:10 2021 +1100
unused imports
---
.../java/org/apache/solr/handler/admin/CollectionsHandler.java | 1 -
.../src/java/org/apache/solr/common/cloud/DocCollection.java | 8 +++++---
.../src/java/org/apache/solr/common/cloud/ZkStateReader.java | 6 +++---
3 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
index 5056b44..b9c5439 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
@@ -19,7 +19,6 @@ package org.apache.solr.handler.admin;
import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.net.URI;
-import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java b/solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java
index 7839532..18a6438 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/DocCollection.java
@@ -124,9 +124,11 @@ public class DocCollection extends ZkNodeProps implements Iterable<Slice> {
* Used to create a new Collection State when only a replica is updated
*/
public DocCollection copyWith( PerReplicaStates newPerReplicaStates) {
- log.debug("collection :{} going to be updated : per-replica state :{} -> {}",
- name,
- getChildNodesVersion(), newPerReplicaStates.cversion);
+ if (log.isDebugEnabled()) {
+ log.debug("collection :{} going to be updated : per-replica state :{} -> {}",
+ name,
+ getChildNodesVersion(), newPerReplicaStates.cversion);
+ }
if(getChildNodesVersion() == newPerReplicaStates.cversion) return this;
Set<String> modifiedReplicas = PerReplicaStates.findModifiedReplicas(newPerReplicaStates, this.perReplicaStates);
if(modifiedReplicas.isEmpty()) return this; //nothing is modified
diff --git a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
index 9960e34..8a0bb23 100644
--- a/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
+++ b/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
@@ -23,13 +23,11 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.EnumSet;
-import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
-import java.util.Objects;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
@@ -1633,7 +1631,9 @@ public class ZkStateReader implements SolrCloseable {
PerReplicaStates current = c.getPerReplicaStates();
PerReplicaStates newPrs = PerReplicaStates.fetch(c.getZNode(), zkClient, current);
if (newPrs != current) {
- log.debug("just-in-time update for a fresh per-replica-state {}", c.getName());
+ if(log.isDebugEnabled()) {
+ log.debug("update for a fresh per-replica-state {}", c.getName());
+ }
DocCollection modifiedColl = c.copyWith(newPrs);
updateWatchedCollection(c.getName(), modifiedColl);
return modifiedColl;