lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From si...@apache.org
Subject svn commit: r1292238 - in /lucene/dev/trunk/solr: core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
Date Wed, 22 Feb 2012 11:14:07 GMT
Author: siren
Date: Wed Feb 22 11:14:06 2012
New Revision: 1292238

URL: http://svn.apache.org/viewvc?rev=1292238&view=rev
Log:
fix CoreAdminRequest so that it uses correct key for shard id, use same key for shard id in
CoreAdminParams and ZkStateReader

Modified:
    lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java
    lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java
    lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java

Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java?rev=1292238&r1=1292237&r2=1292238&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java
(original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java
Wed Feb 22 11:14:06 2012
@@ -310,7 +310,6 @@ public class BasicDistributedZkTest exte
    // 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 exte
     zkStateReader.updateCloudState(true);
     Map<String,Slice> 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);
   }
 

Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java?rev=1292238&r1=1292237&r2=1292238&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java
(original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/request/CoreAdminRequest.java
Wed Feb 22 11:14:06 2012
@@ -105,7 +105,7 @@ public class CoreAdminRequest extends So
         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);

Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java?rev=1292238&r1=1292237&r2=1292238&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java (original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java Wed
Feb 22 11:14:06 2012
@@ -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";
   



Mime
View raw message