add shardId to create cmd

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1244212 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-02-14 21:19:32 +00:00
parent a06f3a8550
commit fe0c6ae0ae
1 changed files with 7 additions and 1 deletions

View File

@ -52,6 +52,7 @@ public class CoreAdminRequest extends SolrRequest
protected String dataDir = null;
protected String collection;
private Integer numShards;
private String shardId;
public Create() {
action = CoreAdminAction.CREATE;
@ -63,12 +64,14 @@ public class CoreAdminRequest extends SolrRequest
public void setDataDir(String dataDir) { this.dataDir = dataDir; }
public void setCollection(String collection) { this.collection = collection; }
public void setNumShards(int numShards) {this.numShards = numShards;}
public void setShardId(String shardId) {this.shardId = shardId;}
public String getInstanceDir() { return instanceDir; }
public String getSchemaName() { return schemaName; }
public String getConfigName() { return configName; }
public String getDataDir() { return dataDir; }
public String getCollection() { return collection; }
public String getShardId() { return shardId; }
@Override
public SolrParams getParams() {
@ -98,6 +101,9 @@ public class CoreAdminRequest extends SolrRequest
if (numShards != null) {
params.set( ZkStateReader.NUM_SHARDS_PROP, numShards);
}
if (shardId != null) {
params.set( ZkStateReader.SHARD_ID_PROP, shardId);
}
return params;
}