From 0add3bb0ac6d7c3a2bd1ad8dde57f8b24f8bb121 Mon Sep 17 00:00:00 2001 From: Tomas Fernandez Lobbe Date: Fri, 25 Jan 2019 18:17:32 -0800 Subject: [PATCH] Removed some unused variables from DistributedUpdateProcessor --- .../update/processor/DistributedUpdateProcessor.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java b/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java index 0b125a1ee03..c8ddeb95bb1 100644 --- a/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java +++ b/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java @@ -31,9 +31,6 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; -import java.util.concurrent.CompletionService; -import java.util.concurrent.ExecutorCompletionService; -import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.ReentrantLock; @@ -63,7 +60,6 @@ import org.apache.solr.common.cloud.Replica; import org.apache.solr.common.cloud.RoutingRule; import org.apache.solr.common.cloud.Slice; import org.apache.solr.common.cloud.Slice.State; -import org.apache.solr.common.cloud.SolrZkClient; import org.apache.solr.common.cloud.ZkCoreNodeProps; import org.apache.solr.common.cloud.ZkStateReader; import org.apache.solr.common.cloud.ZooKeeperException; @@ -561,7 +557,6 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor { ZkStateReader.COLLECTION_PROP, collection, ZkStateReader.SHARD_ID_PROP, myShardId, "routeKey", routeKey + "!"); - SolrZkClient zkClient = zkController.getZkClient(); zkController.getOverseer().offerStateUpdate(Utils.toJSON(map)); } catch (KeeperException e) { log.warn("Exception while removing routing rule for route key: " + routeKey, e); @@ -1097,7 +1092,7 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor { versionOnUpdate = 0; } - boolean updated = getUpdatedDocument(cmd, versionOnUpdate); + getUpdatedDocument(cmd, versionOnUpdate); // leaders can also be in buffering state during "migrate" API call, see SOLR-5308 if (forwardedFromCollection && ulog.getState() != UpdateLog.State.ACTIVE @@ -1955,8 +1950,6 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor { && node.getNodeProps().getCoreName().equals(req.getCore().getName())); } - CompletionService completionService = new ExecutorCompletionService<>(req.getCore().getCoreContainer().getUpdateShardHandler().getUpdateExecutor()); - Set> pending = new HashSet<>(); if (!zkEnabled || (!isLeader && req.getParams().get(COMMIT_END_POINT, "").equals("replicas"))) { if (replicaType == Replica.Type.TLOG) {