SOLR-6240: Fixed broken tests

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1610088 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2014-07-12 23:52:03 +00:00
parent 4173acfd04
commit 473e0189c6
3 changed files with 4 additions and 7 deletions

View File

@ -357,7 +357,7 @@ final class ShardLeaderElectionContext extends ShardLeaderElectionContextBase {
log.info("After core={} coreNodeName={} was elected leader, it was found in state: " log.info("After core={} coreNodeName={} was elected leader, it was found in state: "
+ lirState + " and needing recovery.", coreName, coreNodeName); + lirState + " and needing recovery.", coreName, coreNodeName);
List<ZkCoreNodeProps> replicaProps = List<ZkCoreNodeProps> replicaProps =
zkController.getZkStateReader().getReplicaProps(collection, shardId, coreNodeName, null); zkController.getZkStateReader().getReplicaProps(collection, shardId, coreNodeName);
if (replicaProps != null && replicaProps.size() > 0) { if (replicaProps != null && replicaProps.size() > 0) {
ZkCoreNodeProps coreNodeProps = null; ZkCoreNodeProps coreNodeProps = null;

View File

@ -150,8 +150,7 @@ public class SyncStrategy {
private boolean syncWithReplicas(ZkController zkController, SolrCore core, private boolean syncWithReplicas(ZkController zkController, SolrCore core,
ZkNodeProps props, String collection, String shardId, boolean peerSyncOnlyWithActive) { ZkNodeProps props, String collection, String shardId, boolean peerSyncOnlyWithActive) {
List<ZkCoreNodeProps> nodes = zkController.getZkStateReader() List<ZkCoreNodeProps> nodes = zkController.getZkStateReader()
.getReplicaProps(collection, shardId,core.getCoreDescriptor().getCloudDescriptor().getCoreNodeName(), .getReplicaProps(collection, shardId,core.getCoreDescriptor().getCloudDescriptor().getCoreNodeName());
props.getStr(ZkStateReader.CORE_NAME_PROP));
if (nodes == null) { if (nodes == null) {
// I have no replicas // I have no replicas
@ -178,8 +177,7 @@ public class SyncStrategy {
List<ZkCoreNodeProps> nodes = zkController List<ZkCoreNodeProps> nodes = zkController
.getZkStateReader() .getZkStateReader()
.getReplicaProps(collection, shardId, .getReplicaProps(collection, shardId,
cd.getCloudDescriptor().getCoreNodeName(), cd.getCloudDescriptor().getCoreNodeName());
leaderProps.getStr(ZkStateReader.CORE_NAME_PROP));
if (nodes == null) { if (nodes == null) {
log.info(ZkCoreNodeProps.getCoreUrl(leaderProps) + " has no replicas"); log.info(ZkCoreNodeProps.getCoreUrl(leaderProps) + " has no replicas");
return; return;

View File

@ -623,8 +623,7 @@ public class DistributedUpdateProcessor extends UpdateRequestProcessor {
forwardToLeader = false; forwardToLeader = false;
List<ZkCoreNodeProps> replicaProps = zkController.getZkStateReader() List<ZkCoreNodeProps> replicaProps = zkController.getZkStateReader()
.getReplicaProps(collection, shardId, leaderReplica.getName(), .getReplicaProps(collection, shardId, leaderReplica.getName());
req.getCore().getName());
if (replicaProps != null) { if (replicaProps != null) {
nodes = new ArrayList<>(replicaProps.size()); nodes = new ArrayList<>(replicaProps.size());
for (ZkCoreNodeProps props : replicaProps) { for (ZkCoreNodeProps props : replicaProps) {