diff --git a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java index 35e2c1048f5..4668f027a87 100644 --- a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java @@ -310,7 +310,6 @@ public class BasicDistributedZkTest extends AbstractDistributedZkTestCase { // TODO: enable when we don't falsly get slice1... // solrj.getZkStateReader().getLeaderUrl(oneInstanceCollection2, "slice1", 30000); // solrj.getZkStateReader().getLeaderUrl(oneInstanceCollection2, "slice2", 30000); - client2.add(getDoc(id, "1")); client3.add(getDoc(id, "2")); client4.add(getDoc(id, "3")); @@ -343,7 +342,7 @@ public class BasicDistributedZkTest extends AbstractDistributedZkTestCase { zkStateReader.updateCloudState(true); Map slices = zkStateReader.getCloudState().getSlices(oneInstanceCollection2); assertNotNull(slices); - String roles = slices.get("shard1").getShards().values().iterator().next().get(ZkStateReader.ROLES_PROP); + String roles = slices.get("slice1").getShards().values().iterator().next().get(ZkStateReader.ROLES_PROP); assertEquals("none", roles); } diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java index dc96dde3a82..bd7c28b8dbb 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java @@ -105,7 +105,7 @@ public class CoreAdminRequest extends SolrRequest params.set( ZkStateReader.NUM_SHARDS_PROP, numShards); } if (shardId != null) { - params.set( ZkStateReader.SHARD_ID_PROP, shardId); + params.set( CoreAdminParams.SHARD, shardId); } if (roles != null) { params.set( CoreAdminParams.ROLES, roles); 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 9666835d8e6..b67255fbaf6 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 @@ -54,7 +54,7 @@ public class ZkStateReader { public static final String STATE_PROP = "state"; public static final String CORE_NAME_PROP = "core"; public static final String COLLECTION_PROP = "collection"; - public static final String SHARD_ID_PROP = "shard_id"; + public static final String SHARD_ID_PROP = "shard"; public static final String NUM_SHARDS_PROP = "numShards"; public static final String LEADER_PROP = "leader";