SOLR-6240: Removed unused coreName parameter in ZkStateReader.getReplicaProps

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1610033 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2014-07-12 19:55:00 +00:00
parent 31d361d6ec
commit 92782a07db
4 changed files with 11 additions and 12 deletions

View File

@ -201,6 +201,8 @@ Other Changes
* SOLR-2853: Add a unit test for the case when "spellcheck.maxCollationTries=0" (James Dyer)
* SOLR-6240: Removed unused coreName parameter in ZkStateReader.getReplicaProps. (shalin)
================== 4.9.0 ==================
Versions of Major Components

View File

@ -195,7 +195,7 @@ public class LeaderInitiatedRecoveryThread extends Thread {
} else {
String leaderCoreNodeName = zkStateReader.getLeaderRetry(collection, shardId, 5000).getName();
List<ZkCoreNodeProps> replicaProps =
zkStateReader.getReplicaProps(collection, shardId, leaderCoreNodeName, coreNeedingRecovery, null, null);
zkStateReader.getReplicaProps(collection, shardId, leaderCoreNodeName);
if (replicaProps != null && replicaProps.size() > 0) {
String replicaState = replicaProps.get(0).getState();
if (ZkStateReader.ACTIVE.equals(replicaState)) {

View File

@ -312,7 +312,6 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor {
forwardToLeader = false;
return nodes;
}
String coreName = req.getCore().getName();
ClusterState cstate = zkController.getClusterState();
DocCollection coll = cstate.getCollection(collection);
@ -361,7 +360,7 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor {
slice = coll.getSlice(myShardId);
shardId = myShardId;
leaderReplica = zkController.getZkStateReader().getLeaderRetry(collection, myShardId);
List<ZkCoreNodeProps> myReplicas = zkController.getZkStateReader().getReplicaProps(collection, shardId, leaderReplica.getName(), coreName, null, ZkStateReader.DOWN);
List<ZkCoreNodeProps> myReplicas = zkController.getZkStateReader().getReplicaProps(collection, shardId, leaderReplica.getName(), null, ZkStateReader.DOWN);
}
}
@ -379,8 +378,7 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor {
// so get the replicas...
forwardToLeader = false;
List<ZkCoreNodeProps> replicaProps = zkController.getZkStateReader()
.getReplicaProps(collection, shardId, leaderReplica.getName(),
coreName, null, ZkStateReader.DOWN);
.getReplicaProps(collection, shardId, leaderReplica.getName(), null, ZkStateReader.DOWN);
if (replicaProps != null) {
if (nodes == null) {
@ -1415,8 +1413,7 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor {
Replica leaderReplica = zkController.getZkStateReader().getLeaderRetry(
collection, myShardId);
List<ZkCoreNodeProps> replicaProps = zkController.getZkStateReader()
.getReplicaProps(collection, myShardId, leaderReplica.getName(),
req.getCore().getName(), null, ZkStateReader.DOWN);
.getReplicaProps(collection, myShardId, leaderReplica.getName(), null, ZkStateReader.DOWN);
if (replicaProps != null) {
List<Node> myReplicas = new ArrayList<>();
for (ZkCoreNodeProps replicaProp : replicaProps) {

View File

@ -578,17 +578,17 @@ public class ZkStateReader {
}
public List<ZkCoreNodeProps> getReplicaProps(String collection,
String shardId, String thisCoreNodeName, String coreName) {
return getReplicaProps(collection, shardId, thisCoreNodeName, coreName, null);
String shardId, String thisCoreNodeName) {
return getReplicaProps(collection, shardId, thisCoreNodeName);
}
public List<ZkCoreNodeProps> getReplicaProps(String collection,
String shardId, String thisCoreNodeName, String coreName, String mustMatchStateFilter) {
return getReplicaProps(collection, shardId, thisCoreNodeName, coreName, mustMatchStateFilter, null);
String shardId, String thisCoreNodeName, String mustMatchStateFilter) {
return getReplicaProps(collection, shardId, thisCoreNodeName, mustMatchStateFilter, null);
}
public List<ZkCoreNodeProps> getReplicaProps(String collection,
String shardId, String thisCoreNodeName, String coreName, String mustMatchStateFilter, String mustNotMatchStateFilter) {
String shardId, String thisCoreNodeName, String mustMatchStateFilter, String mustNotMatchStateFilter) {
assert thisCoreNodeName != null;
ClusterState clusterState = this.clusterState;
if (clusterState == null) {